Is there a class/variable of karate available to get the details of failed scenarios like failed Scenario name, count etc when run using TestRunner

Viewed 36

I want to get the details of the failed testcase after running it using TestRunner class. I was able to get few details like error messages, failed count of scenarios and feature files using the Result class of karate.

Results results = Runner.path("classpath:errorData/pass.feature").parallel(5);
String errmsgs = results.getErrorMessages();
List<String> err = results.getErrors();
int failcount = results.getFailCount();

Now I wanted to know if there is a way to get the details like testcase status, failed scenario, failed step. Any input will be appreciated. Thanks in advance

1 Answers

If you can't find what you need in the Result class, please assume the answer is no. Since Karate is open source, you are welcome to figure this out yourself or contribute code for anything missing.

Related