Back to Blog

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

Back to Blog