宁静maven项目运行而不执行测试并显示空白报告

时间:2016-02-20 09:04:16

标签: serenity-bdd

我正在努力与Maven保持平静。它的运行和显示成功,但实际测试没有运行,报告显示为空白。我附上了我的proj和POM。请帮忙enter image description here

<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">
  <modelVersion>4.0.0</modelVersion>
  <groupId>serenity</groupId>
  <artifactId>serenity</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>serenity practise</name>
<properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <junit.version>4.10</junit.version>
        <serenity.version>1.0.47</serenity.version>
        <serenity.maven.version>1.0.47</serenity.maven.version>
        <webdriver.driver>firefox</webdriver.driver>
    </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>2.45.0</version>
        </dependency>
        <dependency>
            <groupId>net.serenity-bdd</groupId>     
            <artifactId>core</artifactId>
            <version>${serenity.version}</version>
        </dependency>
        <dependency>
            <groupId>net.serenity-bdd</groupId>     
            <artifactId>serenity-junit</artifactId>
            <version>${serenity.version}</version>
        </dependency>
     </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>                  
                <version>2.18</version>
                <configuration>
                    <includes>
                        <include>**/*/**/When*.java</include>                  
                    </includes>
                    <systemProperties>
                        <webdriver.driver>${webdriver.driver}</webdriver.driver> 
                        <surefire.rerunFailingTestsCount>${surefire.rerunFailingTestsCount}</surefire.rerunFailingTestsCount>
                        <surefire.rerunFailingTestsCount>${surefire.rerunFailingTestsCount}</surefire.rerunFailingTestsCount>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.serenity-bdd.maven.plugins</groupId>       
                <artifactId>serenity-maven-plugin</artifactId>
                <version>${serenity.maven.version}</version>
                <dependencies>
                     <dependency>
                        <groupId>net.serenity-bdd</groupId>
                        <artifactId>core</artifactId>
                        <version>${serenity.version}</version>
                    </dependency>
                    <dependency>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.5.1</version>

</dependency>

                </dependencies>
                <executions>
                    <execution>
                        <id>serenity-reports</id>
                        <phase>post-integration-test</phase>             
                        <goals>
                            <goal>aggregate</goal>                       
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

0 个答案:

没有答案