Maven 1.x Test Plugin
  1. Maven 1.x Test Plugin
  2. MPTEST-71

maven test stops the build at the first test failure

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.1
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The fix for MPTEST-25 has a behavioral side effect that I consider as a bug. Before the fix, any test failure would halt the whole testing process, unless the failure.ignore was specified. Now, no matter what you do, the complete test suite will run eventhough you want it to stop at the first error it encounters.

      http://jira.codehaus.org/browse/MPTEST-25

      Thanks,

      Seb

        Activity

        Hide
        Pascal Grange added a comment -

        It seems that the maven.test.failure.ignore property has been used to specify junit to stop test execution at the first encountered failure.

        This means that it is no more possible to fail maven build when test fails but still execute ALL the tests. This is a bug.

        This is essential to be able to run all the tests unconditionally when you build test reports, for instance. And we still need the build to fail after ALL the tests have been run if one of them ended on failure.

        It would be a good idea to propose a separate property such as maven.test.haltonfailure or maven.test.haltonerror to specify junit to stop at the first failure or error. This property must be set to false by default to comply with maven-test-plugin behaviour before version 1.8.

        See http://jira.codehaus.org/browse/MPTEST-39

        Show
        Pascal Grange added a comment - It seems that the maven.test.failure.ignore property has been used to specify junit to stop test execution at the first encountered failure. This means that it is no more possible to fail maven build when test fails but still execute ALL the tests. This is a bug. This is essential to be able to run all the tests unconditionally when you build test reports, for instance. And we still need the build to fail after ALL the tests have been run if one of them ended on failure. It would be a good idea to propose a separate property such as maven.test.haltonfailure or maven.test.haltonerror to specify junit to stop at the first failure or error. This property must be set to false by default to comply with maven-test-plugin behaviour before version 1.8. See http://jira.codehaus.org/browse/MPTEST-39
        Hide
        Lukas Theussl added a comment -

        Added a new property maven.test.haltafterfailure.

        Show
        Lukas Theussl added a comment - Added a new property maven.test.haltafterfailure.

          People

          • Assignee:
            Lukas Theussl
            Reporter:
            Pascal Grange
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: