Apply DFE chains
This topic describes how to apply the DFE chains to sections of a Vuser script, to take effect when the script is generated or regenerated. You do this after you have configured support for the DFE chains, as described in Enable and configure DFE support
Web - HTTP/HTML Vuser scripts
SAP - Web Vuser scripts
Apply DFEs to sections of HTTP messages
You can apply the DFE chains to specific sections of the HTTP messages.
To apply DFE chains to specified sections:
- Open the Vuser script in VuGen.
Click Record > Recording Options > Data Format Extension > Code Generation.
- [Optional] In the <message section> pane, click Body add then select the chain that will be applied to the message body.
[Optional] In the <message section> pane, click Headers add then select the chains to apply to the message headers.
Note: For VuGen to correctly assign the chain to a specific header, the entry in the Name column must be exactly the same as the name of the header in the message.
[Optional] In the <message section> pane, click Cookies add then select the chains to apply to the message cookies.
Note: For VuGen to correctly assign the chain to a specific cookie, the entry in the Name column must be exactly the same as the name of the cookie in the message.
- [Optional] In the <message section> pane, click Query String add then select the chain to apply to the message query string.
Note: Whereas you can modify only the default chain for the Body and Query String sections, you can add multiple chains for the Headers and Cookies sections.
Apply a DFE chain to a string
You can apply DFEs to an encoded string in a Vuser script.
To apply a DFE chain to a string:
- Open the script in VuGen, and select the encoded text string.
Right-click inside the selection, click Decode with DFE, and click the name of the chain that contains the DFEs to decode the encoded string.
VuGen replaces the selected text with a parameter, and adds a web_convert_from_formatted function that contains the decoded equivalent of the originally selected text.
Note: To change the name that VuGen assigns to new parameters, right-click some encoded text in the Vuser script, click Decode with DFE > Advanced, and then specify the parameter name in the Target Parameter box. VuGen adds a counter to the parameter name, and increments the counter as required.
Apply a GWT-DFE to your script before recording
To apply GWT-DFE before recording, perform the following actions:
- Open Record > Recording Options.
- Display the Data Format Extension > Chain Configuration tab. For details on the dialog box options, see Data format extension > Chain configuration recording options.
Click the Add DFE button.
In the dialog box that opens, select GWT Extension and click OK.
The Edit GWT dialog box opens.
To add the most recent WAR or JAR files, click the Add file button and navigate to the file location. For details, see Enable and configure DFE support.
After generating the script using GWT-DFE, you will get a readable LoadRunner API that includes the request in XML.