18 January 2026:


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 ?

anandkiran2007anandkiran2007 Members
edited October 2013 in Sahi Pro
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.

Answers

Sign In or Register to comment.