我正在尝试运行下面提到的功能文件。
Feature: Prove the concept of my script
Scenario: My first Test
Given This is my first step
When This is my second step
Then This is my third step
当我运行此功能文件时,它会给出一个错误,说明如下,并且步骤已用“步骤没有胶水代码”的语句突出显示。
错误如下所示。我想运行上面的功能文件并了解该功能的缺失文件。
Exception in thread "main" java.lang.NoClassDefFoundError: gherkin/lexer/Encoding
at cucumber.runtime.FeatureBuilder.read(FeatureBuilder.java:154)
at cucumber.runtime.FeatureBuilder.parse(FeatureBuilder.java:115)
at cucumber.runtime.model.CucumberFeature.loadFromFeaturePath(CucumberFeature.java:104)
at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:54)
at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:34)
at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:235)
at cucumber.runtime.Runtime.run(Runtime.java:110)
at cucumber.api.cli.Main.run(Main.java:36)
at cucumber.api.cli.Main.main(Main.java:18)
Caused by: java.lang.ClassNotFoundException: gherkin.lexer.Encoding
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 9 more
拜托,我是黄瓜的初学者,我想解决这个问题。如果可以,请你帮助我。