does not have a matching glue code in Groovy-cucumber

人走茶凉 提交于 2021-02-17 05:52:50

问题


I'm using cucumber-groovy with maven based framework and unable to find the glue to stepDefinitions. Getting does not have a matching glue code in feature file. It is in Cucumber-maven Project. I have converted the Feature folder to 'Source folder'.

Error :

Unable to create src/test/groovy & src/test/resource (to use as feature's folder)

Here is my Test Runner CucumberOptions:

@CucumberOptions( features = ["src/test/resources/"],
        glue = ["com.esw.taa.avs.steps"],
        plugin = ["html:esw-tests/report"],
        dryRun = false,
        monochrome = true,
        strict = true
        )


回答1:


I also use Groovy-cucumber, but without Maven. Here is my CucumberOptions:

@CucumberOptions(
    plugin = "pretty",
    monochrome = true,
    tags = "not @wip",
    features = "src/test/resources/Features",
    glue = {"test.java.StepDefinitions"},
    junit = "--step-notifications"
    )


来源:https://stackoverflow.com/questions/59974985/does-not-have-a-matching-glue-code-in-groovy-cucumber

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!