ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54935] New: JUnit task: support listeners that are not formatters
Date Wed, 08 May 2013 07:14:16 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54935

            Bug ID: 54935
           Summary: JUnit task: support listeners that are not formatters
           Product: Ant
           Version: 1.8.4
          Hardware: PC
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Optional Tasks
          Assignee: notifications@ant.apache.org
          Reporter: skissane@gmail.com
    Classification: Unclassified

The Ant JUnit task only supporters JUnit listeners that are formatters.
It doesn't support declaring custom listeners that are not formatters.

Use case:
Trying to use Sonar Jacoco listener
https://github.com/SonarSource/sonar-java/blob/1.2/sonar-jacoco-listeners/src/main/java/org/sonar/java/jacoco/JUnitListener.java

which makes Jacoco start a new session for each test case executed, so we get
separate code coverage statistics for each test case.

specifiy org.sonar.java.jacoco.JUnitListener as a formatter fails, since it
is not a JUnitResultFormatter.

Maven Surefire plugin can do this, see
https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html
section "Using custom listeners and reporters"

Proposed solution:
Add nested <listener classname=''> element to enable configuring a custom
listener
Add listener= command line argument to the JUnitRunner for use in fork mode

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message