Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA 14: How to skip tests while deploying project into Tomcat

I have a Spring MVC project using IntelliJ IDEA 14 as my IDE (I'm new to IntelliJ IDEA; I used Eclipse).

My main Java code is in folder src/main, and the unit test code is in src/test. While deploying the project, I found that all the unit tests are executed.

How can I skip all the unit tests while deploying the project into Tomcat?

like image 451
stevey Avatar asked Aug 14 '15 09:08

stevey


People also ask

How do I ignore tests in IntelliJ?

to toggle the Skip tests mode. On the Runner page, select Skip tests and click OK. IntelliJ IDEA de-activates the test goal under the Lifecycle node. The appropriate message notifying that tests are skipped is displayed in the Run tool window when you execute other goals.

How do I skip test Mvn clean install?

To skip running the tests for a particular project, set the skipTests property to true. You can also skip the tests via the command line by executing the following command: mvn install -DskipTests.


2 Answers

When creating a maven configuration for the project. On the Runner tab you can click on skip test checkbox as below :

enter image description here

It helped me a lot!

like image 23
Hassam Abdelillah Avatar answered Sep 25 '22 15:09

Hassam Abdelillah


In case you are using Maven, on the View > Tool Windows > Maven Projects click on the button shown below ( called Skip Tests Mode). Essentially it is taking the test phase out of the lifecycle when you say run package.

enter image description here

like image 101
dimitrisli Avatar answered Sep 25 '22 15:09

dimitrisli