How To get the test case status in a condition
Posted: Wed Jul 04, 2018 12:43 pm
Hi,
I'm trying to receive the test case status in the teardown.
I'm using the following code:
This returns me the correct status for "normal" test cases, but if the testcase is inside a conditional smart folder it returns always the status "ignored".
How do I get the correct testcase status?
I'm trying to receive the test case status in the teardown.
I'm using the following code:
Code: Select all
ITestContainer TestContainer = TestSuite.Current.CurrentTestContainer;
while(!TestContainer.IsTestCase){
TestContainer = TestContainer.ParentContainer;
}
Report.Log(ReportLevel.Info, TestContainer.Status.ToString());
How do I get the correct testcase status?