Introduction to TruClient – Part 1

Recording in TruClient – Part 2
Enhancing a TruClient Script – Part 3
Working with Objects, Variables, and Code in TruClient – Part 4 

First, please don’t confuse TruClient with the Ajax – Click and Script protocol.  These are two totally different protocols based on completely different technology.  Click and Script was an early attempt at making a script that didn’t need traditional correlation.  It never was highly adopted and I don’t think it was well understood.  In version 11 of LoadRunner that all changed.  HP introduced a new protocol call Ajax TruClient.  I think naming it Ajax also contributed to the confusion with Click and Script.  This protocol used an actual browser to test the application and not a low-level script that duplicated HTTP traffic.  This made some scripting very easy, but it also came with some pitfalls.  Such as a significantly larger vuser footprint and it only worked with older versions of Firefox.  This all slowly changed over time though.  What you’ll notice is the TruClient is changing very fast and is constantly being updated to meet user demands and ever changing technology.  Be sure to use the latest version to take advantage of the newest features.  Let’s take a quick look at the history of TruClient:

LoadRunner 11.00 – First appearance of TruClient.  Used a built-in version of Firefox and was very barebones.  Limited function and JavaScript support.  I personally didn’t find it very usable and didn’t use it very much.

LoadRunner 11.02 – Major update to TruClient.  Expanded support for JavaScript, XPath, and built in functions such as If statements, Verify, Wait.  I consider this the first usable copy of TruClient.  Still using only Firefox though.

LoadRunner 11.50 – Added support for IE9 and Firefox 8.  I found the IE version rather buggy and couldn’t use it much.  Added general improvements to usability, support for HTML 5 and some underlying technologies.

LoadRunner 12.02 – No longer called Ajax TruClient, simply TruClient for Firefox or IE.  Continued improvements to usability.  Adds If Verify and If Exists functions which greatly help script flow control and error handling.   Also, added support for VTS.

LoadRunner 12.5 – TruClient is now simply TruClient Web, and dropped separate protocols for Firefox and IE.  Added Record Once Replay Any (RORA) browser functionality.  Added support for Chromium (Not Chrome, but the 64-bit version of Chromium).  Now you can record in Firefox and replay in IE if you wish.

LoadRunner 12.53 – The latest version of TruClient at the time of this blog being published.  Added easier parameterization by using parameters by name in arguments along with improved object identification and script development.

I would highly recommend you use version 12.02 or higher for any TruClient development.  All the script examples below will be from 12.5, which may not work on any of the 11.x versions.

When should I use TruClient over Web HTTP/HTML?

You should always try and script with Web HTTP/HTML first.  Web HTTP/HTML can easily scale to many vusers per generator.  This is TruClient’s biggest shortfall, the vuser CPU and memory footprint is very large.  For example, a m4.2xlarge AWS server (8 cores, 2.4 GHz, 32 GB RAM) can support about 100 vusers.  This can vary greatly based on the application being tested and the amount of JavaScript used.

If you see that the application you are trying to script has very complex correlation and heavily uses JavaScript, AJAX, or JSON, TruClient might be a better choice.  It is important to remember that TruClient uses an actual browser to play back the script, so if the application works in FireFox, IE, or Chromium you should be able to script it.  By default, TruClient doesn’t load ANY add-ons, so if you need to use an add-on you’ll have to load it into the TruClient browser.  This will also increase the CPU and memory footprint of the vusers even more.

Next Up:
Recording in TruClient – Part 2

What's Next?

Did you enjoy this article? Help spread the word by sharing:

Join the Northway Navigator Club today and get access to restricted content including our best tips and tricks. Membership is free! You will also receive free email updates by registering.

Engage in the conversation and leave a comment:

Tony Gartrell

About Tony Gartrell (10 articles)

Tony is one of Northway's newest additions to the team. He brings nearly 20 years of IT experience with him. Tony is specialized on HPE LoadRunner, with over 15 years dedicated to performance testing. He has done extensive testing of several web technologies and Citrix. Tony has also worked on several large ERP projects and is an expert at testing SAP and Oracle ERP solutions across many different industries.