gradle-cucumber-plugin icon indicating copy to clipboard operation
gradle-cucumber-plugin copied to clipboard

Creating a new Task of type CucumberTask

Open cah-chaitanya-munagala opened this issue 8 years ago • 1 comments

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.

cah-chaitanya-munagala avatar Mar 23 '16 22:03 cah-chaitanya-munagala

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?

gregmunt avatar Nov 23 '19 22:11 gregmunt