【发布时间】:2017-07-18 04:59:18
【问题描述】:
我知道有一些类似的问题,但是我在绑定步骤以特征黄瓜文件时遇到了一些问题。这是我的黄瓜跑者
@RunWith(Cucumber.class)
public class CucumberTests {
}
注释
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@SpringBootTest(classes = AppRunner.class)
@RunWith(Cucumber.class)
@interface CucumberSteps {
}
步骤
@CucumberSteps
public class QueueSenderStepsDefs {
@Given("^I have item$")
public void iHaveItem() throws Throwable {
System.out.println("Asd");
}
@When("^I send it to jmsQueueSender$")
public void iSendItToJmsQueueSender() throws Throwable {
System.out.println("dff");
}
@Then("^item is on queue$")
public void itemIsOnQueue() throws Throwable {
System.out.println("sdasdsa");
}
}
我总是得到“您可以使用下面的 sn-ps 实现缺少的步骤:”。我使用 InteliJ IDEA,并在配置中设置了胶水。但仍然不起作用。你能帮帮我吗?
【问题讨论】:
标签: spring spring-boot cucumber spring-boot-test