Run Integration Tests Separately Within Your Maven Build
There are several ways to configure Maven to run designated tests separately in a Java project. Usually, people want to distinguish between unit tests and other types of automated tests during a build. Unit tests are fast because you are mocking all the external services that the particular code under test is relying upon. They’re also typically smaller than functional tests, since they are (supposed to be ;) testing a unit of code rather than an entire feature . However, functional tests are also critical to the success of your project. You or your managers are probably interested in seeing automated end-to-end usage of your application running constantly without errors, but how is this possible without annoying the developers as they wait for all the tests to finish? The Maven Failsafe plugin is most helpful in separating unit from functional tests. By default, it focuses on tests whose filename follows the specific pattern: **/IT*.java **/*IT.java **/*ITCase.