How To LR GWT
How To LR GWT
Ritwik Mukhopadhyay
Performance Test Engineer
Since last few days I was working in a project where I had to test the performance of an
application what is made of Google Web Toolkit and I had HP Loadrunner 12 in my hand.
At first it seemed a big challenge to me as the technology was new and there were very few
availability of help.
Among everything the clearest one was this thread ->
http://claudihome.com/html/LR/WebHelp/Content/VuGen/t_GWT_DFE.htm
About Loadrunner: HP Loadrunner is an industry standard load testing tool that gives an entire
solution to record test script for multiple type of applications, performs the load execution and
in the end provides various graphs measuring different parameter to analyze the application’s
performance. The capability of the tool is much vaster than its description or other comparative
tools like IBM RPT or Apache Jmeter.
About GWT: Google Web Toolkit is a free open source platform that is made of Java but
serves against JavaScript!! It provides a set of core Java APIs and Widgets for client side
development to build Isomorphic Web Applications. GWT allows to write AJAX applications in
Java and then compile the source to highly optimized JavaScript that runs across all browsers,
including mobile browsers for Android and the iPhone.
GWT is supported from Loadrunner 11.5 onwards. It is also supported in IBM RPT and
Apache Jmeter. Although Jmeter is a free tool but for GWT compatibility it needs an external
plugin (ubik-jmeter-gwt-plugin.jar) what gives a free trial product key only for 10 days.
To start with GWT scripting first we need to understand what actually happens when a
GWT request is made –
Modification in header: It adds two specific request headers to recognize the client.
Modification in body: It encodes the request body in an unreadable format for optimization.
1. Set the environment:
• Get the information from the development team that in which Java version the
application is compiled.
• LR 12 uses jre 1.5 as its default java runtime environment.
• There is no way in LR Web – HTTP/HTML protocol to explicitly mention a new jre neither
you can replace LR’s default jre folder from Program Files without proper privileges.
• But to get rid of it you can define the CLASSPATH environmental variable and include
all possible locations from where you feel that any class can be used. At least in my
case it worked-
ii> In the next window Click on Add File-> Browse the .WAR file-> OK
• Enable the DFE Chain for Code Generation –
• If these headers are not present do copy the value from the generation log and add
in web_add_header function.
• The other way is to correlate the whole response without any boundary and obtain
the actual value boundary.
5. Error Resolution:
• GWT Format Mismatch: Check the headers are properly present.
• HTTP 500: Check the headers are properly present. If any request is recorded with
.cache.html extension, comment it.
• Script Regeneration Failed: Make sure the environment is properly set. Make sure the
.WAR file is the latest one.
THANK YOU