Forum Discussion
3 Replies
Sort By
Hi,
I recommend you organizing your test flow with test items. TestComplete can stop a test item when an error occurs during its execution and then proceed to the next test item. You can find information on this feature in the Tests and Test Items help topic.- GadzillaContributorHi,
You can also try something like this:
function Smoke_Main()
{
Smoke_TestCase1();
Smoke_TestCase2();
}
function Smoke_TestCase1()
{
try
{
// steps for execution
if(! step_passed)
throw {message: "Can't continue test cases execution"; description: "critical error"}
// steps, which will be executed in case everything works fine.
}
catch(e)
{
Log.Error(e.message, e.description);
}
finally
{
// execute postconditions for the test case
}
}
So you can put all your steps into try..catch block, and thrown an error when you want to finish current test case execution. - oychwContributorDavid and John:
thanks! I use item,now it works well.
Related Content
- 6 years agoranujn
- 3 years agobafageeh
- 2 months agoNicolaFilosa_SE
Recent Discussions
- 6 hours agoSvetaG