1

I'm trying to get the name of the current executing runner class, e.g. for:

@RunWith(Cucumber.class)
@CucumberOptions(
features={"Features"},
glue={"src.stepdefinition"},
monochrome=false
)
public class HelloWorld {
}

I need to have the class name "HelloWorld" available in my java code. Does anybody know how to get it? I've already tried this: http://ramblingsofaswtester.com/2013/04/15/cucumber-test-name-and-tags-on-feature/ and this definitly goes to right direction, but it doesn't contains the runner class name.

EDIT: Because I use Maven I can access the

System.getProperty("test")

which contains the package name with class name.

user24502
  • 1,662
  • 4
  • 16
  • 21

0 Answers0