I am having problems getting useful information from surefire logs.
Plugin declaration:
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4-SNAPSHOT</version>
<configuration>
<forkMode>once</forkMode>
<parallel>false</parallel>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<forkMode>once</forkMode>
<jvm>${JAVA16_HOME}/bin/java</jvm>
<workingDirectory>${project.build.directory}</workingDirectory>
<includes>
<include>**/*Test.java</include>
</includes>
<systemProperties>
<property>
<name>log4j.configuration</name>
<value>test-log4j.xml</value>
</property>
</systemProperties>
</configuration>
In the target/surefire-reports I have:
TestSuite.txt: has the exceptions that TestNG caught, but no logging
TestSuite-output.txt: has the full output except for what TestNG
caught and test information
TEST-TestSuite.xml: has all information that does not use JDK logging,
commons logging or Log4J (has hibernate SQL, so I know it is picking
up some of the System.out contents)
testng-results.xml: Same as TestSuite.txt for the most part
testng-failed.xml: this file is not for logging
TEST-TestSuite.xml would be great if it held the contents of the
logging output, but it does not for some reason. I can't find anything
to be able to get it to be picked up in this file. I have a lot of
test cases already and trying to sift through the full log and attempt
to try to figure out what test method the logs are for is just not
possible. How can I get the surefire test logs per method to contain
the information logged by log4j?
Here is my test-log4j.xml file contents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="false">
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p
[%c{1}] %m%n"/>
</layout>
</appender>
<root>
<priority value="INFO"/>
<appender-ref ref="CONSOLE"/>
</root>
</log4j:configuration>
Thanks,
Andrew
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]