I have a multi-module project with unit tests and integration tests. We're using Jenkins for our pipeline:
What I want to achieve is:
Step three starts from a clean checkout, so there isn't even a target
folder.
Edit - the integration test run inside a profile, so they don't run during the first build
What I want to achieve is to run the integration tests (step three) without compiling the code.
If I use mvn failsafe:integration-tests
it says that there aren't any tests (obviously because it doesn't find any artifact).
When I add dependenciesToScan
it says that it doesn't find the junit provider (groups/excludedGroups require TestNG, JUnit48+ or JUnit 5 on project test classpath
).
Can someone help on how to implement running the tests when the jars are in the local repo, without compiling?
I did something similar several times. My standard solution is to put the system test suite in a separate module next to the actual artifact in the same repository.
Steps one and two would happen only within the service module, while step three happens in the system-test module running mvn verify
.