Bug 538885 - [JUnit] Ability to specify RunListener for a JUnit in a JUnit run configuration.
Summary: [JUnit] Ability to specify RunListener for a JUnit in a JUnit run configuration.
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.8   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2018-09-10 14:34 EDT by Zoltan Farkas CLA
Modified: 2018-10-17 14:14 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.