Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Skip test case execution in maven doesn't even compile Test cases

Using Maven build configuration, we can configure it to skip test execution while building the source file. In eclipse we can check the checkbox labeled as 'Skip Test` and from command line we can use

mvn clean install -Dmaven.test.skip=true

The Skip test doesn't even compile the unit test source codes.

Is there any way to configure maven such that it will compile the unit test classes but doesn't execute it?

like image 247
sakura Avatar asked Apr 30 '14 06:04

sakura


1 Answers

It compiles test classes when you specify -DskipTests it just skips execution of tests

maven.test.skip stops compilation of test classes


Documentation

  • Skipping Tests
like image 146
jmj Avatar answered Sep 22 '22 17:09

jmj