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:
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.
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 roo...
- 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...
- 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 l...
- 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...