Applying DFE Chains

Applies to:

  • Web - HTTP/HTML Vuser scripts

  • SAP - Web Vuser scripts

  • Web - HTTP/HTML steps inside Flex Vuser scripts

After you have defined the DFE chains that are available to a Vuser script, enabled and configured DFE support, you must define to which sections of the HTTP messages to apply the DFE chains.

 

Apply a GWT-DFE to your script before recording

To apply GWT-DFE before recording, perform the following actions:

  1. Open Record > Recording Options.
  2. Display the Data Format Extension > Chain Configuration tab. For details on the dialog box options, see Data Format Extension > Chain Configuration Recording Options.
  3. Click the Add DFE button.

  4. In the dialog box that opens, select GWT Extension and click OK.

  5. 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 Configure DFE Support.

After generating the script using GWT-DFE, you will get a readable LoadRunner API that includes the request in XML.

Back to top

Apply a DFE to sections of HTTP messages

This section describes how to apply the DFEs to specific sections of a Vuser script, to take effect when the script is generated or regenerated.

  1. Open the Vuser script in VuGen.
  2. Click Record > Recording Options > Data Format Extension > Code Generation.

  3. [Optional] In the <message section> pane, click Body add then select the chain that will be applied to the message body.
  4. [Optional] In the <message section> pane, click Headers add then select the chains that will be applied 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.

  5. [Optional] In the <message section> pane, click Cookies add then select the chains that will be applied 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.

  6. [Optional] In the <message section> pane, click Query String add then select the chain that will be applied 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 to a string

To apply a DFE to an encoded string in a Vuser script:

  1. Open the script in VuGen, and select the encoded text string.
  2. 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. For details on how to define a DFE chain, see Define a Chain of DFEs.

    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 will add a counter to the parameter name, and increment the counter as required.

Back to top

See also: