为什么在运行junit test case时运行黄瓜+硒测试会出错?

时间:2015-06-29 05:45:10

标签: java selenium cucumber

当我运行命令cucumber时,我已经创建了一个seleniummvn clean install的测试用例,测试用例没有错误地执行并成功传递,但是当我运行时测试用例相同使用弹簧工具套件,选项运行为junit测试用例,它给出了错误。

错误

java.lang.NoClassDefFoundError: com/google/common/collect/Maps
at org.openqa.selenium.firefox.FirefoxBinary.<init>(FirefoxBinary.java:48)

1 个答案:

答案 0 :(得分:0)

Okies得到的答案类不在类路径中

在mvn eclipse之后

:eclipse

它有效。