Skip tests in Jenkins

use "Goals and options" value is "clean install -DskipTests=true".

it works like a Charm. I saved hours of time using this Option. :-)


Just to extend the answer, maven has 2 options for skipping tests:

-DskipTests=true — The one that was mentioned. With this parameter, maven ignores tests completely.

-Dmaven.test.skip=true — With this option maven compiles the tests but doesn't launch them.

So you may want to use the second option instead as fast code compile validation. E.G.: if you develop some library or module that will be used by some one else you must be sure that you don't brake contract with the client. Tests compilation can help you with this.

Use either of these parameters depending on your needs.


The problem is that I omitted =true. I was able to build without running tests by entering:

clean install -DskipTests=true

Tags:

Maven

Jenkins