Exception in thread “main” java.lang.NoClassDefFoundError: gherkin/formatter/Formatter

核能气质少年 提交于 2019-12-02 10:46:54

I was working with cucumber with some selenium scripts today and came across a similar issue whenever I was using gherkin3 jar file.

Once I switch back to using gherkin 2.12.2, the issue went away.

You can download the jar from the following location:

http://search.maven.org/#search%7Cga%7C1%7Cgherkin

It is certainly worth trying this and checking if you get the same issue.

I would also try running your feature file without any methods to check if you get it to return the methods you need to create, similar to the what is detailed in the document here:

http://www.toolsqa.com/cucumber/first-cucumber-selenium-java-test/

You don't need the glue option though like detailed in the example when you just what to run the feature file.

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