You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Heinrichs, Dirk" <di...@capgemini.com> on 2012/05/14 10:55:16 UTC

JUnit test failures stop the build, but test errors do not

Hi,

I've just joined a project which is using Maven for its builds. When running JUnit tests, the build fails if there is a build failure, but it does not fail if there is a test error.

I'm new to maven so I'd like to know wether this is expected behaviour or not, and if there is a way to make it fail on test errors, too (I didn't find anything in the documentation).

Thanks...

    Dirk
--
Dirk Heinrichs          | Tel:  +49 (0)211 56623 316
Configuration Manager   | Fax:  +49 (0)211 56623 450
Capgemini Deutschland   | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68      | Web:  http://www.de.capgemini.com
D-40468 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net

Firma: Capgemini Deutschland GmbH
Geschäftsführer: Dr. Michael Schulte (Sprecher) • Dr. Uwe Dumslaff • Burkhard Kehrbusch • Josef Ranner
Aufsichtsratsvorsitzender: Antonio Schnieder
Amtsgericht Berlin-Charlottenburg, HRB 98814






This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to 
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message 
in error, please notify the sender immediately and delete all copies of this message.

Re: JUnit test failures stop the build, but test errors do not

Posted by Dirk Heinrichs <di...@capgemini.com>.
Firma: Capgemini Deutschland GmbH
Gesch�ftsf�hrer: Dr. Michael Schulte (Sprecher) � Dr. Uwe Dumslaff � Burkhard Kehrbusch � Josef Ranner
Aufsichtsratsvorsitzender: Antonio Schnieder
Amtsgericht Berlin-Charlottenburg, HRB 98814






This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to 
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message 
in error, please notify the sender immediately and delete all copies of this message.

Re: JUnit test failures stop the build, but test errors do not

Posted by Ben Caradoc-Davies <Be...@csiro.au>.
This is not the default behaviour, but can be set as a configuration 
option (not recommended under normal circumstances):
http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#testFailureIgnore

Are there any configuration settings for the surefire plugin in the 
project pom?

Kind regards,
Ben.

On 14/05/12 16:55, Heinrichs, Dirk wrote:
> Hi,
>
> I've just joined a project which is using Maven for its builds. When running JUnit tests, the build fails if there is a build failure, but it does not fail if there is a test error.
>
> I'm new to maven so I'd like to know wether this is expected behaviour or not, and if there is a way to make it fail on test errors, too (I didn't find anything in the documentation).
>
> Thanks...
>
>      Dirk
> --
> Dirk Heinrichs          | Tel:  +49 (0)211 56623 316
> Configuration Manager   | Fax:  +49 (0)211 56623 450
> Capgemini Deutschland   | Mail: dirk.heinrichs@capgemini.com
> Wanheimerstraße 68      | Web:  http://www.de.capgemini.com
> D-40468 Düsseldorf      | ICQ#: 110037733
> GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net
>
> Firma: Capgemini Deutschland GmbH
> Geschäftsführer: Dr. Michael Schulte (Sprecher) • Dr. Uwe Dumslaff • Burkhard Kehrbusch • Josef Ranner
> Aufsichtsratsvorsitzender: Antonio Schnieder
> Amtsgericht Berlin-Charlottenburg, HRB 98814
>
>
>
>
>
>
> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
> intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
> read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
> in error, please notify the sender immediately and delete all copies of this message.

-- 
Ben Caradoc-Davies <Be...@csiro.au>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

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


Re: JUnit test failures stop the build, but test errors do not

Posted by Dirk Heinrichs <di...@capgemini.com>.
Firma: Capgemini Deutschland GmbH
Geschäftsführer: Dr. Michael Schulte (Sprecher) • Dr. Uwe Dumslaff • Burkhard Kehrbusch • Josef Ranner
Aufsichtsratsvorsitzender: Antonio Schnieder
Amtsgericht Berlin-Charlottenburg, HRB 98814






This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to 
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message 
in error, please notify the sender immediately and delete all copies of this message.

Re: JUnit test failures stop the build, but test errors do not

Posted by Kristian Rosenvold <kr...@gmail.com>.
You probably want to make sure you're running at least verision 2.11
of surefire. 2.12 is the latest.

Kristian


2012/5/14 Heinrichs, Dirk <di...@capgemini.com>:
> Hi,
>
> I've just joined a project which is using Maven for its builds. When running JUnit tests, the build fails if there is a build failure, but it does not fail if there is a test error.
>
> I'm new to maven so I'd like to know wether this is expected behaviour or not, and if there is a way to make it fail on test errors, too (I didn't find anything in the documentation).
>
> Thanks...
>
>    Dirk
> --
> Dirk Heinrichs          | Tel:  +49 (0)211 56623 316
> Configuration Manager   | Fax:  +49 (0)211 56623 450
> Capgemini Deutschland   | Mail: dirk.heinrichs@capgemini.com
> Wanheimerstraße 68      | Web:  http://www.de.capgemini.com
> D-40468 Düsseldorf      | ICQ#: 110037733
> GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net
>
> Firma: Capgemini Deutschland GmbH
> Geschäftsführer: Dr. Michael Schulte (Sprecher) • Dr. Uwe Dumslaff • Burkhard Kehrbusch • Josef Ranner
> Aufsichtsratsvorsitzender: Antonio Schnieder
> Amtsgericht Berlin-Charlottenburg, HRB 98814
>
>
>
>
>
>
> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is
> intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
> read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message
> in error, please notify the sender immediately and delete all copies of this message.

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