For a list of protocols that support asynchronous communication, see 64-bit recording, Async, and IPv6 support.
Asynchronous communication is not supported for replaying a Vuser script in WinINet mode.
Create a new Vuser script
- Click the New Script button on the VuGen toolbar.
- Select Web - HTTP/HTML, or one of the other Vuser protocols that support asynchronous communication.
- Click Create. VuGen creates a basic Vuser script.
Enable Async Scan
- Select Record > Recording Options.
- Under General, select Code Generation.
- 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.
Record the business processes using the typical VuGen recording process
- Click Record on the VuGen toolbar.
- Enter the required information in the Start Recording dialog box, and then click Start Recording.
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.
Generate, scan, and modify the Vuser script
- After you click Stop Recording, VuGen generates the Vuser script.
- After generating the script, VuGen scans the generated script to locate instances of asynchronous communication.
- 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.
- 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.
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:
- Open the Vuser script in the Editor.
- 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.
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.
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.
- 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.
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.
- Review the callback implementation and make modifications to the script as required. For details, see Implement callbacks.
- 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.
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.
- Once all parameters are initialized correctly, run the script to make sure that the asynchronous conversation runs as expected.