Java @RunWith(cucumberWithSerentity.class)抛出noClassDefFind cucumber/runtime/junit/Assertions
尝试使用JUnit 5以宁静的方式运行Cucumber 当测试运行程序具有Java @RunWith(cucumberWithSerentity.class)抛出noClassDefFind cucumber/runtime/junit/Assertions,java,junit,cucumber,serenity-bdd,cucumber-serenity,Java,Junit,Cucumber,Serenity Bdd,Cucumber Serenity,尝试使用JUnit 5以宁静的方式运行Cucumber 当测试运行程序具有@RunWith(Cucumber.class)注释时,测试将运行,尽管Serenity不会记录结果 当测试运行程序具有@RunWith(cucumberWithSerentity.class)时,将抛出“NoClassDefFound cucucumber/runtime/junit/Assertions” 我想可能是JUnit5,所以我切换到JUnit4,同样的结果也发生了 我将示例项目加载到GitHub中: 目标是构
@RunWith(Cucumber.class)
注释时,测试将运行,尽管Serenity不会记录结果
当测试运行程序具有@RunWith(cucumberWithSerentity.class)
时,将抛出“NoClassDefFound cucucumber/runtime/junit/Assertions”
我想可能是JUnit5,所以我切换到JUnit4,同样的结果也发生了
我将示例项目加载到GitHub中:
目标是构建项目,然后能够在Serenity html输出中看到Cucumber结果
有人知道我哪里出了问题吗?有两个不同的问题: 依赖关系| java->v4.2.0 我使用的是v4.7.1。当我从4.7.1回滚到4.2.0时,NoClassDefFound错误消失了。 当我升级到4.2.1时,我得到了一个新的NoClassDefFound错误。我尝试了从4.2.1到4.7.1的所有版本,得到了不同的NoClassDefFound错误 依赖性|宁静-黄瓜4-v1.0.17 当我使用v1.0.17时,会出现一个关于缺少依赖项的警告。 当我使用v1.0.15时,这个缺少依赖项的警告消失了 对于serenity-cucumber4使用的serenity剧本和serenity剧本webdriver的v2.0.59版本,似乎有一些不好的引用,但在maven repo中并不存在 这是我遇到的另一个主要问题中没有讨论的障碍 解决
- 我将cucumber java保持在v4.2.0
- 我将serenity-cucumber4保持在v1.0.15