Last week, I had a chance to work on the AJAX TruClient protocol launched in the latest version of LR (LR 11). I was amazed to see a totally different manner of scripting followed with this protocol. The object identification technology made my scripting and debugging task a piece of cake. The non-requirement of dynamic correlation reduced the scripting complications and thus time.
If TruClient becomes popular in the performance test domain, performance testers won’t be judged on their scripting abilities. In fact scripting will carry very little weight among the different skills required to be a good performance tester. Using this technology, even a high school child can script web applications.
AJAX TruClient Basics –
- AJAX TruClient integrates with Mozilla firefox during script development. The tester doesn’t need to install Mozilla firefox separately as it is embedded with LR 11. The current version of Mozilla distributed with LR is Firefox 3.6.3.
- Mozilla firefox browser used during interactive recording shouldn’t be modified with plugins (such as Flash Plugins) and shouldn’t be changed (except for proxy and configuration settings). Moreover, one must not upgrade the firefox browser to a later version.
- Firefox’s firebug extension provides additional information on application object properties, executes JS on the fly, explores DOM, visualizes CSS matrix, etc and thus could significantly improve script debugging capabilities.
To install firebug extension to TruClient FF browser –
a) In Ajax TruClient script, Go to VUgen -> Tools -> AJAX TruClient Browser options
b) Select ‘extensions’ tab -> Click Get Add ons
c) Search for ‘Firebug’. Find extension from search results and click on ‘Add to Firefox’
- In some applications, different events get executed depending on the duration of mouse over action. In the current version of LR (11th version with 4th Patch), the mouse over event can’t be recorded with time duration. This limitation can be worked around by using wait() function. A wait function with X seconds (where X is the duration of mouseover as required) can be added between the mouse over event and the next action. The vuser’s mouse will then stay on the last position for X seconds, thus allowing the required action to execute.
- While developing TruClient scripts, proxy settings can be specified in both ways –
- In the script ‘Run-Time Settings’ dialog, go to General->Other Settings and make changes in “Proxy Selection” option.
- Click on ‘Edit browser options’ in record toolbar in VUGen main window. Click on ‘Proxy’ tab and change the settings.
If I was to compare this latest technology (or protocol) with the other web protocols, I would state:
AJAX TruClient – High level benefits:
1) It works with many frameworks like – Jquery, Ajax, YUI, GWT, JS, etc. Rich internet applications developed on Web 2.0 technologies can be easily scripted and replayed.
2) Script development is interactive with script flow at one side of the window and application opened in the browser at the other. This makes scripting with AJAX TruClient protocol easier and faster, as compared to that of the other web protocols like Ajax Click & Script or Web (HTTP/HTML), etc
3) Object identification features minimize the use of complex correlations and make script more dynamic. Thus the scripts become more resilient to backend changes.
4) Complex client side events like Mouseover, slider bars, calendar items, dynamic lists, etc can be very easily scripted, customised and replayed.
HTTP/HTML Protocol test cycle –
Ajax TruClient test cycle –
6) The rich visual UI and easy steps make scripting fun to the developer.
7) Using AJAX TruClient, API + GUI response time can be obtained, as opposed to other protocols that provide only API response time.
AJAX TruClient – Improvement opportunities
- AJAX TruClient integrates with Mozilla firefox during script development. It doesn’t integrate with any other browser and hence applications that don’t work effectively on firefox show scripting / replaying issues.
- The rendezvous function is not available in AJAX Truclient for current version of LR (V 11 Patch 4).
- IP Spoofing helps in assigning different IP addresses to different vusers during test execution and thus allows us to create a test scenario more close to production scenario. In current version of LR 11 (Patch 4), IP Spoofing isn’t supported with AJAX TruClient protocol.
- TruClient protocol doesn’t support recording of Flash or Silverlight applications. In order to record Flex or Silverlight events, it is recommended to use Flex or Silverlight protocols respectively.
- The memory footprint of an AJAX TruClient Vuser is significantly higher compared to that of other web protocol vusers. Thus AJAX TruClient tests demand more loadgenerators compared to other web protocol tests.