IBM Support

Rational Robot stops responding at WaitForSingleObject

Troubleshooting


Problem

Handling child processes causes IBM Rational Robot playback halts.

Symptom

When your application under test (AUT) is based on Microsoft® Visual C++ 6.0, and the application uses CreateProcess and WaitForSingleObject functions to handle child processes, IBM® Rational® Robot stops responding.

Cause

This is a known issue with Rational Robot. It is caused when Rational Robot and the AUT are in a Windows message loop. Rational Robot is waiting for control to be returned while the AUT is also waiting for something to happen.

Resolving The Problem

To prevent this problem, modify the AUT to yield control to other application while waiting for the child process to initialize itself, or use a Module VP. You could also create a List VP against the Task Manager to achieve this.

For example, instead of a WaitForSingleObject with 0 as the timeout, the developer could set a valid timeout and perform this in a loop.

Also allow other applications to process the Windows message pump if this is currently blocked. See the associated URL for further information about the Windows message pump.

Example:
change from
:: WaitForSingleObject(cProcess. INFINITE);
to
:: WaitForSingleObject(cProcess, 10000); //set timeout value of 10 seconds

Another alternative is to use a Module VP instead of the WatiForSingleObject function (comment out the WatiForSingleObject within the AUTprior to this).

However, please note that a Module VP doesn't capture Console applications processes (e.g. cmd.exe). Robot is not optimized for handling CMD.EXE or Console applications.

If this is the case, you can try to create a List Verification Point against the Task Manager, and set wait flags against this Verification Point.

[{"Product":{"code":"SSSHDX","label":"Rational Robot"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Recording","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.0;7.0.0.1;7.0.0.10;7.0.0.2;7.0.0.3;7.0.0.4;7.0.0.5;7.0.0.6;7.0.0.7;7.0.0.8;7.0.0.9;7.0.1;7.0.1.1;7.0.1.10;7.0.1.11;7.0.1.12;7.0.1.2;7.0.1.3;7.0.1.4;7.0.1.5;7.0.1.6;7.0.1.7;7.0.1.8;7.0.1.9;7.0.2;7.0.2.1;7.0.2.2;7.0.2.3;7.0.3;7.0.3.1;7.0.3.2;7.0.3.3;7.0.3.4;7.0.3.5;7.0.3.6;7.0.3.7;7.0.3.8;7.0.3.9","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21165744