s-glatshtein
4 years agoNew Contributor
Running cucumber tests from external jar
Hello!
I'm trying to package my cucumber tests and run them using a small java program. I annotate the test class with `@CucumberOptions` and i run the class using JUnitCore. It works pretty well, but only with specific configurations:
- If the feature is either "classpath:file.feature" or under a folder such as "somefolder/file.feature". It doesn't work if i put the feature file in the root or in a resource folder
- If the step definitions class has a package anypackage in the start. This doesn't work when there's no package.
I've attached the runner class that works as a sample. I use a custom tool to report my tests to an external platform.
I want to make it work regardless of how we define the feature and glue in the runnable class. Anyone has any idea how?