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.