Maven报告生成不正确

时间:2018-12-19 12:07:50

标签: maven maven-surefire-plugin jbehave serenity-bdd

<dependency>
  <groupId>net.serenity-bdd</groupId>
  <artifactId>serenity-jbehave</artifactId>
  <version>1.1.0</version>
  <exclusions>
    <exclusion>
      <groupId>de.codecentric</groupId>
      <artifactId>jbehave-junit-runner</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>net.serenity-bdd</groupId>
  <artifactId>serenity-junit</artifactId>
  <version>1.1.2</version>
</dependency>
<dependency>
  <groupId>junit</groupId> <!-- NOT org.junit here -->
  <artifactId>junit-dep</artifactId>
  <version>4.8.2</version>
</dependency>
<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>
      <artifactId>maven-surefire-plugin</artifactId>
      <executions>
        <execution>
          <id>default-test</id>
          <configuration>
            <skip>true</skip>
          </configuration>
        </execution>
      </executions>
    </plugin>

    <plugin>
      <artifactId>maven-failsafe-plugin</artifactId>
      <version>2.21.0</version>
      <dependencies>
        <dependency>
          <groupId>org.apache.maven.surefire</groupId>
          <artifactId>surefire-junit47</artifactId>
          <version>2.21.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.20.1</version> -->
      <configuration>
        <showSuccess>true</showSuccess>
      </configuration>
    </plugin>

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

错误日志如下:

Generating reports view to 'C:\jenkins\workspace\HSBCnet_Mobile_Automation_Test_Webtouch_HK\target\jbehave' using formats '[stats, console, html, xml, serenityreporter, junitscenarioreporter]' and view properties '{decorateNonHtml=true}'
Reports view generated with 217 stories (of which 1 pending) containing 217 scenarios (of which 1 pending)
Failures in reports view: 91 scenarios failed
[WARNING] ForkStarter IOException: 
org.apache.maven.surefire.report.SafeThrowable.<init>(Ljava/lang/String;)V
org.apache.maven.surefire.report.SafeThrowable.<init>(Ljava/lang/String;)V

在我的项目中,我使用serenity和JBehave来实现BDD,在Jenkins中执行项目并生成HTML报告后,可以打开摘要页面,但是当我单击一种情况时,新页面显示错误:页面找不到

有人可以帮助检查为什么会发生这种情况吗?

0 个答案:

没有答案
相关问题