User Tools

Site Tools


maven:unit-vs-integration-tests

Unit tests vs Integration tests

The Maven build lifecycle consists of several phases, such as:

  • compile
  • test
  • package
  • verify
  • install.

The test phase is responsible for executing the unit tests.
The verify phase is responsible for executing the integration tests.

When you run mvn install, Maven executes all the phases up to and including the verify phase, which means both unit tests and integration tests will be executed.

Skip unit and integration tests execution

mvn install -DskipTests

Skip just integration tests and execute unit tests

mvn install -DskipITs
maven/unit-vs-integration-tests.txt · Last modified: 2023/07/07 13:44 by odefta