what is the difference between io.cucumber and info.cukes

你。 提交于 2019-12-03 15:14:37

问题


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.

I tried to read and understand the github README.md file still can't make heads or tails.

Still further I am not sure what is cucumber-jvm. Why do we need cucumber-junit (can't the standalone junit library suffice).

Thanks in advance. Any help is much appreciated.


回答1:


Refer to the release notes for more details. - https://github.com/cucumber/cucumber-jvm/blob/master/CHANGELOG.md.

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 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.

The reason the groupid was changed because gherkin has changed the groupid similarly.

cucumber-jvm is the java implementation of Cucumber framework. there are many other implementations in other languages - https://github.com/cucumber.

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.



来源:https://stackoverflow.com/questions/50208254/what-is-the-difference-between-io-cucumber-and-info-cukes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!