title: Not able to parallel test of two cucumber feature file
body: <p>i'm new in cucumber design and i trying to parallel test two feature file(login.feature, registration.feature, both are inside src/test/java/features), but not able run both parallel. can anyone help me out?</p>
  <p>Here is my pom.xml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
       xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven 
       4.0.0.xsd&quot;&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;groupId&gt;org.example&lt;/groupId&gt;
  &lt;artifactId&gt;NorthernMachine_Automation&lt;/artifactId&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
  
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;cucumber.version&gt;4.2.0&lt;/cucumber.version&gt;
  &lt;/properties&gt;
  
  &lt;build&gt;
      &lt;pluginManagement&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.github.temyers&lt;/groupId&gt;
                  &lt;artifactId&gt;cucumber-jvm-parallel-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.1.0&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;generateRunners&lt;/id&gt;
                          &lt;phase&gt;generate-test-sources&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;generateRunners&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;!-- Mandatory --&gt;
                              &lt;!-- comma separated list of package names to scan for glue code --&gt;
                              &lt;glue&gt;foo, bar&lt;/glue&gt;
                              &lt;outputDirectory&gt;${project.build.directory}/generated-test-sources/cucumber&lt;/outputDirectory&gt;
                              &lt;!-- The directory, which must be in the root of the runtime classpath, containing your feature files.  --&gt;
                              &lt;featuresDirectory&gt;src/test/resources/features/&lt;/featuresDirectory&gt;
                              &lt;!-- Directory where the cucumber report files shall be written  --&gt;
                              &lt;cucumberOutputDir&gt;target/cucumber-parallel&lt;/cucumberOutputDir&gt;
                              &lt;!-- comma separated list of output formats json,html,rerun.txt --&gt;
                              &lt;format&gt;json&lt;/format&gt;
                              &lt;!-- CucumberOptions.strict property --&gt;
                              &lt;strict&gt;true&lt;/strict&gt;
                              &lt;!-- CucumberOptions.monochrome property --&gt;
                              &lt;monochrome&gt;true&lt;/monochrome&gt;
                              &lt;!-- The tags to run, maps to CucumberOptions.tags property you can pass ANDed tags like &quot;@tag1&quot;,&quot;@tag2&quot; and ORed tags like &quot;@tag1,@tag2,@tag3&quot; --&gt;
                              &lt;tags&gt;&lt;/tags&gt;
                              &lt;!-- If set to true, only feature files containing the required tags shall be generated. --&gt;
                              &lt;filterFeaturesByTags&gt;false&lt;/filterFeaturesByTags&gt;
                              &lt;!-- Generate TestNG runners instead of default JUnit ones. --&gt;
                              &lt;useTestNG&gt;false&lt;/useTestNG&gt;
                              &lt;!-- The naming scheme to use for the generated test classes.  One of 'simple' or 'feature-title' --&gt;
                              &lt;namingScheme&gt;simple&lt;/namingScheme&gt;
                              &lt;!-- The class naming pattern to use.  Only required/used if naming scheme is 'pattern'.--&gt;
                              &lt;namingPattern&gt;Parallel{c}IT&lt;/namingPattern&gt;
                              &lt;!-- One of [SCENARIO, FEATURE]. SCENARIO generates one runner per scenario.  FEATURE generates a runner per feature. --&gt;
                              &lt;parallelScheme&gt;SCENARIO&lt;/parallelScheme&gt;
                              &lt;!-- This is optional, required only if you want to specify a custom template for the generated sources (this is a relative path) --&gt;
                              &lt;customVmTemplate&gt;src/test/resources/cucumber-custom-runner.vm&lt;/customVmTemplate&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&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.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                      &lt;fork&gt;true&lt;/fork&gt;
                      &lt;!--&lt;executable&gt;C:\Program Files\Java\jdk1.8.0_121\bin\javac.exe&lt;/executable&gt; --&gt;
                      &lt;!--    &lt;executable&gt;${env.JAVA_HOME}\bin\javac.exe&lt;/executable&gt;--&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;mainClass&gt;BuyAGiftFramework.utilities.SendEmailFile&lt;/mainClass&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-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.19&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;forkCount&gt;5&lt;/forkCount&gt;
                      &lt;reuseForks&gt;true&lt;/reuseForks&gt;
                      &lt;includes&gt;
                          &lt;include&gt;**/*IT.class&lt;/include&gt;
                      &lt;/includes&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-plugin-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;goalPrefix&gt;cucumber-jvm-parallel&lt;/goalPrefix&gt;
                      &lt;skipErrorNoDescriptorsFound&gt;true&lt;/skipErrorNoDescriptorsFound&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;mojo-descriptor&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;descriptor&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                      &lt;execution&gt;
                          &lt;id&gt;help-goal&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;helpmojo&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/pluginManagement&gt;
  &lt;/build&gt;
  
  &lt;dependencies&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java --&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.11.0&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.0&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/info.cukes/cucumber-core --&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.5&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/info.cukes/cucumber-html --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;info.cukes&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-html&lt;/artifactId&gt;
          &lt;version&gt;0.2.3&lt;/version&gt;
      &lt;/dependency&gt;
  
  
      &lt;!-- https://mvnrepository.com/artifact/info.cukes/gherkin --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;info.cukes&lt;/groupId&gt;
          &lt;artifactId&gt;gherkin&lt;/artifactId&gt;
          &lt;version&gt;2.12.2&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest-all --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hamcrest&lt;/groupId&gt;
          &lt;artifactId&gt;hamcrest-all&lt;/artifactId&gt;
          &lt;version&gt;1.3&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- Extent Reports --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.vimalselvam&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-extentsreport&lt;/artifactId&gt;
          &lt;version&gt;3.0.2&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.aventstack&lt;/groupId&gt;
          &lt;artifactId&gt;extentreports&lt;/artifactId&gt;
          &lt;version&gt;3.1.2&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/org.freemarker/freemarker --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.freemarker&lt;/groupId&gt;
          &lt;artifactId&gt;freemarker&lt;/artifactId&gt;
          &lt;version&gt;2.3.26-incubating&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/net.masterthought/cucumber-reporting --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;net.masterthought&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-reporting&lt;/artifactId&gt;
          &lt;version&gt;3.6.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/commons-io/commons-io --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-io&lt;/groupId&gt;
          &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
          &lt;version&gt;2.6&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple --&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;!-- https://mvnrepository.com/artifact/log4j/log4j --&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;com.github.javafaker&lt;/groupId&gt;
          &lt;artifactId&gt;javafaker&lt;/artifactId&gt;
          &lt;version&gt;0.15&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.sun.mail&lt;/groupId&gt;
          &lt;artifactId&gt;javax.mail&lt;/artifactId&gt;
          &lt;version&gt;1.6.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.github.temyers&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-jvm-parallel-plugin&lt;/artifactId&gt;
          &lt;version&gt;4.2.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-picocontainer&lt;/artifactId&gt;
          &lt;version&gt;4.2.6&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;7.1.0&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-testng&lt;/artifactId&gt;
          &lt;version&gt;6.2.2&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-junit&lt;/artifactId&gt;
          &lt;version&gt;6.4.0&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>Here is my runnerclass, which is inside the src\test\java\runners\MainRunnerTest.java:</p>
  <pre><code>package runners;
  
  import cucumber.api.CucumberOptions;
  import io.cucumber.junit.Cucumber;
  import io.cucumber.testng.AbstractTestNGCucumberTests;
  import org.junit.runner.RunWith;
  import org.testng.annotations.DataProvider;
  
  @RunWith(Cucumber.class)
  @CucumberOptions(features = {&quot;src/test/java/features/&quot;},
      glue = {&quot;stepDefinitions&quot;},
      monochrome = true, tags = {&quot;@RegressionTest&quot;}
  )
  
  
  public class MainRunnerTest extends AbstractTestNGCucumberTests {
  
  MainRunnerTest mainRunnerTest;
  
  @DataProvider(parallel = true)
  public Object[][] features() {
      return mainRunnerTest.features();
  }
  }
  </code></pre>
  <p>Here is my</p>