temyers / cucumber-jvm-parallel-plugin

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

Plugin seems to do nothing. #149

Closed kaydeeH closed 7 years ago

kaydeeH commented 7 years ago

I never see the plugin kick off, or throw an error, and no IT files are generated (in fact the folders for them aren't even generated). I feel like it's a POM config issue, but I don't know. I'm on Mac Sierra and IntelliJ IDEA 2017.2.5. I currently have one feature file in the features folder and I've eliminated all tags and extraneous characters. Here's my pom file as it stands now... What should I be running to get the plugin to start? I've been beating my head against this for hours and I've not once, even after dramatically simplifying the contents of my project, seen an IT class file or even a cucumber folder get created, nor one single error from the plugin. I've tried both surefire and failsafe, but I don't think I'm even getting to where they matter. It's like the cucumber-jvm-parallel-plugin isn't even running. Any help would be greatly appreciated!

<?xml version="1.0" encoding="UTF-8"?> <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">

4.0.0
<groupId>com.etw.quality</groupId>
<artifactId>qa-ui-tests</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <junit.version>4.12</junit.version>
    <selenium.version>3.6.0</selenium.version>
    <cucumber.version>1.2.5</cucumber.version>
</properties>

<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>${selenium.version}</version>
    </dependency>
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>${cucumber.version}</version>
    </dependency>
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-junit</artifactId>
        <version>${cucumber.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>4.2.4.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>4.2.3.RELEASE</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-htmlunit-driver</artifactId>
        <version>2.52.0</version>
    </dependency>
    <dependency>
        <groupId>com.jayway.restassured</groupId>
        <artifactId>rest-assured</artifactId>
        <version>2.9.0</version>
    </dependency>
    <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20160212</version>
    </dependency>
    <dependency>
        <groupId>data-manager</groupId>
        <artifactId>data-manager</artifactId>
        <version>1.1-SNAPSHOT</version>
    </dependency>
</dependencies>

<build>
    <pluginManagement>
        <plugins>
           <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <executions>
                    <execution>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <forkCount>5</forkCount>
                            <reuseForks>true</reuseForks>
                            <includes>
                                <include>**/*IT.class</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.temyers</groupId>
                <artifactId>cucumber-jvm-parallel-plugin</artifactId>
                <version>4.2.0</version>
                <executions>
                    <execution>
                        <id>generateRunners</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>generateRunners</goal>
                        </goals>
                        <configuration>
                            <glue>
                                <package>com.etw.quality</package>
                                <package>com.etw.quality.stepdefs</package>
                                <package>com.etw.quality.stepdefs.admin</package>
                                <package>com.etw.quality.stepdefs.app</package>
                                <package>com.etw.quality.stepdefs.common</package>
                                <package>com.etw.quality.stepdefs.jira_zephyr</package>
                                <package>com.etw.quality.stepdefs.support</package>
                            </glue>
                            <outputDirectory>target/cucumber-parallel/generated-test-sources/cucumber</outputDirectory>
                            <cucumberOutputDir>target/cucumber-parallel</cucumberOutputDir>
                            <!--<format>html</format>-->
                            <!--<strict>true</strict>-->
                            <!--<monochrome>true</monochrome>-->
                            <!--<filterFeaturesByTags>true</filterFeaturesByTags>-->
                            <featuresDirectory>src/test/resources/features</featuresDirectory>
                            <parallelScheme>SCENARIO</parallelScheme>
                            <!--<tags>-->
                                <!--<tag>@Messaging</tag>-->
                                <!--<tag>~@pending</tag>-->
                                <!--<tag>~@wip</tag>-->
                            <!--</tags>-->
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!--<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.20.1</version>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                        <configuration>
                            <forkCount>5</forkCount>
                            <reuseForks>true</reuseForks>
                            <includes>
                                <include>**/*IT.class</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>-->
        </plugins>
    </pluginManagement>
</build>

temyers commented 7 years ago

The <pluginManagement> section doesn't cause execution, in the same way as <dependencyManagement> doesn't add a dependency. It defines configuration to be applied when the plugin is declared.

You need to specify <plugins> section.

See: https://maven.apache.org/pom.html

kaydeeH commented 7 years ago

That fixed it, thank you! Definitely not a Maven expert here and I inherited this pom file, so... Anyways, thank you!!