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

NPE in RunListener

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.17
    • Fix Version/s: 2.18
    • Component/s: Junit 4.x support
    • Labels:
      None
    • Environment:
      Tested on Mac, using Maven 3.1, Java 7

      Description

      In the surefire plugin, it is possible to specify one or more RunListener when running tests with JUnit.

      However, it does not look like the listener is properly called by the plugin. In particular, there is a problem with the method:

      public void testRunStarted(Description description)

      it's javadoc at http://junit.sourceforge.net/javadoc/org/junit/runner/notification/RunListener.html#testRunStarted%28org.junit.runner.Description%29

      states:
      "Parameters:
      description - describes the tests to be run "

      however, in all maven projects I tried ("mvn test"), the surefire plugin seems like passing a null reference instead of a Description instance that "describes the tests to be run "

      Note: other methods in the RunListener I tested seems fine (i.e., they get a valid Description object as input)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tibordigana Tibor Digana
                Reporter:
                arcuri82 Andrea Arcuri
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: