Отчет о спокойствии генерируется неправильно - PullRequest
0 голосов
/ 23 декабря 2018

Я запускаю тестирование BDD, я использую maven, Serenity, JBehave в своей структуре, когда мой тест завершается, отчет генерируется в папке target / site / serenity, но когда я открываю index.html,щелкните вкладку Результаты теста, затем щелкните ссылку сценария, страница отчета сценария не найдена.Почему это произошло?

Это мой POM.xml

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <selenium-version>2.50.1</selenium-version>
    <serenity.version>2.0.28</serenity.version>
    <serenity.maven.version>1.0.47</serenity.maven.version>
    <serenity.jbehave.version>1.44.0</serenity.jbehave.version>
    <webdriver.driver>chrome</webdriver.driver>
</properties>

<dependencies>
    <dependency>
        <groupId>net.serenity-bdd</groupId>     
        <artifactId>serenity-junit</artifactId>
        </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.6.1</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>1.7.0</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-core</artifactId>
        </dependency>

    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-jbehave</artifactId>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-jbehave</artifactId>
        <exclusions>
            <exclusion>
                <groupId>de.codecentric</groupId>
                <artifactId>jbehave-junit-runner</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-junit</artifactId>
    </dependency>
    <dependency>
        <groupId>junit</groupId>     <!-- NOT org.junit here -->
        <artifactId>junit-dep</artifactId>
        <version>4.8.2</version>
    </dependency>

</dependencies>



<build>

    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.2-beta-5</version><!--$NO-MVN-MAN-VER$ -->
            <configuration>
                <descriptors>
                    <descriptor>assembly/project.xml</descriptor>
                </descriptors>
            </configuration>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.22.0</version>
            <executions>
                <execution>
                    <id>default-test</id>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.18</version>

            <dependencies>
                <dependency>
                    <groupId>org.apache.maven.surefire</groupId>
                    <artifactId>surefire-junit47</artifactId>
                    <version>2.22.0</version>
                </dependency>
            </dependencies>
            <executions>
                <execution>
                    <id>execute-acceptance-test-suite</id>
                    <goals>
                        <goal>integration-test</goal>
                        <goal>verify</goal>
                    </goals>
                    <configuration>
                        <includes>
                            <include>**/acceptancetest/AllStoryTestSuite.java</include>
                        </includes>
                        <systemProperties>
                            <surefire.rerunFailingTestsCount>0</surefire.rerunFailingTestsCount>
                        </systemProperties>
                    </configuration>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-report-plugin</artifactId>
            <!-- <version>2.11</version> -->
            <version>2.21.0</version>
            <configuration>
                <showSuccess>true</showSuccess>
            </configuration>
        </plugin>

        <plugin>
            <groupId>net.serenity-bdd.maven.plugins</groupId>
            <artifactId>serenity-maven-plugin</artifactId>
            <version>${serenity.version}</version>
            <dependencies>
                <dependency>
                    <groupId>net.serenity-bdd</groupId>
                    <artifactId>serenity-core</artifactId>
                    <version>${serenity.version}</version>
                </dependency>
            </dependencies>
            <executions>
                <execution>
                    <id>serenity-reports</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>aggregate</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
...