Есть отличная удаленная работа для php+codeception+jenkins+allure+docker спецов. 100% remote! Присоединиться к проекту

ArrayIndexOutOfBoundsException при попытке получить allur репорт для child maven модуля в cucumber-jvm-junit сьюте

maven-surefire-plugin
cucumber
junit
webdriver
allure
Теги: #<Tag:0x00007f7b70482888> #<Tag:0x00007f7b70482748> #<Tag:0x00007f7b70482608> #<Tag:0x00007f7b70482428> #<Tag:0x00007f7b704822e8>

(qa_in_gene_qa_in_gene) #1

Подскажите пожалуйста в чем может быть причина проблемы?
Суть в следующем, у меня есть cucumber-jvm-junit-maven тестовый сьют, parent и child xml, хочу подключить к нему allure.
В сьюте использую maven-surefire-plugin плагин.

После запуска команды:

mvn -am -pl chm clean verify -Dtag1=~@skip -Dtag2=~@pre-setup -Dfeature=node-2-1/Login.feature -Dbrowser=firefox -Dremote=false

все работает отлично, до тех пор пока не подключаю в родительский pom.xml listener.
После этого отображается следующий лог:

1 Scenarios (1 passed)

2 Steps (2 passed)

0m34.053s

[INFO] BUILD FAILURE

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.18:test
(acceptance-test) on project sam: Execution acceptance-test of goal
org.apache.maven.plugins:maven-surefire-plugin:2.18:test failed: There
was an error in the forked process

[ERROR] org.apache.maven.surefire.testset.TestSetFailedException:
java.lang.ArrayIndexOutOfBoundsException: 1
[ERROR] at
org.apache.maven.surefire.common.junit4.JUnit4RunListener.rethrowAnyTestMechanismFailures(JUnit4RunListener.java:213)

Вот parent pom.xml:

` qa-selenium-test-suite
http://maven.apache.org

<groupId>my.com.testproject</groupId>
<artifactId>qa-selenium-test-suite</artifactId>
<version>1.0-SNAPSHOT</version>
<modules>
    <module>common</module>
    <module>chm</module>
</modules>
<packaging>pom</packaging>


<properties>
    <allure.version>1.4.11</allure.version>
    <aspectj.version>1.7.4</aspectj.version>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <version.maven.compiler.plugin>3.1</version.maven.compiler.plugin>
    <version.junit>4.11</version.junit>
    <version.junit.cucumber>1.2.4</version.junit.cucumber>
    <version.cucumber.picocontainer>1.1.5</version.cucumber.picocontainer>
    <version.maven.cucumber.reporting>0.0.4</version.maven.cucumber.reporting>
    <cucumber.features.dir>src/test/resources/features</cucumber.features.dir>
    <feature>features</feature>
    <tag1>~@no-tag-specified</tag1>
    <tag2>~@no-tag-specified</tag2>
    <browser>firefox</browser>
    <remote>false</remote>
    <planName></planName>
    <cucumber.maven.report>${project.build.directory}/cucumber-html-reports-extended</cucumber.maven.report>
    <cucumber.json>${project.build.directory}/cucumber.json</cucumber.json>
</properties>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>my.com.testproject</groupId>
            <artifactId>common</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>${version.junit.cucumber}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${version.junit}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-picocontainer</artifactId>
            <version>${version.cucumber.picocontainer}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>gherkin</artifactId>
            <version>2.12.2</version>
            <type>jar</type>
        </dependency>


        <dependency>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-java-annotations</artifactId>
            <version>1.4.4</version>
        </dependency>
        <dependency>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-cucumber-jvm-adaptor</artifactId>
            <version>1.5.1</version>
        </dependency>
    </dependencies>
</dependencyManagement>


<build>
    <plugins>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.7</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <configuration>
                        <target>
                            <zip destfile="${project.basedir}/target/build/${planName}.zip" basedir="${project.basedir}" excludes="target/**" />
                        </target>
                    </configuration>
                    <goals>
                        <goal>run</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>



        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${version.maven.compiler.plugin}</version>
            <configuration>
                <encoding>UTF-8</encoding>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.18</version>
            <executions>
                <execution>
                    <id>acceptance-test</id>
                    <phase>integration-test</phase>
                    <goals>
                        <goal>test</goal>
                    </goals>
                    <configuration>
                        <testFailureIgnore>false</testFailureIgnore>

                        <includes>
                            <include>**/MainRun.java</include>
                        </includes>

                        <argLine>
                            -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
                        </argLine>
                        <properties>
                            <property>
                                <name>listener</name>
                                <value>ru.yandex.qatools.allure.cucumberjvm.AllureRunListener</value>
                            </property>
                        </properties>

                        <systemPropertyVariables>
                            <cucumber.options>
                                <![CDATA[--tags ${tag1} --tags ${tag2} ${cucumber.features.dir}/${feature}]]>
                            </cucumber.options>
                            <browser>${browser}</browser>
                            <remote>${remote}</remote>
                            <propertyName>env</propertyName>
                            <propertyName>BUILD_NUMBER</propertyName>
                        </systemPropertyVariables>
                    </configuration>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjweaver</artifactId>
                    <version>${aspectj.version}</version>
                </dependency>
            </dependencies>
        </plugin>

        <!--Needed only to show reports locally. Run jetty:run and
      open localhost:8080 to show the report-->
        <plugin>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>9.2.10.v20150310</version>
            <configuration>
                <webAppSourceDirectory>${project.build.directory}/site/allure-maven-plugin</webAppSourceDirectory>
                <stopKey>stop</stopKey>
                <stopPort>1234</stopPort>
            </configuration>
        </plugin>
    </plugins>
</build>
<reporting>
    <excludeDefaults>true</excludeDefaults>
    <plugins>
        <plugin>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-maven-plugin</artifactId>
            <version>2.0</version>
        </plugin>
    </plugins>
</reporting> `

Child pom.xml:

`
qa-selenium-test-suite
my.com.testproject
1.0-SNAPSHOT

4.0.0

<artifactId>chm</artifactId>
<packaging>jar</packaging>

<name>sam</name>
<url>http://maven.apache.org</url>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-junit</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-picocontainer</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-java-annotations</artifactId>
        <version>1.4.4</version>
    </dependency>
    <dependency>
        <groupId>ru.yandex.qatools.allure</groupId>
        <artifactId>allure-cucumber-jvm-adaptor</artifactId>
        <version>1.5.1</version>
    </dependency>

</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>net.masterthought</groupId>
            <artifactId>maven-cucumber-reporting</artifactId>
            <version>${version.maven.cucumber.reporting}</version>
            <executions>
                <execution>
                    <id>execution</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <configuration>
                        <projectName>SAM-UI-Cucumber-Suite</projectName>
                        <outputDirectory>${cucumber.maven.report}</outputDirectory>
                        <cucumberOutput>${cucumber.json}</cucumberOutput>
                        <enableFlashCharts>false</enableFlashCharts>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>`

(qa_in_gene_qa_in_gene) #2

проблема была решена после того как были убраны круглые скобки из сценария