gradle-cucumber-plugin
gradle-cucumber-plugin copied to clipboard
Creating a new Task of type CucumberTask
How do I Create a new task of type CucumberTask?
I tried the following but when I try to run I get "Cannot invoke method copyTo() on null object"
task "${driver}Test" (type: CucumberTask) {
outputs.upToDateWhen { false } // Always run tests
dependsOn unzipChromeDriver
def chromeDriverFilename = Os.isFamily(Os.FAMILY_WINDOWS) ? "chromedriver.exe" : "chromedriver"
jvmOptions.systemProperties([
"webdriver.chrome.driver" : new File(unzipChromeDriver.outputs.files.singleFile, chromeDriverFilename).absolutePath,
"geb.cucumber.step.packages": "pages",
"geb.env" : driver
])
}
Appreciate if I can get some help in figuring this out.
Why do you need to create a new task? The plugin automatically creates a task named 'cucumber', of type CucumberTask. Do you need multiple cucumber tasks, or some other reason?