https://issues.apache.org/bugzilla/show_bug.cgi?id=47913
Summary: Allow to add one or more Junit RunListener instances
in the Junit task
Product: Ant
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Optional Tasks
AssignedTo: [email protected]
ReportedBy: [email protected]
Hello,
Not fond in the existing bugs or RFE.
I try to solve the following problem. We have some hundreds of unit tests
running. It happens that one of them takes a lot of time to run or is blocked.
In an IDE like Eclipse, I can see which test is running in the Junit window.
When I run the tests through the Junit task of Ant, I cannot. I have to wait
for the test report.
Junit provides a way to add one or more RunListener instances
(http://junit.sourceforge.net/javadoc_40/org/junit/runner/notification/RunListener.html)
to a JunitCore object. The Junit RunNotifier class allows also to add some
notifiers.
The problem is that I do not have any hook to do this at all while the runner
used by Ant has normally access to these classes. I even suppose that it
already takes advantage of them.
What I suggest is to add to the Junit task an optional attribute, which would
be a comma delimited list of listener FQN (or if you prefer a single one a one
could call others).
e.g.
<junit runlistener="com.acme.MyListener">
...
</junit>
With this I am free to do anything that I want, report a progress in one or
many log files, timing my tests, detect a problem and link it to a precise
test...
Thanks
Olivier
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.