Cucumber JVM Parallel Plugin не создает ожидаемые файлы отчетов JSON, когда Allure argLines представлены в maven - PullRequest
0 голосов
/ 03 октября 2018

Я работаю с:

  • cucumber-jvm-parallel-plugin (Используя Maven Project)
  • Allure Report

Ссылка Доказательство концепции: github / POC_CucumberJvmPPNotWorkingWithAllureInPOM

pom.xml:

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>

    <!-- Versioning -->
    <aspectj.version>1.9.1</aspectj.version>

</properties>


<build>
    <plugins>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.0</version>

            <configuration>
                <encoding>${project.build.sourceEncoding}</encoding>
                <source>${maven.compiler.source}</source>
                <target>${maven.compiler.target}</target>
            </configuration>

        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.22.0</version>

            <configuration>
                <argLine>
                     -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                     -Dcucumber.options="--plugin io.qameta.allure.cucumber3jvm.AllureCucumber3Jvm"
                </argLine>
                <parallel>all</parallel>
                <forkCount>5</forkCount>
                <reuseForks>true</reuseForks>
                <testFailureIgnore>true</testFailureIgnore>
                <includes>
                    <include>**/*IT.class</include>
                </includes>
            </configuration>
        </plugin>

        <plugin>
            <groupId>com.github.temyers</groupId>
            <artifactId>cucumber-jvm-parallel-plugin</artifactId>
            <version>5.0.0</version>
            <executions>
                <execution>
                    <id>generateRunners</id>
                    <phase>generate-test-sources</phase>
                    <goals>
                        <goal>generateRunners</goal>
                    </goals>
                    <configuration>

                        <glue>
                            <package>stepDefinitions</package>
                        </glue>

                        <outputDirectory>
                            ${project.build.directory}/generated-test-sources/cucumber-jvm-parllel-plugin
                        </outputDirectory>
                        <featuresDirectory>
                            src/test/resources/features/
                        </featuresDirectory>
                        <cucumberOutputDir>
                            ${project.build.directory}/cucumber-jvm-parallel-plugin/json
                        </cucumberOutputDir>

                        <plugins>
                            <plugin>
                                <name>json</name>
                            </plugin>
                        </plugins>

                        <strict>true</strict>
                        <monochrome>true</monochrome>
                        <useTestNG>true</useTestNG>
                        <namingScheme>simple</namingScheme>
                        <namingPattern>Parallel{c}IT</namingPattern>
                        <parallelScheme>FEATURE</parallelScheme>
                    </configuration>
                </execution>
            </executions>
        </plugin>

    </plugins>
</build>

<dependencies>



    <!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>4.0.0</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-jvm -->
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-jvm</artifactId>
        <version>4.0.0</version>
        <type>pom</type>
    </dependency>

    <!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-picocontainer -->
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-picocontainer</artifactId>
        <version>4.0.0</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-jvm-deps -->
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-jvm-deps</artifactId>
        <version>1.0.6</version>
        <scope>provided</scope>
    </dependency>


    <!-- https://mvnrepository.com/artifact/io.cucumber/gherkin -->
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>gherkin</artifactId>
        <version>5.1.0</version>
    </dependency>


    <!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-testng -->
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-testng</artifactId>
        <version>4.0.0</version>
    </dependency>

    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.14.3</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.vimalselvam/cucumber-extentsreport -->
    <dependency>
        <groupId>com.vimalselvam</groupId>
        <artifactId>cucumber-extentsreport</artifactId>
        <version>3.1.1</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.aventstack/extentreports -->
    <dependency>
        <groupId>com.aventstack</groupId>
        <artifactId>extentreports</artifactId>
        <version>3.1.5</version>
        <scope>provided</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
    <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjweaver</artifactId>
        <version>${aspectj.version}</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-maven -->
    <dependency>
        <groupId>io.qameta.allure</groupId>
        <artifactId>allure-maven</artifactId>
        <version>2.9</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-cucumber3-jvm -->
    <dependency>
        <groupId>io.qameta.allure</groupId>
        <artifactId>allure-cucumber3-jvm</artifactId>
        <version>2.7.0</version>
    </dependency>


</dependencies>

Ожидается: cucumber-jvm-parallel-pluginдолжен генерировать файлы json отчета.

Фактически: После выполнения из командной строки: mvn clean проверьте, присутствует ли argLine под подключаемым модулем surefire для отчета об очаровании, report.json не создаетсяCucumber-JVM-параллельный плагин

<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
-Dcucumber.options="--plugin io.qameta.allure.cucumber3jvm.AllureCucumber3Jvm"

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...