![](/img/trans.png)
[英]Cucumber Java Maven - ExtendedCucumberOptions - Features missing steps
[英]How to generate steps of cucumber features in STS (Eclipse)?
我已經看到了,並且我嘗試按照其步驟生成功能文件的步驟。 這是我對pom.xml
依賴:
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java8</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
</dependencies>
我已經定義了亞軍類如下:
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty", "html:target/cucumber"})
public class RunCukesTest {
}
功能文件位於項目的src/features
中:
問題是,當我right click on the feature file-> Run as-> Cucumber
什么都沒發生。
我希望黃瓜賽跑者可以跑步,並提供步驟
那么,怎么了?
功能是:
功能:功能的標題我想將數據提交到注冊表格中
Scenario: Register into the forum
Given I want to register into the main forum
When I enter name
And I enter passwrod
And I repeat the password
And I enter username
And I enter email
Then I click the submit
我根本不需要RunCukesTest
,關鍵是在STS上安裝Cucumber-jvm
插件,它很容易生成步驟。 這個問題也非常有用。
另外,要在Eclipse中運行功能文件,您應該
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.