Groovy-cucumber 中没有匹配的胶水代码 [英] does not have a matching glue code in Groovy-cucumber

查看:31
本文介绍了Groovy-cucumber 中没有匹配的胶水代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将 cucumber-groovy 与基于 maven 的框架一起使用,但无法找到 stepDefinitions 的粘合剂.获取 在特征文件中没有匹配的胶水代码.它在 Cucumber-maven 项目中.我已将功能文件夹转换为源文件夹".

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'.

错误:

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

这是我的测试运行程序 CucumberOptions:

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
        )

推荐答案

我也使用 Groovy-cucumber,但没有使用 Maven.这是我的 CucumberOptions:

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"
    )

这篇关于Groovy-cucumber 中没有匹配的胶水代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆