IntelliJ IDEA 14: How to skip tests while deploying project into Tomcat
Solution 1
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
.
Solution 2
When creating a maven configuration for the project. On the Runner tab you can click on skip test checkbox as below :
It helped me a lot!
Solution 3
In the Tomcat Run/Debug configurations you can specify in the Before launch section a maven task with this parameter:
-Dmaven.test.skip=true
stevey
Updated on April 11, 2021Comments
-
stevey about 3 years
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 insrc/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?
-
djkelly99 over 6 yearsDoes an option exist to do this on a per project basis? If you click Skip Tests Mode, test runs are disabled for all maven projects.
-
Dilip Raj Baral over 5 yearsThis didn't work me (or at least the way I want it to). Even after disabling tests like this, when I run a Run or Debug configuration, the build attempts to compile the tests. Can we skip compile as well? Because in the codebase I'm working there are hell lot of tests with compile errors.
-
ktamas almost 5 yearsHow to skip even building the tests/test packages?