I have recently been dealing with a similar issue.  I wanted Junit style
reports and did not want to use ant run to run the JunitConverter task,
so I added reportng as a test scoped dependency and configured a
listener.  

As an interim solution, you could write a listener that does what you
want.  It could just be in your src/test/java dir as classes there will
be available to TestNG when it is running so there is no need to create
a separate jar, unless you want to.  To configure it you would do
something like this:

...
    <plugin>
      <artifactId>maven-surefire-plugin</artifactId>
      ...
      <configuration>
        ...
        <properties>
          <name>listener</name>
          <value>x.y.z.MyNiftyProgressOutputter</value>
        </properties>
        ...
      </configuration>
      ...
    </plugin>
...

The listener properties's value can be a comma separated list of classes
so if you have more than one, you can do that.

Good Luck,

Dana H. P'Simer
Dana.P'[EMAIL PROTECTED]

-----Original Message-----
From: Jason Chaffee [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 5:32 AM
To: Maven Developers List
Cc: Maven Users List
Subject: surefire and testng integration issues with surefire-2.4.2

I brought this up in the past the maven guys were adamant that they were
not able to get per test information to output on the console unless
testng changed.  I felt all along that this was not correct and I
finally had a chance to look into it.  Surefire could simply register a
listener to get call backs during the execution and could output the
results.  TestNG does support this functionality with the ITestListener.
For example, onStart() will give the start of running a particular class
configuration and test methods and onFinish() will be called after all
of the configuration and test methods have been run.  I took a look at
the Surefire code and there is a TestNGReporter that does implement the
ITestListener, but it does not implement these methods, they are all
no-ops.  So, it seems like these could be implemented and then we could
see progress output on the console. 

 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to