maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmatthews <rmatth...@nakedobjects.org>
Subject RE: Finding out what test has failed and why
Date Wed, 31 Oct 2007 15:15:23 GMT



Jörg Schaible wrote:
> 
> rmatthews wrote:
>> When I build with Maven it is running the unit test as
>> expected, however if a
>> test fails then I have no immediate indication why.  If I set
>> printSummary to false I get no indication whatsoever; when  it is
>> true I 
>> get many line
>> telling me things are OK.  The upshot of it is that I am left
>> to browse
>> through many text/xml files in the surefire-report directory
>> to find the
>> problem: this is not very efficient.  The alternative is run create
>> the site and browse the output, which makes the looking quicker but
>> it takes a long time to generate the site.
>> 
>> Is there any way to have printed out, only on failures, what
>> has failed and
>> see the stack trace, ie to have the same facility I have in my IDE?
>> 
>> If that is not possible, how do I get the surefire-report
>> plugin to run
>> after a test failure (ie during the test phase rather than
>> the site phase.
>> 
>> Many thanks
>> Robert Matthews
> 
> Set useFile to false.
> 
> - Jörg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 


Thanks for that.  I have just discovered why it is problem.  I have my set
printSummary to false, which the documentation states is an "Option to print
summary of test suites or just print the test cases that has errors", yet
the errors are not listed during output. As shown in the snippet below:-

:
:
[INFO] Compiling 43 source files to
/home/rcm/no-development/nakedobjects_DEV/nof-reflector-core/target/test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory:
/home/rcm/no-development/nakedobjects_DEV/nof-reflector-core/target/surefire-reports
log4j:WARN No appenders could be found for logger
(org.nakedobjects.nof.reflect.help.SimpleHelpManager).
log4j:WARN Please initialize the log4j system properly.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] There are test failures.

-- 
View this message in context: http://www.nabble.com/Finding-out-what-test-has-failed-and-why-tf4724947s177.html#a13511452
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message