【问题标题】:Cucumber feature file not getting executed from Test runner测试运行程序未执行黄瓜功能文件
【发布时间】:2022-10-05 23:56:00
【问题描述】:

我正在尝试从测试运行程序运行我的 Cucumber 功能文件,但是在执行时它在控制台上什么也不做。它也不会抛出任何异常或错误。请告知这里可能有什么问题 enter image description here

请在下面找到代码

package TestRunners;

import org.junit.runner.RunWith;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;

@RunWith(Cucumber.class)
@CucumberOptions(
        features= {\"src/test/java/AppFeatures\"  
        },
        glue= {\"StepDefinations\"}
        )

public class AmazonTest {

}
  • 也可以试试 Cucumber 的10 minute tutorial。它将使用 JUnit 5 而不是 JUnit 4。

标签: junit automation frameworks cucumber bdd


【解决方案1】:

刚刚出现同样的错误,当我尝试使用“运行为 -> 黄瓜功能”命令运行时,什么也没发生。

似乎根本没有创建运行配置,所以我所做的是转到“运行方式->运行配置”并手动创建了运行配置(转到“黄瓜功能”选项并单击“启动新配置”按钮)。

【讨论】:

    猜你喜欢
    • 2019-12-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多