首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Cucumber-spring依赖问题

Cucumber-spring依赖问题
EN

Stack Overflow用户
提问于 2016-05-02 10:05:26
回答 1查看 496关注 0票数 0

我正在尝试使用cucumber为DAO编写集成测试。当我尝试添加以下依赖项时

代码语言:javascript
复制
<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>cucumber-spring</artifactId>
    <version>1.1.5</version>
</dependency>

我得到了下面的错误。

Error message

当我删除spring的依赖项时,特征文件正在运行并生成步骤定义,但我无法将spring bean注入到步骤定义中。

有什么建议吗。谢谢

EN

回答 1

Stack Overflow用户

发布于 2016-05-11 10:35:39

你的依赖关系看起来像这样吗(对不起,gradle不是Maven):

代码语言:javascript
复制
compile 'info.cukes:cucumber-java8:1.2.3'
compile 'info.cukes:cucumber-junit:1.2.3'
compile 'info.cukes:cucumber-spring:1.2.3'
compile 'info.cukes:cucumber-java:1.2.3'
compile 'junit:junit:4.12'
compile 'org.springframework:spring-beans:4.1.1.RELEASE'
compile 'org.springframework:spring-context:4.1.1.RELEASE'
compile 'org.springframework:spring-test:4.1.1.RELEASE'
compile 'org.springframework:spring-jdbc:4.1.1.RELEASE'
compile 'org.springframework:spring-web:4.1.1.RELEASE'
compile 'org.jasypt:jasypt-spring31:1.9.2'
compile 'com.fasterxml.jackson.core:jackson-core:2.6.3'
compile 'com.fasterxml.jackson.core:jackson-databind:2.6.3'

/* Selenium */
compile 'org.seleniumhq.selenium:selenium-java:2.50.1'
compile 'org.seleniumhq.selenium:selenium-chrome-driver:2.50.1'
compile 'org.seleniumhq.selenium:selenium-support:2.50.1'


/* MDSC */
compile 'log4j:log4j:1.2.17'
compile 'org.codehaus.jackson:jackson-mapper-lgpl:1.9.13'

/* Apache Commons DBCP software implements Database Connection Pooling */
compile 'org.apache.commons:commons-dbcp2:2.0'
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36974091

复制
相关文章

相似问题

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