When you record a GWT-based application in VuGen, you can see a lot of illegible data in the recording – just like you see in the body of the below request.
Now, the downsides of this are:
- If you cannot decipher, what is being sent, you cannot edit the parameters. In other words, you cannot parameterize values (say username/password) in your request
- Secondly, you cannot capture dynamic values returned by your server (eg. Session id ), if the response is illegible. That means correlation is not possible
This does not happen on simple Web applications but happens only with some specific toolkits. GWT is one of them. This happens because of the way GWT works – it encodes all the relevant data before the client sends a request to the server, for it to be decoded at the server side before subsequent processing.
How can we work around this, to be able to parameterize and correlate data in our script? We use VuGen’s DFE Extenstion for GWT!
Follow the below steps:
- You will need the war file of the application that you are testing
- Go to VuGen -> Record -> Recording Options -> Data Format Extension -> Chain Configuration
- Click on the * button and add a new DFE chain. I have created one with name “test chain” here
- Click on the + button on the right hand-side frame and configure your chain to use GWT DFE
- When you click on OK, you get navigated to a window where you are asked for the location of the war file. Specify where you have stored this war file
- Once done, click on OK and you can see that your DFE is added to the chain
- Now, go to the “Code Generation” section below “Chain Configuration”. Set the options as shown below
- Click OK and you are done!
Now, when you record your script, VuGen’s GWT DFE extension will decode the GWT requests in to an XML and you can see all the parameters, your application is sending to and receiving from the server, clearly within the XML. You can parameterize and correlate them as you would do normally
The sample encoded GWT request that I mentioned above will be decoded to something like the one shown below. You can see here, the body of the request is decoded in to an XML and saved in to the parameter “DFE_BODY_5”
"<moduleBaseURL> https://test.xyz.com /home/home/</moduleBaseURL>"
Hope this helped!