Using the WebPerformanceValue Plugin to display custom values in the ASM GUIPinned Featured
It is possible to display a custom value in place of response time in the ASM GUI. As a high-level, example, look at these two results in ASM:You can see that the usual "Response Time" which would be included in the "Value" column has been replaced with the value "56 Checks". In this particular instance, that value is the number of checks which are visible to a user with a particular ASM authorization ticket. Note that only "56" is passed up by ZebraTester in this instance here; the "Checks" unit is one of the available result units that can be chosen in the "Result Unit" section of the "Edit Check" page:
You can "pass up" any value that is returned as the output of a ZebraTester variable via the WebPerformanceValue Zebratester Plugin. See the "var handler" here:
The "totalchecks" variable shown above is simply the output of an inline script that counts the number of checks that are available to a user (as determined by an API call which is a URL in the ZT script itself). The important point is that the inline script outputs a variable, 56. WebPerformanceValue allows the user to pass that output up to ASM to be shown in the Check Details.
To add the WebPerformanceValue plugin to your script:
1. Request the WebPerformanceValue .class and .java files by E-mailing Support (firstname.lastname@example.org)
2. When you have the files, place them in the "Plugins" sub-directory of the ZebraTester directory. This will allow the Plugin to be found in the dropdown list of Plugins from the ZT GUI.
3. Click "Add plug-in" in the "Load Test Plug-Ins" section of the URL Details page in your ZT script:
Select "WebPerformanceValue" in the list of available plug-ins. If it is not there, make sure the WebPerformanceValue.class file is in your "Plugins" directory and restart ZebraTester. When you select the plugin you should see this popup:
Just select the variable you want to show in the "Value" column of ASM and select "Add Plug-in".
4. Compile the .prxdat file. The program should detect that you need the WebPerformanceValue.class plug-in and will ask you if you want to zip the compiled .prxdat and the WebPerformanceValue.class files together to create the load test. Click yes (if you don't get that prompt make sure to zip the compiled class file and the plugin together into a .zip using the ZebraTester GUI before you upload to ASM).
5. Run the load test file locally and make sure everything goes smoothly
6. Upload the .zip file to ASM and run - make sure to select the desired Result Unit. You should see the Custom Value show up in the Check Details view!
Please sign in to leave a comment.