我正在使用Jbehave作为我的BDD框架。我正在寻找一种方式来自动生成文本场景候选人步法存根像自动生成JBehave中的stext场景的候选步骤方法存根
Given there is a flight
And there is a customer
When the customer books the flight
Then the customer is shown on the manifest
到Java这样的:
<@> Given("there is a flight")
<[email protected]> Pending
public void thereIsAFlight() {
}
<@> Given("there is a customer") // note 'Given', even though story line is 'And'
<@> Pending
public void thereIsACustomer() {
}
<@> When("the customer books the flight")
<@> Pending
public void theCustomerBooksTheFlight() {
}
<@> Then("the customer is shown on the flight manifest")
<@> Pending
public void thenTheCustomerIsShownOnTheFlightManifest() {
}
不JBehave提供它作为一个隐含的功能,或者人们使用一些IDE插入 ?我将非常感谢这里的任何帮助。
这个特性存在于cucumber-jvm中。由于缺乏对应该成为任何黄金标准bdd测试引擎一部分的功能的支持,我正在考虑切换引擎。 – Ajax 2016-04-10 00:27:20