Cucumber Exception: java.lang.ClassNotFoundException: cucumber.io.ResourceLoader

后端 未结 3 1125
有刺的猬
有刺的猬 2020-12-19 15:17

I am facing an error whenever I run the cucumber test by Junit. Here is the following Exception. Any help will be awesome

NOTE:

THER

3条回答
  •  执念已碎
    2020-12-19 15:30

    You are trying to run Cucumber in java, and you haven't loaded the Cucumber-java dependency? How's your Cucumber supposed to execute?

    Here are the minimum dependencies needed to get your Cucumber up & running:

    -Cucumber-java (1.2.2) -Cucumber-junit (1.2.2) -Cucumber-picocontainer (1.2.2) -junit (4.12)

    Maven manages the rest of the dependencies. Make sure you have the latest dependencies, and that you are not mixing and matching versions (for example, I've used all 1.2.2 version)

    Edit: Just noticed that your Cucumber-java is at the bottom of the pom.xml. It's a good practice to order your dependencies....all cucumber dependencies go together, one after another.

提交回复
热议问题