Getting initializationError (NoClassDefFoundError) while execute my JUnit test runner

Hi, I followed the steps in JUnit Test Runner Class page and I have execute the below JUnit test runner.


package cucumberTest;

import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;

features = “Feature”

public class TestRunner {



But got the below error.

java.lang.NoClassDefFoundError: gherkin/formatter/Formatter

at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)

Default Asked on March 10, 2017 in Software Testing.
Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.