Hi David,

you can declare this dependency directly in your cucumber task by adding the test runtime classpath to the classpath of your javaexec task

task cucumber(type: JavaExec) {

    dependsOn assemble, testClasses
    main = "cucumber.cli.Main"
    classpath = configurations.cucumberRuntime + sourceSets.test.runtimeClasspath
    args = ['-f', 'pretty', '--glue', 'com.rackspace.example.stack.step_definitions', 'src/test/resources']
}

regards,
René


27. Februar 2012 17:29
I'm trying to write an integration level test that can reference stuff
in the test classpath. Specifically the build/classes/test, so all the
resources and the compiled classes.

https://github.com/dkowis/Cucumber-JVM-Example/tree/spring

The above branch on github contains the gradle build script and the
source codes to make it work. It'll work just fine under maven, but not
under gradle. I cannot quite figure out how to properly construct a
configuration that will include the output of the testClasses and
processTestResources tasks.

How would I go about doing that?

Thanks,
David



Reply via email to