Maven Surefire
  1. Maven Surefire
  2. SUREFIRE-247

test failures causes report not to be generated

    Details

    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Activity

      Hide
      Johnny R. Ruiz III added a comment -

      This is because of this line: @execute phase="test"

      If you use mvn -Dmaven.test.failure.ignore=true then the report will be generated.

      I can't think of a solution for this other than removing @execute phase="test" in SurefireReportMojo.java.

      Any suggestions?

      Show
      Johnny R. Ruiz III added a comment - This is because of this line: @execute phase="test" If you use mvn -Dmaven.test.failure.ignore=true then the report will be generated. I can't think of a solution for this other than removing @execute phase="test" in SurefireReportMojo.java. Any suggestions?
      Hide
      Jerome Lacoste added a comment -

      I hit the same issue. As a developer I run m2 mostly from the command line. When tests fails I have to go trough the surefire-reports to find which tests failed. That already is not very practical.
      Now I have not only say to maven to generate reports but do not fail upon failure. WHat's the point of having reports if everything works?
      Can't the maven.test.failure.ignore be set to true automatically when the reports are generated?

      I also would like to be able to run the reports only in a simple way without rerunning the tests.
      E.g. I run mvn test. Some tests fail. I now want the reports. I can probably do that using the surefire-report-plugin on the command line. But the verbosity of the command to use is sometimes overwhelming. But I guess I will have to live with that, right?

      Show
      Jerome Lacoste added a comment - I hit the same issue. As a developer I run m2 mostly from the command line. When tests fails I have to go trough the surefire-reports to find which tests failed. That already is not very practical. Now I have not only say to maven to generate reports but do not fail upon failure. WHat's the point of having reports if everything works? Can't the maven.test.failure.ignore be set to true automatically when the reports are generated? I also would like to be able to run the reports only in a simple way without rerunning the tests. E.g. I run mvn test. Some tests fail. I now want the reports. I can probably do that using the surefire-report-plugin on the command line. But the verbosity of the command to use is sometimes overwhelming. But I guess I will have to live with that, right?
      Hide
      Brett Porter added a comment -

      we need to setup a lifecycle for the @execute phase that sets this configuration (see the lifecycle docs)

      Show
      Brett Porter added a comment - we need to setup a lifecycle for the @execute phase that sets this configuration (see the lifecycle docs)
      Hide
      Bill Dudney added a comment -

      I don't get the reports even if I use '-Dmaven.test.failure.ignore=true'.

      Show
      Bill Dudney added a comment - I don't get the reports even if I use '-Dmaven.test.failure.ignore=true'.
      Hide
      Jim Babka added a comment -

      With the latest version (2.1.2), I get a message saying that "There are some test failure," but I get no reports anywhere whether or not I specify that variable, or whether or not I specify "testFailureIgnore" in the plugin config. I got the reports fine with 2.0, but not with 2.1.2.

      Show
      Jim Babka added a comment - With the latest version (2.1.2), I get a message saying that "There are some test failure," but I get no reports anywhere whether or not I specify that variable, or whether or not I specify "testFailureIgnore" in the plugin config. I got the reports fine with 2.0, but not with 2.1.2.
      Hide
      Fabrice Bellingard added a comment -

      I don't get the reports even if I use '-Dmaven.test.failure.ignore=true' as well.
      I think this issue should be put to critical as this breaks any build that uses this plugin if there are tests failures.

      Show
      Fabrice Bellingard added a comment - I don't get the reports even if I use '-Dmaven.test.failure.ignore=true' as well. I think this issue should be put to critical as this breaks any build that uses this plugin if there are tests failures.

        People

        • Assignee:
          Brett Porter
          Reporter:
          Brett Porter
        • Votes:
          5 Vote for this issue
          Watchers:
          6 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: