在我的黄瓜-jvm,Maven,junit Setup中我将testRunner文件作为
package com.lebara.testrunner;
import cucumber.junit.Cucumber;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@Cucumber.Options(
glue = {"com.lebara.stepdefs","com.lebara.framework.main", "com.lebara.testrunner"},
features = "C:/Users/sarthak.dayanand/Documents/WebRefreshTest/CukeAutomation/LebaraWebAutomationTest1/src/main/resources",
format = {"pretty", "html:target/cucumber-html-report", "json-pretty:target/cucumber-report.json"},
tags = {"@UserJourney"}
)
public class RunCukesTest {
}
Run Code Online (Sandbox Code Playgroud)
我在上面提到的目录中有我的功能文件.
如果我运行它,我会得到以下异常:
cucumber.runtime.CucumberException: No features found at [C:/Users/sarthak.dayanand/Documents/WebRefreshTest/CukeAutomation/LebaraWebAutomationTest1/src/main/resources/cucumber]...
Run Code Online (Sandbox Code Playgroud)
如果我删除了testrunner中的"features"选项,它会尝试在与我的testrunner.java相同的目录中查找功能文件
cucumber.runtime.CucumberException: No features found at [com/lebara/testrunner]
Run Code Online (Sandbox Code Playgroud)
如果我把功能文件放在那里,它就可以了.
我的问题是为什么我的功能文件没有被我以前的位置拾取,我认为这是黄瓜 - maven设置的默认文件结构.
我如何从那里取货?帮助赞赏.