Create an asynchronous Vuser script


Create a new Vuser script

  1. Click the New Script button on the VuGen toolbar.
  2. Select Web - HTTP/HTML, or one of the other Vuser protocols that support asynchronous communication.
  3. Click Create. VuGen creates a basic Vuser script.

Back to top

Enable Async Scan

  1. Select Record > Recording Options.
  2. Under General, select Code Generation.
  3. Make sure that the Async Scan check box is selected. This instructs VuGen to scan the Vuser script after recording, locate asynchronous communication, and insert the appropriate asynchronous functionality.

Back to top

Record the business processes using the typical VuGen recording process

  1. Click Record on the VuGen toolbar.
  2. Enter the required information in the Start Recording dialog box, and then click Start Recording.
  3. Perform the business processes that the Vuser will emulate, and then click Stop Recording on the floating toolbar.

    Note: In order for VuGen to be able to successfully identify the asynchronous behavior in a Vuser script, the asynchronous communication must contain at least the required minimum number of client requests and server responses. For details, see Asynchronous communication types - request and response sequences.

Back to top

Generate, scan, and modify the Vuser script

  1. After you click Stop Recording, VuGen generates the Vuser script.
  2. After generating the script, VuGen scans the generated script to locate instances of asynchronous communication.
  3. If VuGen locates any instances of asynchronous communication, VuGen modifies the script to enable the script to run and emulate the asynchronous behavior. For details, see How VuGen modifies a Vuser script for asynchronous communication.
  4. The Design Studio opens. Click the Async tab. The Async tab displays a list of all instances of asynchronous communication that VuGen located in the Vuser script.

Back to top

Review the modifications that VuGen made to the script

For each asynchronous conversation that appears in the Async tab of the Design Studio, perform the following tasks:

  1. Open the Vuser script in the Editor.
  2. Locate the web_reg_async_attributes step that starts the asynchronous conversation. Ensure that the web_reg_async_attributes step is located at the start of the asynchronous conversation.
  3. Make sure that the URL parameter in the web_reg_async_attributes step is the same as one of the URLs that are specified in the action step that follows the web_reg_async_attributes step.

    For details on the web_reg_async_attributes step, see Define the start of an asynchronous conversation.

  4. Notice that the step comment before the web_reg_async_attributes step contains a TODO token. The TODO token indicates that you should check the relevant callback implementations in the AsyncCallbacks.c extra file.

  5. Locate the web_stop_async step that ends the asynchronous conversation. Ensure that the web_stop_async step is located at the end of the asynchronous conversation.
  6. Make sure that the web_stop_async step runs as required. For details, see Fine-tune the end of an asynchronous conversation.

    For details on the web_stop_async step, see Define the end of an asynchronous conversation.

  7. Review the callback implementation and make modifications to the script as required. For details, see Implement callbacks.
  8. Make sure that all counter and complex string parameters are set correctly. Notice that for each such parameter, a TODO comment exists and has a matching task in the Tasks pane. For details, see Parse URLs.
  9. Check the Tasks pane for specific actions that are required in order to complete the script development process. Such actions may include verifying callback implementations, or verifying the implementation of specific parameters.

  10. Once all parameters are initialized correctly, run the script to make sure that the asynchronous conversation runs as expected.

Back to top