79734761

Date: 2025-08-13 21:42:28
Score: 1.5
Natty:
Report link

If you run your BDDs with gradle use this task config:

(Note "--tags" argument with "not @sandbox" as a value for tests I want to exclude)

task("uat") {

    description = "Runs user acceptance tests."
    group = "verification"

    dependsOn("assemble", "testClasses")
    doLast {
        val featurePath = project.findProperty("feature") ?: "src/test/resources/features"

        javaexec {
            mainClass.set("io.cucumber.core.cli.Main")
            classpath = configurations["cucumberRuntime"] + sourceSets["main"].output + sourceSets["test"].output
            args(
                "--plugin",
                "pretty",
                "--plugin",
                "html:build/cucumber/cucumber.html",
                "--plugin",
                "junit:build/cucumber/cucumber-junit.xml",
                "--plugin",
                "json:build/cucumber/cucumber.json",
                "--glue",
                "com.my.cool.package.uat",
                "--tags",
                "not @sandbox",
                featurePath.toString(),
            )
        }
    }
}
Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @sandbox
  • Low reputation (1):
Posted by: Daniel Burtman