问题描述
我正在尝试使用Cucumber集成BDD。但是我真的很困惑 io.cucumber 和 info.cukes 库之间的区别是什么。以及使用哪个以及何时使用。
I am trying to integrate BDD using Cucumber. But I am really confused what is the difference between io.cucumber and info.cukes libraries. And which one to use and when.
我试图阅读并理解github 文件仍然无法显示正面或反面。
I tried to read and understand the github README.md file still can't make heads or tails.
还有,我不确定黄瓜-jvm是什么。为什么我们需要黄瓜精(独立的junit库不能满足要求)。
Still further I am not sure what is cucumber-jvm. Why do we need cucumber-junit (can't the standalone junit library suffice).
预先感谢。
推荐答案
有关更多详细信息,请参阅发行说明。 -。
Refer to the release notes for more details. - https://github.com/cucumber/cucumber-jvm/blob/master/CHANGELOG.md.
黄瓜2发生了重大变化。有关更多信息,请参考此内容-
There has been substantial changes in cucumber 2. Refer to this for more - https://cucumber.io/blog/2017/08/29/announcing-cucumber-jvm-2-0-0
io.cucumber和info.cukes
是Maven组ID。 info.cukes
适用于Cucumber版本,直到 1.2.5 。最新版本位于 2.0.0 中的 io.cucumber
中。 github上还有一个新版本3,发行说明中提到了master的更多好东西。
io.cucumber and info.cukes
are Maven group ids. info.cukes
was for Cucumber version till 1.2.5. The latest version are in io.cucumber
starting from 2.0.0. There is also a new version 3 with more goodies in github with the master as mentioned in the release notes.
groupid更改的原因是因为小黄瓜也同样更改了groupid
The reason the groupid was changed because gherkin has changed the groupid similarly.
cucumber-jvm 是Cucumber框架的Java实现。还有许多其他语言的实现-。
cucumber-jvm is the java implementation of Cucumber framework. there are many other implementations in other languages - https://github.com/cucumber.
当在测试类顶部使用 @RunWith(Cucumber.class)
时,表示正在使用这将执行功能文件。 junit的默认运行器不会带您到任何地方,尽管可能会咳出一些异常。
When you use the @RunWith(Cucumber.class)
on top of the test class, it means that a specialized runner is being used which will execute the feature files. The default runner of junit will not get you anywhere, though might cough up some exceptions.
这篇关于io.cucumber和info.cukes有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!