Web - HTTP/HTML Vuser scripts
SAP - Web Vuser scripts
Web - HTTP/HTML steps inside Flex Vuser scripts
Configure Code Generation settings
Follow these steps to configure the code generation settings:
- Open the Vuser script in VuGen.
Click Record > Recording Options > Data Format Extension > Code Generation.
For details on the dialog box options, see Data Format Extension > Code Generation Recording Options.
Under Configuration, from the Format list, select the parts of the Vuser script to which the DFEs will be applied.
Code and snapshots. Applies DFEs to convert the Vuser script code and the snapshot data.
Snapshots. Applies DFEs to convert the snapshot data only - not the Vuser script code.
- Select the Verify formatted data check box to check the results of the data conversion by converting the converted data back to the original state, and then verifying that it matches the original data.
Set up GWT-DFE headers
As part of the GWT-DFE support for HTTP/HTML scripts, you must instruct VuGen to record x-gwt-permutation headers when recording business processes. This procedure can be performed at any stage of the GWT-DFE support implementation process.
- Select Record > Recording Options > HTTP Properties > Advanced and then click Headers.
- In the Headers dialog box, select Record headers in list.
- From the Headers list, select the x-gwt-permutation header check box.
Auto-detection of GWT Remote Procedure Calls (RPCs)
When VuGen generates or regenerates a Vuser script, VuGen scans the HTTP headers in the requests that are sent to the server. If VuGen detects both a x-gwt-module-base text string and a x-gwt-permutation text string in any of these HTTP headers, it displays a warning in the VuGen Error tab, recommending that you enable GWT-DFE for the Vuser script.
Note: VuGen will continue to issue the above warning - each time the script is generated or regenerated - until the GWT-DFE is enabled.
Specify classpath entries
To enable VuGen to decode the complex data in the HTTP communication, you must identify the .war file that is used by the web application. Occasionally, an application uses .jar files. All considerations below about .war files apply equally to .jar files.
The .war file contains the logic used by GWT to encode and decode the information in the HTTP communication. VuGen needs access to the .war file so that VuGen can perform similar encoding and decoding procedures. Typically, these files are located on the application server, under the web applications folder.
Note: Make sure that the .war file that you associate with the Vuser script is the most up-to-date file for your application. The .war file is changed each time modifications are made to the web application. GWT-DFE support will function correctly only if the most up-to-date .war file is available.
Before you apply the DFE chains, you must specify the classpath entries that are associated with the application that is operated by the Vusers. To assign the classpath entries, you must have access to the GWT WAR folder that is used by your development team. The WAR folder includes the following file types:
- *.gwt.rpc files
- *.jar files
- *.class files
Specifying the classpath entries
Select Record > Recording Options > Data Format Extension > Chain Configuration.
Under Chains, click to create and name a new DFE chain.
In the Add Data Format Extension dialog box, select GWT Extension and click OK.
In the Add GWT dialog box, specify the classpath entries:
If the classpath entries are contained in a single .war file, click and then specify the location of the .war file.
Note: If you have write permissions in the folder containing the .war file, it automatically creates a new folder with the extracted contents. It adds the specific classes/jars to VuGen in the following structure:
<ServerDir>\<applicationDir>\<MyGWTApplication>\<SomeDirContaining .gwt.rpc file>
If you do not have write access, it will just add the .war file without extracting its contents.
If the classpath entries are not contained in a single .war file:
- Click to add the folder that contains .gwt.rpc files.
- Click to add the application classes folder.
- Click to add the application JAR files from the WEB-INF\lib folder.
Note: If the location of the classpath entries is not the same on the computer on which the script was recorded and the computer on which the script will be replayed, then you must modify the runtime settings for the script. Select Replay > Runtime Settings > Data Format Extension > Chain Configuration and specify the location of the classpath entries on the computer on which the script will be replayed.
Select Recording Options > Data Format Extension > Code Generation.
Select the Enable data format extension check box.
Under Configuration, select Code and snapshots from the Format list.
Under Chain Assignment, select Body and select a chain. Select Headers and choose the same chain.