Skip to content

Instantly share code, notes, and snippets.

@64lines
Created August 24, 2017 00:34
Show Gist options
  • Select an option

  • Save 64lines/6a4797a005c22a2289a25066b57f5430 to your computer and use it in GitHub Desktop.

Select an option

Save 64lines/6a4797a005c22a2289a25066b57f5430 to your computer and use it in GitHub Desktop.
apply plugin: 'java'
project.ext {
cucumberVersion = '1.2.5'
junitVersion = '4.12'
}
/**
* Runs a single feature file using -PfeatureFile parameter, i.e:
*
* gradlew cucumber -PfeatureFile=cucumber_test/SomeAutomatedTest.feature
*/
task cucumber() {
dependsOn assemble, compileTestJava
javaexec {
main = "cucumber.api.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = ['--plugin', 'html:AcceptanceResults',
'--plugin', 'pretty',
'--glue', 'javacodefolder',
project.hasProperty('featureFile') ? project.property("featureFile") : ""]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment