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.
What is the actual functionality of "ecBef":0,"ecAft":0 in _testcase API ?
I have a scenario that before running the actual test case I want to make sure my pre-requisites are successful. For that i have done the below code to check the same
var $preRequisite = _testcase("PR-1","test")
$tpreRequisite .start();
addUser("User1");
$tpreRequisite .end();
if($preRequisite.status == "SUCCESS")
{
var $t1= _testcase("TC-1","Test Case 1")
$t1.start();
//do other actions
$t1.end();
}
The above code is working with no issues. But in the log since we have used _testcase it will show 2 test cases in the report.
My requirement is before I start executing $t1 I should check the status of my pre-requisite without considering it in the report. Is there any method to do it. In _testcase API i have noticed "ecBef" and "ecAft" , is this something like @TestBefore and @TestAfter in TestNG ? if so how to use them in our scripting ?
Regards
Anand.
var $preRequisite = _testcase("PR-1","test")
$tpreRequisite .start();
addUser("User1");
$tpreRequisite .end();
if($preRequisite.status == "SUCCESS")
{
var $t1= _testcase("TC-1","Test Case 1")
$t1.start();
//do other actions
$t1.end();
}
The above code is working with no issues. But in the log since we have used _testcase it will show 2 test cases in the report.
My requirement is before I start executing $t1 I should check the status of my pre-requisite without considering it in the report. Is there any method to do it. In _testcase API i have noticed "ecBef" and "ecAft" , is this something like @TestBefore and @TestAfter in TestNG ? if so how to use them in our scripting ?
Regards
Anand.
Answers
Do you have any solution for my above query ?