Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-507

Not able to get a surefire report with failed Junit Tests

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.4.3
    • None
    • JUnit 3.x support
    • None
    • Ubuntu 8.04, Maven 2.0.9, Surefire Report plugin 2.4.3

    Description

      First of all I set up an example Maven Project from quickstart archetype and wrote some JUnit 3 Testdummy methods. One of these dummy test methods is set to fail.

      After integration of the surefire-report-plugin version 2.4.3 into pom.xml it produces an Maven Build failure.
      The surefire report-site has a table of statistics with failed tests and successful test. So it makes no sense when Maven (Goal site:site or site:run) fails and reports are shown only if everything was tested successful.

      Is this a bug or how can I configure my pom correctly to resolve this problem?

      ==== Failure output:

      [...]
      [INFO] [surefire:test]
      [INFO] Surefire report directory: /home/alexanderbehrend/workspaceJava/junitlesson/target/surefire-reports

      -------------------------------------------------------
      T E S T S
      -------------------------------------------------------
      Running codersdoc.junitlesson.TemperatureCalculatorTest
      Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.046 sec <<< FAILURE!

      Results :

      Failed tests:
      testDummyFailure(codersdoc.junitlesson.TemperatureCalculatorTest)

      Tests run: 5, Failures: 1, Errors: 0, Skipped: 0

      [ERROR]

      Mojo:

      org.apache.maven.plugins:maven-surefire-plugin:2.4.2:test

      FAILED for project:

      codersdoc:junitlesson:jar:0.0.1-SNAPSHOT

      Reason:

      There are test failures.

      Please refer to /home/alexanderbehrend/workspaceJava/junitlesson/target/surefire-reports for the individual test results.

      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run with the -e flag
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILED
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 7 seconds
      [INFO] Finished at: Fri Jul 25 11:12:01 CEST 2008
      [INFO] Final Memory: 5M/25M
      [INFO] ------------------------------------------------------------------------

      Attachments

        Activity

          People

            Unassigned Unassigned
            alexander.behrend Alexander Behrend
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: