Save Effort with HP LR 11 AJAX TruClient Protocol

In this article we will see how HP LR 11 AJAX Protocol helps us to save effort and time in Performance Testing. Performance Testing helps measure stability, speed and scalability of software applications in different scenarios. During the Test Scripting Phase of Performance Testing, the most time consuming effort is enhancements. The most critical step during enhancements is Correlations.

Correlations is nothing but capturing dynamic data, storing the value in a variable and passing the value to the server. HP recently released its latest LoadRunner version 11.0. This is a significant upgrade from HP, when compared to the previous version which was the LR 9.52, with many enhanced features and new protocols.

Some of the new features introduced in LR 11.0 are multi-level reporting, performance center and integrated diagnostics. Integrated Diagnostics is a very useful feature that detects the root cause of issues in performance testing. The most noteworthy protocol that HP has introduced is the AJAX (Asynchronous JavaScript and XML) TruClient. AJAX TruClient simplifies scripting for AJAX based applications. Some examples of AJAX based applications are Gmail, Google Maps and Cricinfo etc.

Before using HP LR 11.0 to script AJAX based applications, we use Web HTTP/HTML protocol, Web Click and Script or AJAX Click and Script for scripting. The Web HTTP/HTML protocol requires a lot of effort in correlations when compared with AJAX Click and Script Protocol. The Web Click and Script Protocol records the actions based on screen coordinates which requires more maintenance & rework effort, also it is not reliable. Correlations are not required in scripting with the AJAX TruClient Protocol.

Once recording  of a business flow gets complete, the embedded script engine creates parameters, add control loops, create transactions, add comments and functions, automate suggestions of automated steps and change the level of object identification, etc.

I conducted some experiments to compare the average time taken in scripting with Web HTTP/HTML Protocol and with the new AJAX TruClient Protocol in LR 11.0. I considered different business scenarios with varying levels of complexity and mapped them to various enhancement factors.

Table 1 displays the average time of scripting in Web (HTTP/HTML) Protocol.

Average Time taken in Scripting with Web HTTP/HTML Protocol


Enhancements Factors

 Business Complexity Transactions Data Parameterization Rendezvous Points Correlations Error Handling Total
Simple 4 7.5 1.5 12.5 7.5 33
Medium 7.5 12.5 3 30 20 73
Complex 12.5 22.5 6 67.5 37.5 106

* Time is in minutes

Table 2 displays the average time of scripting using AJAX TruClient Protocol in LR11.0

Average Time taken in Scripting with AJAX TruClient Protocol in LR11.0


Enhancements Factors

 Business Complexity Transactions Data Parameterization Rendezvous Points Error Handling Total Effort Saved Percentage (%)
Simple 4 7.5 1.5 7.5 20.5 37.88
Medium 7.5 12.5 3 20 43 41.10
Complex 12.5 22.5 6 37.5 78.5 25.94
Average 8 14.17 3.5 21.67 47.33 34.97

* Time is in minutes

I have deducted the time taken in Correlation and calculated the Effort Saving Percentage for each business flow type.

% of Effort Saved by using AJAX TruClient Protocol = (Effort spent on Web (HTTP/HTML) – Effort spent AJAX TruClient) / Effort spent on Web (HTTP/HTML)) * 100

We can see that the average effort saved % in scripting with AJAX Tru Client Protocol in LR 11.0 is 34.97%

Chart 1 is a graphical representation of the total effort spent for scripting using Web (HTTP/HTML) and AJAX TruClient Protocol in the different business flow complexities.

The experiment above demonstrates how the LR11.0 AJAX TruClient Protocol requires less effort as we do not have to correlate in scripting for AJAX based applications.

AJAX TruClient Protocol also increases the usability for scripting using embedded script engine. Scripts developed using this protocol is easier to maintain. Some of the other benefits include advance mechanism to identify objects in Web 2.0 applications, control structures (for loop, if block, break, catch error, continue and exit), evaluation of JavaScript, JS on object, C and comments, intuitive user interface and built-in functions like verify, wait, wait for object, generic object action and generic browser action which speeds up scripting.

One does not require a lot of expertise or the knowledge of programming languages with AJAX TruClient Protocol. It is very easy to learn and enables users to develop scripts interactively. AJAX TruClient is an apt protocol for scripting JavaScript (including AJAX) based applications that accelerate the scripting phase in Performance Test Life Cycle (PTLC). AJAX TruClient helps testers to expedite the process of testing and generate accurate scripts faster.

The only disadvantage of AJAX TruClient Protocol is that your application under test should be compatible with Mozilla Firefox.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Join the fastest growing Performance Engineers club at ClubhouseSHOW ME HOW
+ +
Share via
Copy link