Bug 538885

Summary: [JUnit] Ability to specify RunListener for a JUnit in a JUnit run configuration.
Product: [Eclipse Project] JDT Reporter: Zoltan Farkas <zolyfarkas>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: sarika.sinha, zolyfarkas
Version: 4.8Keywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Zoltan Farkas CLA 2018-09-10 14:34:50 EDT
When running a JUNIT unit test it would be handy to be able to specify a RunListener to use with your tests.

maven-surefire-plugin allows you to specify RunListeners to use like:

          <properties>
            <property>
              <name>listener</name>
              <value>org.spf4j.test.log.junit4.Spf4jTestLogRunListener</value>
            </property>
          </properties>


Unfortunately from within Eclipse there is no way to use them without modifying the unit test code which is not practical a lot of time...

Netbeans, due to the fact that is running unit tests with maven/surefire, applies correctly all pom settings, and is a breeze to use in these cases...

Intelij will do that too once: https://youtrack.jetbrains.com/issue/IDEA-190385 is fixed.

also see: https://stackoverflow.com/questions/10537495/how-can-i-use-a-junit-runlistener-in-eclipse for detail on this...

would be great if this would be improved...
Comment 1 Zoltan Farkas CLA 2018-09-24 16:43:39 EDT
surefire allow to specify multiple listeners, so the ability to specify multiple RunListeners would be welcome.