How to get the test case execution status(pass/fail) after the test run?
Hi, A newbie question - I have a set of tests which are being executed in TestComplete 12.5.
1. How do we add assertion for the test case's expected result?
2. Also, can you assist me with the script to get test execution status (such as pass or fail) at the end of every test run as I am planning to write the status against each test case in excel?
Thanks.
For your assertions, take a look at Property Checkpoints:
https://support.smartbear.com/testcomplete/docs/testing-with/checkpoints/property/about.html
Here's some information about exporting log results. See if this works for what you want. If not, give us some more specific details about what you are trying to do and we can help further.
https://support.smartbear.com/testcomplete/docs/testing-with/log/working-with/exporting/about.html
I use this in an on test stop event handler:
function GetTestStatus() { Let result = "CHECK"; try { if(Log.ErrCount == 0) { result = "PASSED"; } else { result = "FAILED"; } } catch(err) { Log.Warning(err); } finally { return result; } }
It returns the number of errors in the currently running test item.