Everyday I see at least one discussion or thread related to Ajax TruClient protocol. Many performance engineers across the world are starting to use this protocol to test their web apps. Most of the questions on TruClient technology are based on three primary steps of scripting – Parameterization, Text Verification and Corelation. In this article, I will walk you through the steps required to incorporate these features in the scripts.
1) Create a parameter file in the TruClient script (eg. CityName)
2) Click on ‘Develop Script’ button of VUgen and open the TruClient script integrated with Mozilla Firefox.
Please note – LR.getParam() and LR.setParam() functions are available only after Patch 2 released on 11th version of LR. (V 11.02). If you have initial version, you will see ‘LR.getParam not defined error.’
A window popup will open during script replay. This will show the value stored in window.City OR abc.
6) To use the value in the argument section, just replace the text with the parameter name. However if you want to replace text in object section of a request, you make the replacement as mentioned below –
Original string :
Text Verification (Content Check) –
As every performance intivar cream reviews tester knows, this is one of the most important steps in the scripting process. During replay, the tool should be able to identify if the request made to the server gives the intended response/output. We use content check functions to incorporate this scenario. AJAX TruClient also support text check feature –
From the functions section of toolbar, drag ‘Verify’ function and place it just after the web-request function.
The text in verification can also be parameterized. If you wish to replace the name in argument section, just replace ‘NewYork’, by ‘CityName’. However if replacing the name in argument section fails, then one might have to replace the name in ‘object’ section where using ‘window.’ suffix will be required before the variable name.
Object Identification –
In Web 2.0 applications, the object properties change everytime the application is accessed and many times handling these dynamic changes using normal web protocol’s co-relation feature is challenging. In AJAX TruClient protocol scripts, one can very easily handle these dynamic changes using object identification capabilities. Thus minimizing the requirement of using a separate function for corelation.
Steps to perform object identification –
1) From ‘miscellaneous section’ of Toolbox, select ‘Evaluate JS on object’ –
2) Drag it to the page on which you want to perform object identification. Paste it below that page request.