首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Cucumber和Springboot的宁静

Cucumber和Springboot的宁静
EN

Stack Overflow用户
提问于 2017-02-03 23:48:00
回答 1查看 2.6K关注 0票数 1

我正在使用带有Serenity的Springboot作为UI测试框架,并且我想将cucumber添加到我的项目中。我的问题是,测试不会启动我的Springboot测试应用程序。你能帮帮我吗?我的依赖项:

代码语言:javascript
复制
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")

我的宁静/黄瓜测试(FrontendTestApplication用@SpringbootApplication注解):

代码语言:javascript
复制
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT, classes = {FrontendTestApplication.class})
@RunWith(CucumberWithSerenity.class)
public class InputStationCucumber {
}

如果我运行旧的Test,一切都正常,但是这个测试不能启动我的Springboot应用程序。

你们能帮我吗?

致敬,拉尔斯

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-02-10 17:04:36

我发现了错误。您必须使用@SpringBootTest来注释定义类的步骤,而不是runner类。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42028013

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档