Hi Randall,

as far as I can tell, I want surefire to act as it does by default.

In other words, it seems to me that surefire should pipe the logging output to file so that the reporting plugin picks it up and makes it available with the test results on the website so that the cause of failure is immediately identifiable when checking the continuous integration results.

There is logging output in the surefire-reports/TEST-com.package.MyTest.xml but it appears to be under control of log4j.


Adam

Randall Fidler on 13/05/08 14:24, wrote:
Adam,

    You're probably wanting to see the surefire output on your Eclipse
output panel but I thought I'd just mention that for surefire you can
configure the output to be routed to output files:

         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
              <forkMode>pertest</forkMode>
              <argLine>-Xmx1024M -Xms512M</argLine>
           <redirectTestOutputToFile>true</redirectTestOutputToFile>
         </configuration>

The outputs will normally be in target/surefire-reports directory under
your project.  Also, there should be three files, normal xml output of
junit, a -OUTPUT.txt file which is the system.out from the test and
another file which has the log4j formatted output (as what you
mentioned).

If you're not seeing the system.out prints in Eclipse, it could be
because this flag is enabled.

I think you're more after how to configure the formatting but I thought
I'd mention it anyhow.

Regards,

Randall

-----Original Message-----
From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 13, 2008 6:17 AM
To: Maven Users List
Subject: JDK logging in surefire

I'd like surefire to give me the screen output which I normally see when
running my tests in Eclipse.

I see surefire has piped one line of logging from this particular test
into the XML report output, and that looks suspiciously like Log4j output.

I configure my JDK logging via the default logging.properties in my $JAVA_HOME/jre/lib/ directory - which is the one that affects the
Eclipse output.

i.e. it should work with no configuration (reading the default
properties file in the JDK):

Quote: " By default, the LogManager reads its initial configuration from
a properties file "lib/logging.properties" in the JRE directory. If you edit that property file you can change the default logging configuration for all uses of that JRE."

As far as I can tell, Java is ignoring it when running mvn. Can that be?



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




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

Reply via email to