Hi Shubhangi,
You can accomplish your task by using one of the following approaches:
1. You can parse the test log from script. At the end of the test, you need to export your test results to the XML format by using the Log.SaveResultsAs method. To learn more about this method, please see the
"Log.SaveResultsAs" article. After that, you need to parse the generated XML file to get necessary information. The
"Exported Results Structure" article contains information about the structure of exported logs.
2. You can write a script and add event handlers to TestComplete master and slave projects.
In the master project, you need to do the following:
- add a new Network Suite Persistent variable to the project. See the
"Network Creating Network Suite Variables" help topic to learn how to do this. This variable will be modified in a slave project each time when errors are posted to the test log on a slave machine. If the value of the variable differs from the initial one at the end of the test, it means that the executed job finished with errors. Actually, this variable indicates whether a job failed or not.
- the value of the variable should be checked in the OnNetJobStateChange event handler when the status of the job is equal to
ns_Stopping. Please read the
"Creating Event Handlers - General Procedure" and
"OnNetJobStateChange Event" articles to learn more about the event and how to create event handlers in TestComplete.
In slave projects, you need to do the following:
- you need to change the Network Suite variable's value after an error was posted to the log. A new value should be assign in the OnLogError event handler. Please read the
"OnLogError Event" and
"Creating an Event Handler for the OnLogError Event" articles for details.
I hope this helps.