發現在我的黃瓜-jvm,Maven的功能,JUnit的設置,我有我的TestRunner文件黃瓜JVM CucumberException:沒有爲[]
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 {
}
我在上面提到的目錄中我有文件。
如果我運行它,我得到以下異常:
cucumber.runtime.CucumberException: No features found at [C:/Users/sarthak.dayanand/Documents/WebRefreshTest/CukeAutomation/LebaraWebAutomationTest1/src/main/resources/cucumber]...
如果我刪除的TestRunner的「功能」選項,它會嘗試查找功能文件在同一目錄作爲我testrunner.java
cucumber.runtime.CucumberException: No features found at [com/lebara/testrunner]
如果我把這些功能文件放在那裏,它就可以工作。
我的問題是爲什麼我的功能文件沒有被從我以前的位置拾取,我認爲這是黃瓜 - maven設置的默認文件結構。
如何使它從那裏接?幫助讚賞。
從「■特徵」,以改變」 .feature 「爲我修好了;謝謝 – ash