'<terminated> TestRunner [Junit] D:\Java\JDK-14.0.1\bin\javaw.exe

1When i execute runner class i am getting this error " TestRunner [Junit] D:\Java\JDK-14.0.1\bin\javaw.exe"

package Runner;

import org.junit.runner.RunWith;

import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;

@RunWith(Cucumber.class)
@CucumberOptions(features="D:\\Eclipse\\eclipse-workspace\\FreeCrmBDDFramework\\src\\main\\java\\Features\\login.feature", glue= {"stepDefinition"})
public class TestRunner {

}

error screen shot

POM.xml - dependencies

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>FreeCrmBDDFramework</groupId>
  <artifactId>FreeCrmBDDFramework</artifactId>
  <version>0.0.1-SNAPSHOT</version>

  <name>FreeCrmBDDFramework</name>
  <!-- FIXME change it to the project's website -->
  <url>http://www.example.com</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
  </properties>

  <dependencies>
      <dependency>
      <groupId>io.cucumber</groupId>
      <artifactId>cucumber-java</artifactId>
      <version>6.0.0-RC2</version>
  </dependency>

    <dependency>
      <groupId>io.cucumber</groupId>
      <artifactId>cucumber-jvm</artifactId>
      <version>3.0.0</version>
      <type>pom</type>
  </dependency>
      <dependency>
      <groupId>io.cucumber</groupId>
      <artifactId>cucumber-junit</artifactId>
      <version>6.0.0-RC2</version>
  </dependency>
      <dependency>
      <groupId>io.cucumber</groupId>
      <artifactId>cucumber-jvm-deps</artifactId>
      <version>1.0.6</version>
      <scope>provided</scope>
  </dependency>
      <dependency>
      <groupId>net.masterthought</groupId>
      <artifactId>cucumber-reporting</artifactId>
      <version>5.3.0</version>
  </dependency>
      <dependency>
      <groupId>io.cucumber</groupId>
      <artifactId>gherkin</artifactId>
      <version>13.0.0</version>
  </dependency>
          <dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-java</artifactId>
      <version>3.141.59</version>
  </dependency>

  </dependencies>

  <build>
    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
      <plugins>
        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle

--> maven-clean-plugin 3.1.0 maven-resources-plugin 3.0.2 maven-compiler-plugin 3.8.0 maven-surefire-plugin 2.22.1 maven-jar-plugin 3.0.2 maven-install-plugin 2.5.2 maven-deploy-plugin 2.8.2 maven-site-plugin 3.7.1 maven-project-info-reports-plugin 3.0.0



Solution 1:[1]

Right click on your project and Go to Build path > Configure build path > Java build path > add library. and add Junit 5 library. It will resolve the issue

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Gangadhar