8. Custom Scripting - Load Test Plug-ins
Load Test Plug-ins are pre-compiled Java classes that the GUI can load using the Var Handler - into the recorded web session to enhance a load test program's functionality. When a plug-in is used, it is automatically copied into the same directory where the load test program is stored (when the load test program is saved). Before a load test can be executed, the load test plug-in(s) (*.class) and the load test program (*.class) must be zipped together to one ZIP archive (similar to input files). All required load test plug-ins are automatically transmitted to the Exec Agent(s) when a load test starts. Step 1 to adding a pre-existing Load Test Plug-in via the Var Handler is clicking on the drop-down box to select which Plugin to add.  |  |
Fill in the Parameters for that plug-in and click Add Plug-in. Plug-in #1 Example: Abort Failed Test Plugin |
Plug-in attributes:
Attribute | Description |
---|---|
File: | The file-path of the plug-in. Please note that all plug-ins' source is always the top-level 'Plugins' directory of the Project Navigator. Plug-ins in all other directories are always duplicates of the original plug-in classes and updated/overwritten when the original plug-in is modified. |
Last Modified: | The timestamp when the plug-in has been created or updated in the corresponding directory. |
Plug-in Type:Â | Always fixed to ' Load Test Plug-in.' |
Plug-in Name:Â | The name of the plug-in, shown in the GUI (Var Handler). |
Construct Scope:Â | The level on which the plug-in is initialized during the load test. Possible levels are 'global' (at the start or the end of a load test), 'per user' (at the start or the end of a user), or 'per loop' (at the start or the end of each loop). 'not fixed - arbitrary' means that the initialization level is arbitrarily selectable in the GUI. |
Execution Scope: | The level on which the plug-in is executed during the load test. Possible levels are 'global' (at the start or the end of a load test), 'per user' (at the start or the end of a user), 'per loop' (at the start or the end of each loop), 'bound to URL' (before or after a specific URL call is executed) or 'bound to every URL' (bound to all URL calls - executed before or after every URL is executed). 'not fixed - arbitrary' means that the execution level is arbitrarily selectable in the GUI. Note 1: if a plug-in is bound to an URL call and the execution order is set to ‘before,’ the output parameters of a plug-in can not be used to set CGI or Form input parameter of the same URL call because the context of the plug-in contains already all URL request data. In such a case, you have to bind the plug-in to the preceding URL call, 'after' the preceding the URL call is executed. Note 2: if the execution scope of a plug-in is defined as ‘per loop' and the execution order is defined as 'after,’ the plug-in will not be executed if any URL call of the corresponding loop fails. |
Execution Order: | The order when the plug-in is executed (before or after the execution scope). Not fixed - arbitrary means that the execution order is arbitrarily selectable in the GUI. |
Allow Multiple Usage:Â | Defines if the plug-in can be used several times in the same load test program. |
Input Parameter:Â | The list of plug-in input parameters (input variables). The column 'Name' shows the input variable names' labels shown in the GUI. The column 'Utilization' shows if the input parameter is required or optionally selectable. The column 'Assign From' shows if a normal, existing variable must be used in the GUI or if a new User Input Field is automatically created when the plug-in is used. |
Output Parameter:Â | The list of plug-in output parameters (output variables). The column 'Name' shows the labels of the output variable names shown in the GUI. The column 'Utilization' shows if the output parameter must be allocated to a variable or if acquiring the plug-in output is optional. The column 'Extract To' is always fixed to [variable]. |
Plug-in Description:Â | The description of the plug-in, which is shown in the GUI. |
Â
Â
Can't find what you're looking for? Send an E-mail to support@apica.io