Spring boot 黄瓜和春靴的宁静
我正在使用带有Serenity的Springboot作为UI测试框架,我想将cucumber添加到我的项目中。 我的问题是,该测试不会引导我的Springboot测试应用程序。你能帮帮我吗? 我的依赖项:Spring boot 黄瓜和春靴的宁静,spring-boot,cucumber,serenity-bdd,Spring Boot,Cucumber,Serenity Bdd,我正在使用带有Serenity的Springboot作为UI测试框架,我想将cucumber添加到我的项目中。 我的问题是,该测试不会引导我的Springboot测试应用程序。你能帮帮我吗? 我的依赖项: testCompile("net.serenity-bdd:serenity-core:${serenityVersion}") testCompile("net.serenity-bdd:serenity-junit:${serenityVersion}") testCompile("net
testCompile("net.serenity-bdd:serenity-core:${serenityVersion}")
testCompile("net.serenity-bdd:serenity-junit:${serenityVersion}")
testCompile("net.serenity-bdd:serenity-spring:${serenityVersion}")
testCompile("net.serenity-bdd:serenity-cucumber:${cucumberVersion}")
testCompile("info.cukes:cucumber-java:1.2.5")
我的Serenity/Cucumber测试(FrontendTestApplication用@SpringbootApplication注释):
如果我运行以前的测试,一切正常,但是这个测试不会启动我的Springboot应用程序
你们能帮帮我吗
问候,,
拉尔斯我发现了错误。
您必须用
@springbootest
注释定义类的步骤,而不是runner类。您有任何示例吗?
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT, classes = {FrontendTestApplication.class})
@RunWith(CucumberWithSerenity.class)
public class InputStationCucumber {
}