我正在尝试使用cucumber为DAO编写集成测试。当我尝试添加以下依赖项时
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-spring</artifactId>
<version>1.1.5</version>
</dependency>我得到了下面的错误。
Error message
当我删除spring的依赖项时,特征文件正在运行并生成步骤定义,但我无法将spring bean注入到步骤定义中。
有什么建议吗。谢谢
发布于 2016-05-11 10:35:39
你的依赖关系看起来像这样吗(对不起,gradle不是Maven):
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'https://stackoverflow.com/questions/36974091
复制相似问题