temyers / cucumber-jvm-parallel-plugin

Maven plugin to help running Cucumber features in parallel
Apache License 2.0
129 stars 121 forks source link

Parallel execution using cucumber-jvm-parallel-plugin - how to get reports #159

Closed sam04141 closed 6 years ago

sam04141 commented 6 years ago

Hi Experts, I am executing my automation program for multiple real devices, using cucumber-jvm-parallel-plugin currently i cant generate reports using json file becase

  1. each scenario new json file creates,
  2. even program executes in 2 devices only once json file create per one scenario. seems first json file override from 2nd execution

Appreciate if you could help me to generate report bellow are the MAVEN dependencies which i am using

com.github.temyers cucumber-jvm-parallel-plugin 4.2.0 generateRunners validate generateRunners nz.co.skytv.sporthighlightsautomation.cucumber ${project.build.directory}/generated-test-sources/features/${device} src/test/resources/ target/cucumber-parallel/${device} json @LaunchApp Parallel{c}IT SCENARIO

my report plugin is

net.masterthought maven-cucumber-reporting 3.6.0 execution package generate sporthighlightsautomation ${project.build.directory}/Report/${device}_results target/cucumber-parallel/ true

"my surefire planing is"

<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.19.1</version>
            <configuration>
                <testFailureIgnore>true</testFailureIgnore>
            </configuration>
            <executions>
                <execution>
                    <id>acceptance-test</id>
                    <phase>integration-test</phase>
                    <goals>
                        <goal>test</goal>
                    </goals>
                    <configuration>
                        <forkCount>2</forkCount>
                        <reuseForks>true</reuseForks>
                        <includes>
                            <include>**/*IT.class</include>
                        </includes>
                    </configuration>
                </execution>
            </executions>
        </plugin>

Appreciate your help on this matter

sam04141 commented 6 years ago

cucumber parallel plugin and report plugin are as bellow

com.github.temyers cucumber-jvm-parallel-plugin 4.2.0 generateRunners validate generateRunners nz.co.skytv.sporthighlightsautomation.cucumber ${project.build.directory}/generated-test-sources/features/${device} src/test/resources/ target/cucumber-parallel/${device} json @LaunchApp Parallel{c}IT SCENARIO
        <plugin>
        <groupId>net.masterthought</groupId>
        <artifactId>maven-cucumber-reporting</artifactId>
        <version>3.6.0</version>
        <executions>
            <execution>
                <id>execution</id>
                <phase>package</phase>
                <goals>
                    <goal>generate</goal>
                </goals>
                <configuration>
                    <projectName>sporthighlightsautomation</projectName>
                    <outputDirectory>${project.build.directory}/Report/${device}_results</outputDirectory>
                    <cucumberOutput>target/cucumber-parallel/</cucumberOutput>
                    <parallelTesting>true</parallelTesting>
                </configuration>
            </execution>
        </executions>
    </plugin>
mpkorstanje commented 6 years ago

This plugin only generates the runners based on the input you provide. As you're providing it with:

                    <outputDirectory>${project.build.directory}/Report/${device}_results</outputDirectory>

I strongly suspect the problem is located in your configuration. You didn't mention anything about a maven profile or multiple executions of the reporting plugin to ensure it generates a a runner for each device.

If anything you should check if the generated sources are as expected.

Then if you think there is an actuall bug please provide https://stackoverflow.com/help/mcve preferably in the form of github repository.