18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
How to terminate executing the test suite
I have a suite where it has several scripts. First script which add an entity and all other scripts expects the entity to be there. If first script fails to add the entity due some defect there is no point running rest of the tests in suite.
So I need some kind of mechanism or flag where then Sahi or test runner interprets whether to proceed or not.
Thanks,
Sumeet
So I need some kind of mechanism or flag where then Sahi or test runner interprets whether to proceed or not.
Thanks,
Sumeet
Comments
It is not possible to terminate the suite file execution based upon the result of the execution of the First Script.
If you want to execute the second script based upon the result of the first script,append an Condition at the end of the first script and if satisfies, include the secondScript else logExceptionAsFailure and This can be repeated for all the Script to execute one after another.
Eg:
var $a=_exists(Element);
if($a){
_include("script2.sah");
_include("script3.sah");
.........
.........
.............
}
_logExceptionAsFailure("Failure");
This might help you.
Regards,
Theeran.
if(_conditon(_exists($element))){
execute test
} else {
skip test
}
OR have capability to set such flag inside the script and the test runner will check it before executing each script if flag is set to terminate it will terminate otherwise it will continue
Trying to understand your requirement: If tests are run in parallel in a suite, how do you think one script should depend on the other?
Would it make sense to just split the suites into two, and run the second one only if the first suite passed?
Regards,
Narayan