宁静报告未正确生成

时间:2018-12-23 14:05:07

标签: maven jbehave serenity-bdd

我正在运行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>

0 个答案:

没有答案