I have created a test listener for getting the test case name and test case ID before a test case runs. My listener class looks like this;
class Sample
{
@BeforeTestSuite
def sampleBeforeTest(TestCaseContext context)
{
println context.getTestCaseId()
String status= context.getTestCaseStatus()
println status
}
}
But when I run the suite, I am getting null pointer exception. Please see the below snapshot.
Please let me know how do I get the test case name and ID from context object.