When VuGen records asynchronous calls on remote objects, you can specify how the calls are handled in the Microsoft .NET > Recording - Recording Options. These options are particularly relevant for .NET Remoting and WCF environments.
You can configure VuGen to one of the following options:
Call original callbacks by default. Uses the recorded application's original callback when generating and replaying the script. If the callback method is explicitly excluded by a filter, the callback will be excluded even if you enable this option. If your callbacks perform actions that are not directly related to the business process, such as updating the GUI, then make sure to disable this option.
Generate asynchronous callbacks. This option defines how VuGen will handle callbacks when the original callbacks are not recorded. This is relevant when the above option, Call original callbacks is disabled or when the callbacks are explicitly excluded.
When you enable this option, it creates a dummy method which will be called during replay instead of the original callback. This dummy callback will be generated in the callbacks.cs section of the script.
When you disable this option, VuGen inserts a NULL value for the callback and records the events as they occur.
Note: VuGen supports the Async and Await modifiers, so if your AUT (application under test) uses these modifiers, they will be included in your script.
The following segment shows script generation for a Calculator client, when Generate asynchronous callbacks is enabled.
To display the callback method, OnComplete1, you click on the callback.cs file in the left pane.
The following segment shows script generation when the option is disabled. VuGen generates a NULL in place of the callback and records the events of the callback as they occur.
Note: If you recorded a script with specific recording options, and you want to modify them, you do not need to re-record the script. Instead, use the Record > Regenerate Script option to recreate the script with the new settings.