You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Peter Meier <bl...@gmx.net> on 2009/02/10 10:35:48 UTC

Running ALL tests and fail at the END

In my Maven project I have several modules which all have tests. If I run the
tests and one module fails, then the execution is cancelled. But I want that
the tests of ALL modules are executed and then at the end I want a
notification that some tests have failed.

I have tried it with setting the "testFailureIgnore" option on my pom.xml:

    <configuration>
       <testFailureIgnore>true</testFailureIgnore>
    </configuration>

But in this case "mvn test" will return successfully:
[...]
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
------------------------------------------------------------------------
[INFO] Module A .............................................. SUCCESS
[4.520s]
[INFO] Module B ........................................... SUCCESS
[4:06.863s]
[INFO] Module C ............................................. SUCCESS
[14.553s]
[INFO] Module D ............................................. SUCCESS
[10.785s]
[INFO]
------------------------------------------------------------------------
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 4 minutes 28 seconds
[INFO] Finished at: Tue Feb 10 09:15:56 CET 2009
[INFO] Final Memory: 36M/69M
[INFO]
------------------------------------------------------------------------

All module tests return "success" even though for example "Module B" failed.
(without setting "testFailureIgnore" option only tests of "Module B" are
executed)

Is there any other option to achieve that all tests are executed with a fail
notification at the end?
(I have also played around with 'maven.test.haltafterfailure' but it seemed
not to have any effect)

Thanks for any help!
-- 
View this message in context: http://www.nabble.com/Running-ALL-tests-and-fail-at-the-END-tp21930359p21930359.html
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


Re: Running ALL tests and fail at the END

Posted by Peter Meier <bl...@gmx.net>.
Great! Thanks for the hint, that really helped!



Stefan Seidel wrote:
> 
> "mvn test --fail-at-end" or "mvn test -fae"
> 
> "mvn -h" also helps
> 
> regards,
> 
> Stefan
> 

-- 
View this message in context: http://www.nabble.com/Running-ALL-tests-and-fail-at-the-END-tp21930359p21931545.html
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


Re: Running ALL tests and fail at the END

Posted by Stefan Seidel <ss...@vub.de>.
"mvn test --fail-at-end" or "mvn test -fae"

"mvn -h" also helps

regards,

Stefan


On Tue, 10 Feb 2009 01:35:48 -0800 (PST)
Peter Meier <bl...@gmx.net> wrote:

> 
> In my Maven project I have several modules which all have tests. If I run the
> tests and one module fails, then the execution is cancelled. But I want that
> the tests of ALL modules are executed and then at the end I want a
> notification that some tests have failed.
> 
> I have tried it with setting the "testFailureIgnore" option on my pom.xml:
> 
>     <configuration>
>        <testFailureIgnore>true</testFailureIgnore>
>     </configuration>
> 
> But in this case "mvn test" will return successfully:
> [...]
> [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Module A .............................................. SUCCESS
> [4.520s]
> [INFO] Module B ........................................... SUCCESS
> [4:06.863s]
> [INFO] Module C ............................................. SUCCESS
> [14.553s]
> [INFO] Module D ............................................. SUCCESS
> [10.785s]
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 4 minutes 28 seconds
> [INFO] Finished at: Tue Feb 10 09:15:56 CET 2009
> [INFO] Final Memory: 36M/69M
> [INFO]
> ------------------------------------------------------------------------
> 
> All module tests return "success" even though for example "Module B" failed.
> (without setting "testFailureIgnore" option only tests of "Module B" are
> executed)
> 
> Is there any other option to achieve that all tests are executed with a fail
> notification at the end?
> (I have also played around with 'maven.test.haltafterfailure' but it seemed
> not to have any effect)
> 
> Thanks for any help!


-- 
Mit freundlichen Grüßen,

Stefan Seidel
Software-Entwickler
________________________
VUB Printmedia GmbH
Chopinstraße 4, 04103 Leipzig
tel.    +49 (341) 9 60 50 93
fax.    +49 (341) 9 60 50 92
mail.   sseidel@vub.de 
web.    www.vub.de

HRB Köln 24015
UStID DE 122 649 251
GF Dr. Achim Preuss Neudorf,
Dr. Christian Preuss Neudorf

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