Java-Cucumber:功能文件未調用步驟定義文件,我正在嘗試使用Intellij Idea工具。用CTRL按鈕點擊功能文件步驟(給定和然後)時,它將重定向到我的步驟定義文件,但在運行時會拋出錯誤。Java-Cucumber:功能文件未調用步驟定義文件
連接到目標VM,地址: '127.0.0.1:64966',運輸: '插座'
Undefined step: Given I am logged in to Intersect HE as user type "administrator"
Undefined step: Then I verify I have access the Intersect Help page
1 Scenarios (1 undefined)
2 Steps (2 undefined)
0m0.000s
You can implement missing steps with the snippets below:
Given("^I am logged in to Intersect HE as user type \"([^\"]*)\"$", (String arg1) -> {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
});
Then("^I verify I have access the Intersect Help page$",() -> {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
});Disconnected from the target VM, address: '127.0.0.1:64966', transport: 'socket'
enter code here
Process finished with exit code 0
加膠之後,它拋出其他錯誤「異常線程 「main」 cucumber.runtime .CucumberException:無法實例化類stepDefinitions.LoginPageStepDefs「。
stepDefinitions文件被正確添加,不知道爲什麼我得到這個錯誤。
Console Error Description Project Structure
你可以分享你的TestRunner的代碼,你在裏面提到的膠水?(如果可能的話您共享文件夾樹視圖) – Akarsh
你將如何執行功能的文件是否使用的TestRunner或者直接在運行功能文件? – Akarsh
@akarsh:我提到過膠水,我試圖直接運行功能文件。 –