maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "P'Simer, Dana (Matrix)" <Dana.P'Si...@ihg.com>
Subject TestNG Listeners
Date Wed, 19 Mar 2008 18:22:47 GMT
Hello,

I am attempting to add a listener to the testng run for my project.  It
is the JUnitXMLReporter by the ReportNG project.  I added ReportNG as a
dependency in the test scope (they don't have a pom so I created one and
deployed it to our private repository ) and added the listener to the
properties:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <parallel>false</parallel>
          <argLine>-DstartAll=${startAll} -Xmx768m -Xms256m
-XX:PermSize=128m -XX:MaxPermSize=384m</argLine>
          <excludeGroups>disabledTests,generateTestFile</excludeGroups>
          <excludes>
            <exclude>**/Test*.java</exclude>
 
<exclude>**/JBossAndPersistentTwoPhaseCacheManagerTestCase.java</exclude
>
          </excludes>
          <properties>
	
<listener>org.uncommons.reportng.JUnitXMLReporter</listener>
          </properties>
        </configuration>
      </plugin>
...
    <dependency>
      <groupId>org.uncommons</groupId>
      <artifactId>reportng</artifactId>
      <version>0.9.4</version>
      <scope>test</scope>
    </dependency>

But when I run the tests I get no output from the JUnitXMLReporter.
There are no errors and the tests complete successfully.

When I run 'mvn help:describe -Dplugin=surefire' I get:

	$ mvn help:describe -Dplugin=surefire
	[INFO] Scanning for projects...
	[INFO] Searching repository for plugin with prefix: 'help'.
	[INFO]
------------------------------------------------------------------------
	[INFO] Building commons
	[INFO]    task-segment: [help:describe] (aggregator-style)
	[INFO]
------------------------------------------------------------------------
	[INFO] [help:describe]
	[INFO] Plugin:
'org.apache.maven.plugins:maven-surefire-plugin:2.4.2'
	-----------------------------------------------
	Group Id:  org.apache.maven.plugins
	Artifact Id: maven-surefire-plugin
	Version:     2.4.2
	Goal Prefix: surefire
	Description:
	
	Surefire is a test framework project.

	[INFO]
------------------------------------------------------------------------
	[INFO] BUILD SUCCESSFUL
	[INFO]
------------------------------------------------------------------------
	[INFO] Total time: 1 second
	[INFO] Finished at: Wed Mar 19 13:25:45 EDT 2008
	[INFO] Final Memory: 3M/6M
	[INFO]
------------------------------------------------------------------------


BTW, the reason I am doing this is so that I can get a Junit Style
report for Hudson to display.  If there is a better way to do this, I
would appreciate any suggestions.
	
Dana H. P'Simer
Dana.P'Simer@ihg.com


Mime
View raw message