java - Running Single cucumber-jvm .feature file from Gradle -
i integrating cucumber-java existing gradle java project, has focus on test automation. there no production code within project, making entire project makes little sense.
what create gradle tasks or single gradle task -d property specifies cucumber .feature file run cucumber-jvm on. of examples i've seen show how cucumber-jvm run part of build process. instead, define task testcucumber(type: test)
run single .feature file. how go doing this?
i able work using javaexec task in gradle.
javaexec { main = "cucumber.api.cli.main" classpath = configurations.cucumberruntime + sourcesets.main.output + sourcesets.test.output args = ['--plugin', 'junit:target/cucumber-junit-report.xml', '--plugin', 'pretty', '--glue', 'stepdefinitions', 'src/test/features/featurefilename.feature'] }
this assuming step definitions defined within package called "stepdefinitions".
Comments
Post a Comment