簡體   English   中英

所有 maven 萬無一失的報告都是零? 怎么會這樣?

[英]All maven surefire reports are zero! How could this happen?

我有一個配置了 maven surefire 插件的 scala 項目:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.2</version>
      </plugin>

當我運行所有測試並生成測試報告時,我在索引頁面上發現了以下信息:

Surefire Report
Summary

[Summary] [Package List] [Test Cases]

Tests   Errors  Failures    Skipped     Success Rate    Time
0   0   0   0   0%  0

似乎忽略了test-results/scalatest下的所有 scalatest 結果? 怎么會這樣。 gradle測試報告絕不會出現這種情況。

我剛剛發現 scalatest 不是為與 maven-surefire-plugin 或 maven-surefire-report-plugin 一起工作而設計的,它必須以 html 格式生成自己的測試報告:

      <plugin>
        <groupId>org.scalatest</groupId>
        <artifactId>scalatest-maven-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
          <reportsDirectory>${project.build.directory}/test-results/scalatest</reportsDirectory>
          <junitxml>.</junitxml>
          <htmlreporters>${project.build.directory}/site/scalatest</htmlreporters>

...

結案。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM