Parsing of GWT Requests


GWT settings

WAPT Pro uses Java to make conversion of GWT data to XML. Therefore, you should have Java installed on your computer. The version of installed Java should be the same or higher than the one used on the server you are testing.

Go to WAPT Pro settings, switch to the Modules tab and specify a path to java.exe file:

Parsing a profile containing GWT data


If a recorded profile contains GWT data, you can parse it to represent this data in XML format. You should parse each profile separately. This is done by a special button in profile properties: Parse GWT requests.



Clicking this button opens the GWT Parameters dialog:



Here you should specify paths to the following files (WAPT Pro needs these files for parsing):

  1. Jar/war archives with the compiled Java classes of your site/application
    You can add these files using the Add button in the upper pane. To be processed correctly, jar/war archives should have the certain structure.

  2. Serialization policy files (having the extension .gwt.rpc)
    These files are listed in the lower pane. Using the Browse button, you can change the path of selected policy file.

After adding the necessary files, click the Process button to start the parsing process. WAPT Pro runs Java and transmits all required parameters to it. In case of successful parsing you will see a dialog like this one:



Close this dialog. GWT data in recorded requests and server responses of current profile is converted to XML now. Click on any request of this profile containing GWT data, switch to its "Response processing" tab and select the GWT view. You will see the body of parsed response represented in the XML form:



Now switch to the "Properties" tab, select GWT in the "POST parameters type" combo-box:



and you will see the parsed request in the XML form:



You can edit the value of any tree leaf and the whole XML document for any tree node. It is also possible to use WAPT Pro internal variables to insert session-dependent values here. As a result when the profile is executed, the values of these variables will be passed inside the corresponding parts of GWT code.

To insert a variable, enter the $ sign and you will see a prompt with the list of available variables. Select a desired variable in the list to insert it in the XML code.

Note that you cannot use WAPT Pro functions in the XML code directly. You should define a variable which is calculated as a result of the necessary function, and then insert that variable in the XML code. You can use the standard XPath function. In the simplest case this function returns the value of a node inside an XML document using the path to that node.

During test run XML code of parsed requests will be automatically converted back to GWT and sent to the server.

Parsing the certain request containing GWT data


You can parse some particular request containing GWT data (not the whole profile). Select a desired request in the left pane, switch to its "Properties" tab, and select GWT in the "POST parameters type" combo-box:



If this request was not parsed yet, you would see the parsing dialog (the same one as for parsing a profile) where you should specify 2 files: jar/war archive with Java classes and serialization policy file having the extension .gwt.rpc. Click the "Process" button. After successful conversion you will see the content of this request in the XML form.

If the module is not installed


If the Module for GWT Testing is not installed on your system, you will not be able to make conversion of GWT data to XML. The "Properties" tab of recorded requests looks in the following way in this case:



And here is "Response processing" tab, response body:



And request body:

Next page