Contributions
Re: Running cucumber tests from external jar
Anyone has any ideas? How can i use cucumber with these CucumberOptions?4 years agoPlace Cucumber OpenCucumber Open3.5KViews0likes0CommentsRe: Running cucumber tests from external jar
About the first part, what do you mean that the jar should be executable? I am running the test class using JUnitCore class, not with CLI. About the second part, I am using build.gradle and all the latest dependencies for all (or what was the latest). Here's the depedencies i use in my runner program: dependencies { // https://mvnrepository.com/artifact/org.testng/testng // implementation group: 'org.testng', name: 'testng', version: '7.3.0' implementation group: 'junit', name: 'junit', version: '4.12' compile group: 'org.testng', name: 'testng', version: '7.3.0' // https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine implementation group: 'io.cucumber', name: 'cucumber-java', version: '6.10.0' implementation group: 'io.cucumber', name: 'cucumber-junit', version: '6.10.0' implementation group: 'io.cucumber', name: 'cucumber-testng', version: '6.10.0' // https://mvnrepository.com/artifact/org.junit.platform/junit-platform-launcher implementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.7.0' }4 years agoPlace Cucumber OpenCucumber Open3.6KViews0likes1CommentRunning 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 thefeature andgluein the runnable class. Anyone has any idea how?4 years agoPlace Cucumber OpenCucumber Open3.5KViews0likes3Comments