title: Parallel Execution not happening with Cucumber JVM 4.0.0 and Junit test runner
body: <p>I am unable to run features in parallel using cucumber JVM 4.0.0 and Junit testrunner. I just have one browser instance opening and once the execution is completed, browser closes and opens again for next feature execution.As per my thread count of 3 in Maven surefire, i expect 3 browser instances to be opened concurrently for running 3 features. I have followed the following <a href="https://github.com/cucumber/cucumber-jvm/tree/v4.0.0/junit" rel="nofollow noreferrer">link</a>, but still not successful. The Features run one after another. I have used Pico container for DI.I followed this <a href="https://stackoverflow.com/questions/52998443/maven-junit-parallel-execution-cucumber-jvm-v4-0-0">link</a> for updating different version of Surefire plugin but still no luck. i have tried 4.0.0 as well as 4.2.0 for IO.cucumber Jars. I have tried different versions of surefire from 2.19 to 2.22 but still no luck.I have 3 features files and each of them have one scenario outline tagged as "@Parallel".I am not sure where am going wrong.I have tried parallel as "both" and "methods" in surefire plugin. My Junit version is 4.12.</p>
  
  <p>My pom is as below.</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;testcase&lt;/groupId&gt;
      &lt;artifactId&gt;xyzproject&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;name&gt;xyzproject&lt;/name&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;cocumber.version&gt;4.0.0&lt;/cocumber.version&gt;
          &lt;picocontainer.version&gt;4.0.0&lt;/picocontainer.version&gt;
      &lt;/properties&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;central&lt;/id&gt;
              &lt;name&gt;Central Repository&lt;/name&gt;
              &lt;url&gt;http://repo.maven.apache.org/maven2&lt;/url&gt;
              &lt;layout&gt;default&lt;/layout&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;false&lt;/enabled&gt;
              &lt;/snapshots&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;repo.bodar.com&lt;/id&gt;
              &lt;url&gt;http://repo.bodar.com&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.cocumber&lt;/groupId&gt;
              &lt;artifactId&gt;cocumber-java&lt;/artifactId&gt;
              &lt;version&gt;4.0.0&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.cocumber&lt;/groupId&gt;
              &lt;artifactId&gt;cocumber-picocontainer&lt;/artifactId&gt;
              &lt;version&gt;4.0.0&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.cocumber&lt;/groupId&gt;
              &lt;artifactId&gt;cocumber-junit&lt;/artifactId&gt;
              &lt;version&gt;4.0.0&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.cocumber&lt;/groupId&gt;
              &lt;artifactId&gt;cocumber-jvm&lt;/artifactId&gt;
              &lt;version&gt;4.0.0&lt;/version&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;com.codeborne&lt;/groupId&gt;
              &lt;artifactId&gt;phantomjsdriver&lt;/artifactId&gt;
              &lt;version&gt;1.2.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.googlecode.json-simple&lt;/groupId&gt;
              &lt;artifactId&gt;json-simple&lt;/artifactId&gt;
              &lt;version&gt;1.1.1&lt;/version&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;or.apache.poi&lt;/groupId&gt;
              &lt;artifactId&gt;poi-ooxml&lt;/artifactId&gt;
              &lt;version&gt;3.11-beta3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;xml-apis&lt;/groupId&gt;
              &lt;artifactId&gt;xml-spis&lt;/artifactId&gt;
              &lt;version&gt;2.0.2&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;xerces&lt;/groupId&gt;
              &lt;artifactId&gt;xercesImpl&lt;/artifactId&gt;
              &lt;version&gt;2.8.0&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
              &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
              &lt;version&gt;3.7.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
              &lt;artifactId&gt;selenium-remote-driver&lt;/artifactId&gt;
              &lt;version&gt;3.7.1&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;net.masterthought&lt;/groupId&gt;
              &lt;artifactId&gt;cocumber-reporting&lt;/artifactId&gt;
              &lt;version&gt;3.10.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.xml.bind&lt;/groupId&gt;
              &lt;artifactId&gt;jaxb-api&lt;/artifactId&gt;
              &lt;version&gt;2.2.11&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.xml.bind&lt;/groupId&gt;
              &lt;artifactId&gt;jaxb-core&lt;/artifactId&gt;
              &lt;version&gt;2.2.11&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.xml.bind&lt;/groupId&gt;
              &lt;artifactId&gt;jaxb-impl&lt;/artifactId&gt;
              &lt;version&gt;2.2.11&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.activation&lt;/groupId&gt;
              &lt;artifactId&gt;activation&lt;/artifactId&gt;
              &lt;version&gt;1.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.cocumber&lt;/groupId&gt;
              &lt;artifactId&gt;cocumber-core&lt;/artifactId&gt;
              &lt;version&gt;4.0.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.appium&lt;/groupId&gt;
              &lt;artifactId&gt;java-client&lt;/artifactId&gt;
              &lt;version&gt;4.1.2&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!--REPORTING --&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.googlecode.totallylazy&lt;/groupId&gt;
              &lt;artifactId&gt;totallylazy&lt;/artifactId&gt;
              &lt;version&gt;1.20&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.testng&lt;/groupId&gt;
              &lt;artifactId&gt;testng&lt;/artifactId&gt;
              &lt;version&gt;1.20&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.googlecode.totallylazy&lt;/groupId&gt;
              &lt;artifactId&gt;totallylazy&lt;/artifactId&gt;
              &lt;version&gt;1.20&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.testng&lt;/groupId&gt;
              &lt;artifactId&gt;testng&lt;/artifactId&gt;
              &lt;version&gt;6.13.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.ow2.asm&lt;/groupId&gt;
              &lt;artifactId&gt;asm&lt;/artifactId&gt;
              &lt;version&gt;6.0&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compailer-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.7.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;fork&gt;true&lt;/fork&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-report-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.20&lt;/version&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.22.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;parallel&gt;methods&lt;/parallel&gt;
                      &lt;threadcount&gt;3&lt;/threadcount&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;net.masterthought&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-cocumber-reporting&lt;/artifactId&gt;
                  &lt;version&gt;0.0.7&lt;/version&gt;
  
                  &lt;dependencies&gt;
                      &lt;dependency&gt;
                          &lt;groupId&gt;com.googlecode.totallylazy&lt;/groupId&gt;
                          &lt;artifactId&gt;totallylazy&lt;/artifactId&gt;
                          &lt;version&gt;991&lt;/version&gt;
                      &lt;/dependency&gt;
                  &lt;/dependencies&gt;
  
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;execution&lt;/id&gt;
                          &lt;phase&gt;verify&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;generate&lt;/goal&gt;
                          &lt;/goals&gt;
  
                          &lt;configuration&gt;
                              &lt;projectname&gt;cucumber-jvm-example&lt;/projectname&gt;
                              &lt;outputDirectory&gt;${project.build.directory}/site/cocumber-reports&lt;/outputDirectory&gt;
                              &lt;cocumberoutput&gt;${project.build.directory}/cocumber.json&lt;/cocumberoutput&gt;
                              &lt;enableFlashCharts&gt;false&lt;/enableFlashCharts&gt;
                              &lt;skippedFails&gt;true&lt;/skippedFails&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>My testrunner is as below.</p>
  
  <pre><code>import org.junit.runner.RunWith;
  import cucumber.api.CucumberOptions;
  import cucumber.api.junit.Cucumber;
  
  @RunWith(Cucumber.class)
  @CucumberOptions(plugin = {"html:target/cucumber-html-report",
  "json:target/cucumber.json","pretty:target/cucumber-pretty.txt",
  "usage:target/cucumber-usage.json, "junit:target/cucumber-results.xml"},
  features={"src/test/resources/featuresfiles"},strict=false,dryRun=false,
  glue={"Stepdef_new.stepdefinitions"},
  tags={"@Parallel"}
  }
  
  Public class TestRunner{
  }    
  </code></pre>