Loadrunner TruClient limitations

AjaxTruClient

Load testing of AJAX-based web applications will never be easier… that’s the message HP would have you believe should you encounter the marketing material provided by HP.

In most situations the Loadrunner TruClient script type relieves the pain of scripting AJAX applications – making script authors forget the necessity of correlating AJAX parameters or separately having to code AJAX post-backs.

However it is easy to forget that the TruClient script type is not a direct successor of the popular HTML/WEB or the AJAX Click & Script types. There are a few features which are simply missing in the TruClient stack. Here are a some that I sorely missed:

Additional attributes (~ environment variables). A nice feature for scripting. This is the instrument I usually use to configure the hostname of the System Under Test to avoid script modification if the test system is switched. Consider, that this feature is not present in earlier LR11 releases, so you might need an update to LR11 patch#2 to get the feature Utils.getEnv(“yourvariable”) work in your javascript. Its with sadness that I must say that repointing a test did not get easier with this release.

Validation: TruClient provides an out-of-the-box solution to validate visible text appearing on the webpage. However it is not possible to validate/check certain parts of the HTML markup – which is a common approach to look for the existence of certain html classes (to get around with localised applications)

Setting Cookies: Sophisticated web applications utilize client cookies. To test different scenarios, or just to perform a proper isolated test, it is a common approach to preset cookie values before the scenario iteration is started. Unfortunately the TruClient scripting does not support pre-population of cookie values.

Transactions: A powerful feature in Loadrunner scripts. If you wish to separate ajax and non-ajax responses to see the response times of the first impression of the page nexus androstenone pheromones (which spins off multiple AJAX request as it rendered) this is not possible. Transaction boundaries are interpreted as specific events of the steps (action started / action completed / Network completed / DOM loaded / Document loaded / Dialog opened). Moreover, transaction outcome (pass/fail) is not controllable programatically using javascript step either (which would come very handy doing custom page validation).

Download filters:  A powerful feature to keep the run of the performance script within the boundaries of the test lab. E-commerce application are linking up a handful of external resources such as social media (Facebook, Twitter), Google services (e.g. Maps) etc. These calls by default should be blocked during performance testing (just think about the caused overload on these third-parties or the excessing quotas, etc.). Unfortunately TruClient does not support Download filters. A clumsy workaround is to block external hosts on the lab firewall. This is not a robust solution, which is prone to error and not ideal when creating performance tests.

Disabling download non-HTML content: right, so you’d like to get rid of downloading static files (such as images, css, etc.) to get the cleanest benchmark results of the web application? Or your project relies on Content Delivery Networks which are out of scope for your benchmark tests? This worked once like charm with HTML/WEB’s Download non-HTML content feature – however it is not possible with TruClient.

We can see using the TruClient script type requires some analysis to check the necessary features are suited to your testing requirements – do not just take features for granted based on your past HTML/WEB experience. As a result you may need to develop a different testing mindset to achieve your goals – however never be tempted to soften your test requirements just because of the limitation of your tooling.

Other Articles Related to TruClient::

  • HP TruClient A Review HP Ajax TruClient – A First Glance Review I’ve just seen a video of the HP TruCient.  Wow! I’m not a fan of HP – but this looks like an impressive piece of software engineering.  I’m pleasantly surprised that HP has given the space and room for an internal team to attempt something so innovative (for ...
  • AJAX TruClient Protocol – Tips and tricks Post publishing my articles the high level review on AJAX TruClient protocol of LR and incorporating basic functionalities in AJAXTruClient, I am receiving a number of messages, comments and queries via email and on LinkedIn. Most of the queries are related to implementations of basic functions in the scripts developed on TruClient. Through this article, I would resolve some of those ...
  • AJAX TruClient – Tips and Tricks Part II The more I work on TruClient protocol, the more challenges I face (to implement more and more functionalities in scripts / config changes) and the more I explore on TruClient. This exploration sometimes take me very long to resolve issues and help me learn many new things on the way. Through this article I would ...
  • Loadrunner TruClient limitations Load testing of AJAX-based web applications will never be easier… that’s the message HP would have you believe should you encounter the marketing material provided by HP. In most situations the Loadrunner TruClient script type relieves the pain of scripting AJAX applications – making script authors forget the necessity of correlating AJAX parameters or separately having to code AJAX post-backs. However ...

3 thoughts on “Loadrunner TruClient limitations

  1. I’d be interested to know whether any of these concerns have been addressed in the new version of LoadRunner (11.5).

    I haven’t evaluated it properly myself yet. Do you have any initial observations?

  2. Hey Richard

    is it possible to create dynamic transaction-names with the TruClient-Protocol? I would like to create a dynamic transaction-name so I can see which Parameters e.g. the virtual user was searching for.

    Do you have an advice? 🙂

    Best regards,

    Lennart

  3. Hi,

    I want to know if we can program a TruClient script without record.
    Can we get rid of the snapshots in the script? If we save a copy and
    change the copy and run it, it won’t work.

    It is hard to program in Record view. It is like keyword view.
    Thanks in advance
    Karl

Leave a Reply

Your email address will not be published. Required fields are marked *