私のcucumber -jvm、Maven、junitセットアップでは、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 {
}
上記のディレクトリに機能ファイルがあります。
実行すると、次の例外が発生します。
cucumber.runtime.CucumberException: No features found at [C:/Users/sarthak.dayanand/Documents/WebRefreshTest/CukeAutomation/LebaraWebAutomationTest1/src/main/resources/cucumber]...
testrunner で「features」オプションを削除すると、testrunner.java と同じディレクトリで機能ファイルを検索しようとします。
cucumber.runtime.CucumberException: No features found at [com/lebara/testrunner]
そこに機能ファイルを配置すると、機能します。
私の質問は、キュウリのデフォルトのファイル構造であると思っていた以前の場所から機能ファイルが取得されないのはなぜですか-mavenセットアップです。
そこから拾うにはどうすればいいですか?助けていただければ幸いです。