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

Incorrect Test Run Count

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Maven Surefire Plugin
    • None

    Description

      When a simple Junit test with errors in the @Before() and @After() method are run directly with java or ant's junit task, it reports correctly that the Tests Run = 1 and Errors = 2.

      But when the same is run through maven surefire plugin, it reports it as Tests Run = 2 and Errors = 2.

      Its the same test in which 2 errors are encountered, so the Tests Run should be 1.

      I traced the issue to the org.apache.maven.surefire.report.TestSetRunListener Class - testError() method, where the completed count is also incremented along with the error count irrespective of whether its in the same test the error is encountered.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              karthik.kandasamy karthik kandasamy
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: