title: JUnit error "test framework quit unexpectedly" in Intelij IDEA
body: <p>I've investigated this issue from different sides, but didn't get anywhere so far. I have a project that runs selenium driver on JUnit using Cucumber for Java. I use <strong>Maven</strong>.
  Here's my <strong>TestRunner</strong> that runs the test: </p>
  
  <pre><code>package com.task.lab;
  
  import cucumber.api.CucumberOptions;
  import cucumber.api.junit.Cucumber;
  import org.junit.runner.RunWith;
  
  @RunWith(Cucumber.class)
  @CucumberOptions(features = "C:\\Users\\admin\\IdeaProjects\\bddtesting\\src\\test\\java\\com\\task\\lab\\features",
          glue = "C:\\Users\\admin\\IdeaProjects\\bddtesting\\src\\test\\java\\com\\task\\lab\\steps")
  public class TestRunner {
  }
  </code></pre>
  
  <p>Here's feature file:</p>
  
  <pre><code>Feature: Login to Gmail
  
   Scenario Outline: login compose and delete letter
      Given: User is on SignIn page
      When: User enters &lt;Email&gt; and &lt;Password&gt;
      Then: User sends letter to &lt;Receiver&gt; and alert is displayed letter is sent
  Examples:
    |Email                 |Password   |Receiver
    |testaccount@gmail.com |okokokokok |testtest@gmail.com
    |testaccount@gmail.com |okokokokok |testtest@gmail.com
  </code></pre>
  
  <p>pom.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;groupId&gt;com.task.lab.bddtesting&lt;/groupId&gt;
  &lt;artifactId&gt;bddtesting&lt;/artifactId&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.7.0&lt;/version&gt;
          &lt;configuration&gt;
              &lt;source&gt;1.7&lt;/source&gt;
              &lt;target&gt;1.7&lt;/target&gt;
          &lt;/configuration&gt;
      &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-support&lt;/artifactId&gt;
          &lt;version&gt;3.8.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-chrome-driver&lt;/artifactId&gt;
          &lt;version&gt;3.8.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;info.cukes&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-java&lt;/artifactId&gt;
          &lt;version&gt;1.2.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;info.cukes&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-core&lt;/artifactId&gt;
          &lt;version&gt;1.2.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;info.cukes&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-junit&lt;/artifactId&gt;
          &lt;version&gt;1.2.2&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.12&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;version&gt;1.2.17&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;info.cukes&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-jvm&lt;/artifactId&gt;
          &lt;version&gt;1.2.5&lt;/version&gt;
          &lt;type&gt;pom&lt;/type&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p></p>
  
  <p>And finally my Steps.Defs class:</p>
  
  <pre><code>package com.task.lab.steps;
  
  import com.task.lab.decorator.bo.businessobjects.GmailMessage;
  import com.task.lab.decorator.bo.businessobjects.Login;
  import com.task.lab.driver.DriverObject;
  import com.task.lab.propertyreader.ReadPropertyFile;
  import cucumber.api.java.After;
  import cucumber.api.java.en.Given;
  import cucumber.api.java.en.Then;
  import cucumber.api.java.en.When;
  
  public class StepDefs {
  
  private Login login = new Login();
  
  @Given("^User is on SignIn page$")
  public void openSignInPage(){
      LOG.info("Logging in");
      DriverObject.getDriver();
      DriverObject.getDriver().get(ReadPropertyFile.readGmailURL());
  }
  
  @When("^User enters (\\S+) and (\\S+)$")
  public void enterCredentials(String email, String password) throws Throwable {
      login = new Login();
      login.login(email, password);
  }
  
  @Then("^User sends letter to (\\S+) and alert is displayed letter is sent$")
  public void composeLetter(String receiver){
      GmailMessage gmail = new GmailMessage();
      gmail.sendMessage(receiver);
  }
  
  @After
  public void closeBrowser(){
      DriverObject.releaseThread();
  }
  }
  </code></pre>
  
  <p>When I try to run the TestRunner from the window I get the error <strong>No tests were found</strong>. As I investigated priorly, the reason for this could be that I run Test Unit, not Main class. So I reconfigured Intelij Setting for this project to run from <strong>Cucumber for Java</strong> and specified the Main class as <code>cucumber.api.cli.Main</code>. However, this gives me another error <code>Test framework quit unexpectedly</code>. I also tried running features file only and in this case tests are green but in fact, no scenarios or steps are passed, as the output in the console shows: </p>
  
  <pre><code>0 Scenarios
  0 Steps
  0m0,000s
  </code></pre>
  
  <p>I also reinstalled my Intelij to Ultimate version, but the result is just the same. Could someone please help me see what I am doing wrong?</p>