Share this page

# Add Async rules

For a list of protocols that support asynchronous communication, see 64-bit recording, Async, and IPv6 support.

When VuGen scans a Vuser script after recording or regenerating the script, VuGen may fail to identify asynchronous conversations that are included in the Vuser script. In other cases, VuGen may erroneously classify a regular synchronous step as part of an asynchronous conversation.

You can define Async rules that determine how requests to specified URLs are classified during an Async scan. Async rules may be positive or negative.

In this topic:

## Add a positive Async rule

1. Select Record > Recording Options > General > Code Generation and then click Async Options. The Asynchronous Options dialog box opens.

2. Under Asynchronous Regular Expressions, click Add Async Rule . The Add Rule dialog box opens.

3. From the Type list, select Push, Poll, or Long Poll, as required.

4. In URL Regular Expression, enter a regular expression for URLs that should be considered part of asynchronous conversations.

   Special characters that you can include in a regular expression:

   Expression | Description
   --- | ---
   . | Any single character
   * | Zero or more
   + | One or more
   ? | Zero or one
   ^ | Beginning of line
   $ | End of line
   \n | Line break
   \r | Carriage return
   [] | Any one character in the set
   [^] | Any one character not in the set
   \w | Word character
   \W | Non-word character
   \d | Decimal digit
   \D | Non-decimal digit
   | | Or
   \ | Escape special character

   To include characters such as “?” and “+” in the regular expression, insert a backslash “\” before the required character.

5. Click OK. The new rule appears in the list of Async rules for the Vuser script.

   When you regenerate the script:

   - For each push conversation that includes a URL that matches the regular expression, VuGen inserts asynchronous API functions into the Vuser script, but does not remove any of the recorded code from the Vuser script.
   - For each polling or long-polling conversation that includes a URL that matches the regular expression, VuGen inserts asynchronous API functions into the Vuser script, and may remove steps or step parameters from the generated Vuser script. VuGen removes steps or step parameters in cases where the relevant URLs are requested by running the inserted asynchronous functions - and not by running the original steps that have been removed.

   For further details, see Script modifications for asynchronous communication.

Back to top

## Add a negative Async rule

1. Select Record > Recording Options > General > Code Generation and then click Async Options. The Asynchronous Options dialog box opens.

2. Under Synchronous Regular Expressions, click Add Async Rule. The Add Asynchronous Rule dialog box opens.

3. From the Rule Type list, select Not Async.

4. In URL Regular Expression, enter a regular expression for URLs that should not be considered part of asynchronous conversations. Refer to the table above for a list of special characters that you can include in a regular expression.

   To include characters such as “?” and “+” in the regular expression, insert a backslash “\” before the required character.

5. Click OK. The new rule appears in the list of Async rules for the Vuser script.

   When you regenerate the script, steps that contain URLs that match the regular expression are not included in asynchronous conversations.

Back to top

See also:

- Async rules overview

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 25.1-25.3 All View Local Help Center View Online Help Center Version: