Data Format Extension support—or DFE support for short—enables easier scripting of web applications by providing the ability to decode and encode formatted data that is exchanged between the client and the server. This enables easier correlation and parameterization of the generated Vuser scripts.
Web - HTTP/HTML Vuser scripts
Web - HTTP/HTML steps inside Flex Vuser scripts
When to use DFEs
When you record a Vuser script, VuGen records the HTTP requests and responses that are passed between the client and the web server. The data in these HTTP requests and responses is often encoded. For example, some of the data may be in binary format. The encoded data may be in the HTTP query string, headers, body, or cookies. When the encoded data is included in a Vuser script, the resulting script will contain data that is difficult to decipher. This makes it difficult to identify text strings that can be used for parameterization and correlation.
The script segment below shows a section of a Vuser script that was generated while recording business processes on a GWT-based application. Notice how some sections of the script contain encoded data and are therefore difficult to decipher.
LoadRunner uses data format extensions (DFEs) to resolve the difficulties that arise from encoded data in Vuser scripts. DFE support allows easier creation of Vuser scripts by providing the ability to decode the encoded data that is exchanged between the client and the server. By providing the decoded format of the data, the information is presented in the Vuser script in a readable format that enables you to correlate and parameterize the script as required. When the script is replayed, the DFE support re-encodes the modified Vuser script, and enables the Vuser to send the correctly encoded request to the server.
LoadRunner includes a number of pre-defined DFEs. Each DFE is able to decode and encode a specific type of data. For example, the GWT DFE decodes GWT data to XML format when a script is generated, and it encodes XML-formatted data to GWT-formatted data before the script is replayed. For a full list of the pre-defined DFEs, see Data Format Extension List.
When a DFE is applied to a Vuser script and the script is then regenerated, the DFE modifies the script and replaces the encoded data with decoded data. For details on how the script is modified, see How DFEs Modify a Vuser Script.
You enable DFE support for each Vuser script that requires decoding of encoded data. When DFE support is enabled, the DFE support is applied in the following circumstances:
Each time the script is generated (after recording) or regenerated. The DFEs are applied to decode the encoded data to produce a script that is easy to decipher.
Each time the script is run. The DFEs are applied to re-encode the decoded data to produce HTTP messages with encoded data in a format that is expected by the server.
Note: In addition to applying DFEs when a script is generated or replayed, it is possible to apply a DFE to a selected string in a Vuser script. For details, see Applying DFEs to a String.
In some scenarios, decoding of encoded data must be performed in a number of stages, until the fully decoded data is produced. Each stage in the conversion process is performed by applying a specified DFE. For example, encoded data from a response may be decoded by applying three DFEs - first DFE-1, then DFE-2, and then DFE-3. In each stage, the output from one DFE is the input to the next DFE, until the fully decoded data is produced.
The series of DFEs that are required to decode encoded data is defined in a chain. For example, you could create a chain called DFE-Chain-1 that includes three DFEs: DFE-1, DFE-2, and DFE-3. The sequence of the DFEs inside a chain is significant—the sequence indicates the order in which the DFEs are applied to the encoded data.
If only a single DFE is required to decode encoded data, the DFE must still be included in a chain.
Assigning DFE chains
HTTP messages can be divided into a number of sections, including a body, headers, cookies, and a query string. After you define the DFE chains that will be applied to decode and encode a Vuser script, you must specify to which sections of the HTTP messages the DFE chains will apply. Because each HTTP message has only one Body section and one Query String section, you can specify only a single DFE chain to apply to each of these sections. In contrast, each HTTP message can contain numerous headers and cookies. Consequently, you can specify a particular DFE chain to apply to each header and cookie. For details, see Apply DFE Chains to Sections of the HTTP Message.
Replaying Vuser scripts that contain DFEs
When you replay a Vuser script that contains DFE functionality, various messages are added to the Replay log in VuGen's Output pane. Make sure to check these messages to ensure that the DFE functionality is correctly implemented. For further details, see Troubleshooting - Data Format Extension (DFE) .
- Implement Data Format Extension (DFE) Support
- Implementing GWT-DFE Support
- For details on creating custom DFEs (advanced users only), see the Software Support Knowledge Base.