我知道有一些类似的问题,但我对功能黄瓜文件的绑定步骤有一些问题。这是我的黄瓜跑者
@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");
}
}
我总是得到“您可以使用下面的代码片段实现缺少的步骤:”。我使用 InteliJ IDEA,并在配置中设置了胶水。但仍然不起作用。你能帮助我吗?