Hello, I’m new to using and when I try to set up my build. to execute a custom test task (using cucumber), I encounter an issue that the task doesn’t catch the thrown exceptions.

This is the task definition:

task cucumber(dependsOn: testClasses, type: JavaExec) {
    main = "cucumber.api.cli.Main"
    classpath = configurations.testRuntimeClasspath + sourceSets.main.output + sourceSets.test.output
    args = ['--plugin', 'pretty', '--glue', 'cucumber.steps', 'src/test/resources']

To be fair I’m not sure what I’m doing and just applied google + trial and error and after it started showing scenarios and tests in the terminal I assumed that it worked, but if the tests fail when running them from inside the IDE, they don’t when running from the command line.

Can someone recommend a good guide, textbook for getting with how to define Gradle tasks?

Source link https://www.reddit.com/r//comments/979lhr/getting_familiar_with_gradle/


Please enter your comment!
Please enter your name here