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

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -