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(),
)
}
}
}