1

Iam using Selenium-Cucumber maven framework with Junit. Now when I run the test in parallel, a simple html report is generating. How can we generate each individual extent reports separately in each run without over writing? Below is the plugin configuration in POM file :

<plugin>
<groupId>com.github.temyers</groupId>
<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version>2.2.0</version>
            <executions>
                <execution>
                    <id>generateRunners</id>
                    <phase>validate</phase>
                    <goals>
                        <goal>generateRunners</goal>
                    </goals>
                    <configuration>
                        <glue>src/test/java/stepDefinition/baseDefinition</glue>
                        <featuresDirectory>src/test/resources</featuresDirectory>
                        <cucumberOutputDir>target/cucumber-parallel</cucumberOutputDir>
                        <format>json,html</format>
                        <tags>"~@ignored"</tags>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.19</version>
            <configuration>
                <forkCount>10</forkCount>
                <reuseForks>true</reuseForks>
                <includes>
                    <include>**/Parallel*IT.class</include>
                </includes>
            </configuration>
       </plugin>

    </plugins>

Where should I write the code for Extent reports ? also where should we mention about the extent report plugin? If we are not using parallel execution, we will be simply add the Extent Report plugin in the TestRunner.java . But here, for parallel execution, where do we specify the Extent report plugins and its details ? Iam very thankful if you guys help me with a perfect solution. Thanks in advance.

Milu
  • 135
  • 1
  • 3
  • 13
  • Can you show us how do you add Extent Report plugin in TestRunner.java? – Fenio Sep 25 '18 at 14:47
  • I have added extent report plugin inside @CucumberOptions and added the statement Reporter.loadXMLConfig(new File("config/report.xml")); in AfterClass – Milu Sep 26 '18 at 04:15
  • Do you know how parallel execution works in cucumber? Surefire plugin runs multiple Runners at once. Did you try annotation all runners which you want to execute in parallel? – Fenio Sep 27 '18 at 07:56
  • Actually I am not well aware of parallel execution. Iam just a beginner. I have added cucumber-jvm-parallel-plugin & maven-surefire-plugin in the POM file. and then I have commented out the code inside CucumberOptions annotation. Then after running the test from command line, Build is getting failed and i am unable to understand where I am going wrong – Milu Sep 27 '18 at 09:38
  • 1
    Focus on parallel running first. When you solve the issue, try to fix Extent Reports – Fenio Sep 27 '18 at 10:45
  • yes. sure. But can you please tell me how to perform parallel testing in selenium cucumber . I am not getting a correct answer. Thanks in advance – Milu Sep 27 '18 at 10:48
  • This question is not related to Parallel test execution. It's related to Extent Reports. You should start a new thread. – Fenio Sep 27 '18 at 10:52
  • ok sure will do – Milu Sep 27 '18 at 10:53

0 Answers0