Re: SureFire (and surefire-reports) plugins

2006-08-03 Thread Tung Nguyen
You can configure the surefire plugin like this

plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-surefire-plugin/artifactId
configuration
testFailureIgnore true/testFailureIgnore 
 /configuration
 /plugin

HTH

Tung Nguyen

- Original Message 
From: Jon SlinnHawkins [EMAIL PROTECTED]
To: users@maven.apache.org
Sent: Thursday, August 3, 2006 10:18:31 AM
Subject: SureFire (and surefire-reports) plugins

Hi All,

Is there any way of stop a failed surefire unit from immediatley failing a 
maven build, and allowing it to go on to create the report using the 
surefire-report plugin.  Then, after the reports hasve been created fail the 
build.

I want to see reports of failed tests

Is this possible... Can you switch off halt-on-failure for the Surefire 
plugin, and switch it on for the report plugin ?

Thanks

Jon 




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







RE: SureFire (and surefire-reports) plugins

2006-08-03 Thread Dennis Klavans

This is odd. I just posted a request for the exact opposite to happen. I can't 
get the thing to stop on the first failure. First, are you running mvn 
surefire-report:report? If so then perhaps we could help each other by 
comparing environments. What version of maven are you using? I am on the 
latest: 2.04.

Also, the property you refered to is actually testFailureIgnore. Just wanted 
to confirm that. Still, I did not have that set and mine would not stop. Having 
looked at the surefire source, I cannot see what would make it stop. Perhaps if 
the tests were themselves defined in a suite within the testing framework, that 
suite would fail at the first test? My tests are all individually defined and 
surefire is the controller running them. I am using the JUnit framework and 
JUnit seems to trap the exception from an invididual test so that is why 
surefire keeps going. 




 --- On Thu 08/03, Jon SlinnHawkins  [EMAIL PROTECTED]  wrote:
From: Jon SlinnHawkins [mailto: [EMAIL PROTECTED]
To: users@maven.apache.org
Date: Thu, 3 Aug 2006 09:18:31 +0100
Subject: SureFire (and surefire-reports) plugins

Hi All,brbrIs there any way of stop a failed surefire unit from immediatley 
failing a brmaven build, and allowing it to go on to create the report using 
the brsurefire-report plugin.  Then, after the reports hasve been created 
fail the brbuild.brbrI want to see reports of failed testsbrbrIs 
this possible... Can you switch off halt-on-failure for the Surefire 
brplugin, and switch it on for the report plugin ?brbrThanksbrbrJon 
brbrbrbrbr-brTo
 unsubscribe, e-mail: [EMAIL PROTECTED]brFor additional commands, e-mail: 
[EMAIL PROTECTED]brbr

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



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



Re: SureFire (and surefire-reports) plugins

2006-08-03 Thread Tung Nguyen
AFAIK and as you said, JUnit is designed to complete a test suite even a test 
case is failed. So I think that your request would concern JUnit. Maybe all you 
need is find a way to tell your test suite fails when the first test case fails.

The surefire plug-in is just a classloader to run test and I think the 
testFailureIgnore property aims only to tell M2 continue its tasks after the 
test phase and sure fire report can generate report. 

Personally, I'm using M2.0.4 and integrate the sure fire report in the 
generated web site so I need testFailureIgnore to be true to have the report 
of failed tests. Moreover, all my tests are executed even some of them fail.

- Original Message 
From: Dennis Klavans [EMAIL PROTECTED]
To: users@maven.apache.org; [EMAIL PROTECTED]
Sent: Thursday, August 3, 2006 2:06:45 PM
Subject: RE: SureFire (and surefire-reports) plugins


This is odd. I just posted a request for the exact opposite to happen. I can't 
get the thing to stop on the first failure. First, are you running mvn 
surefire-report:report? If so then perhaps we could help each other by 
comparing environments. What version of maven are you using? I am on the 
latest: 2.04.

Also, the property you refered to is actually testFailureIgnore. Just wanted 
to confirm that. Still, I did not have that set and mine would not stop. Having 
looked at the surefire source, I cannot see what would make it stop. Perhaps if 
the tests were themselves defined in a suite within the testing framework, that 
suite would fail at the first test? My tests are all individually defined and 
surefire is the controller running them. I am using the JUnit framework and 
JUnit seems to trap the exception from an invididual test so that is why 
surefire keeps going. 




 --- On Thu 08/03, Jon SlinnHawkins  [EMAIL PROTECTED]  wrote:
From: Jon SlinnHawkins [mailto: [EMAIL PROTECTED]
To: users@maven.apache.org
Date: Thu, 3 Aug 2006 09:18:31 +0100
Subject: SureFire (and surefire-reports) plugins

Hi All,brbrIs there any way of stop a failed surefire unit from immediatley 
failing a brmaven build, and allowing it to go on to create the report using 
the brsurefire-report plugin.  Then, after the reports hasve been created 
fail the brbuild.brbrI want to see reports of failed testsbrbrIs 
this possible... Can you switch off halt-on-failure for the Surefire 
brplugin, and switch it on for the report plugin ?brbrThanksbrbrJon 
brbrbrbrbr-brTo
 unsubscribe, e-mail: [EMAIL PROTECTED]brFor additional commands, e-mail: 
[EMAIL PROTECTED]brbr

___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



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







RE: SureFire (and surefire-reports) plugins

2006-08-03 Thread Denis Cabasson

Just run mvn test, instead of building the surefire report. This way, the
build if there are tests failures (but after having executed all of your
tests for the current module).

@Jon : just do the opposite :) run mvn surefire-report:report instead of
anything else, should build a surefire report, whatever the result of the
test cas. I guess you can't use your behaviour (ie breaking the build after
generation of report), but you can still get surefire report this way.

Denis.


Dennis Klavans wrote:
 
 
 This is odd. I just posted a request for the exact opposite to happen. I
 can't get the thing to stop on the first failure. First, are you running
 mvn surefire-report:report? If so then perhaps we could help each other by
 comparing environments. What version of maven are you using? I am on the
 latest: 2.04.
 
 Also, the property you refered to is actually testFailureIgnore. Just
 wanted to confirm that. Still, I did not have that set and mine would not
 stop. Having looked at the surefire source, I cannot see what would make
 it stop. Perhaps if the tests were themselves defined in a suite within
 the testing framework, that suite would fail at the first test? My tests
 are all individually defined and surefire is the controller running them.
 I am using the JUnit framework and JUnit seems to trap the exception from
 an invididual test so that is why surefire keeps going. 
 
 
 
 
  --- On Thu 08/03, Jon SlinnHawkins  [EMAIL PROTECTED]  wrote:
 From: Jon SlinnHawkins [mailto: [EMAIL PROTECTED]
 To: users@maven.apache.org
 Date: Thu, 3 Aug 2006 09:18:31 +0100
 Subject: SureFire (and surefire-reports) plugins
 
 Hi All,brbrIs there any way of stop a failed surefire unit from
 immediatley failing a brmaven build, and allowing it to go on to create
 the report using the brsurefire-report plugin.  Then, after the reports
 hasve been created fail the brbuild.brbrI want to see reports of
 failed testsbrbrIs this possible... Can you switch off
 halt-on-failure for the Surefire brplugin, and switch it on for the
 report plugin ?brbrThanksbrbrJon
 brbrbrbrbr-brTo
 unsubscribe, e-mail: [EMAIL PROTECTED]brFor additional
 commands, e-mail: [EMAIL PROTECTED]brbr
 
 ___
 Join Excite! - http://www.excite.com
 The most personalized portal on the Web!
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/SureFire-%28and-surefire-reports%29-plugins-tf2044327.html#a564
Sent from the Maven - Users forum at Nabble.com.


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



Re: SureFire (and surefire-reports) plugins

2006-08-03 Thread Doug Douglass

Other alternatives:

1) add -Dmaven.test.failure.ignore=true to your mvn command line.

2) use a profile

profiles
   profile
 idsite-generation/id
 properties
   maven.test.failure.ignoretrue/maven.test.failure.ignore
 /properties
   /profile
 /profiles

While you can certainly configure the surefire plugin in your pom as Tung
suggests this has the potentially negative effect of making you think your
build is succeeding when in truth it's failing.

I like being REALLY explicit when using either maven.test.failure.ignore or
maven.test.skip to effect builds.

Doug



On 8/3/06, Tung Nguyen [EMAIL PROTECTED] wrote:


You can configure the surefire plugin like this

plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-surefire-plugin/artifactId
configuration
testFailureIgnore true/testFailureIgnore 
 /configuration
/plugin

HTH

Tung Nguyen

- Original Message 
From: Jon SlinnHawkins [EMAIL PROTECTED]
To: users@maven.apache.org
Sent: Thursday, August 3, 2006 10:18:31 AM
Subject: SureFire (and surefire-reports) plugins

Hi All,

Is there any way of stop a failed surefire unit from immediatley failing a
maven build, and allowing it to go on to create the report using the
surefire-report plugin.  Then, after the reports hasve been created fail
the
build.

I want to see reports of failed tests

Is this possible... Can you switch off halt-on-failure for the Surefire
plugin, and switch it on for the report plugin ?

Thanks

Jon




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