-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-DskipTests Flag not working #750
Comments
Try adding:
From the docs:
|
… additional configuration
… additional configuration - restored old test and added new IT test to verify if if -DskipTests works correctly
#750 -DskipTests Flag should be honoured in a maven run without additional configuration
@hcoles @marwin1991 Checkstyle was hit with this at checkstyle/checkstyle#11276 (comment) . We removed the skip test property so pitest will run. When I remove the
And when I use We were trying to avoid double work by excluding test runs and still wanting pitest to do its thing in its own run. We have a completely separate CI run for just tests running alone. |
Maybe we should reopen this issue and discus the problem, because from what I understand piTest should create mutation even if tests are not executed, as @rnveach mentioned above there is an command example in a documentation. On the other hand we have this special flag IMO the main question is that: Is command |
I have made some test and it looks like, IMO you should use:
|
Yes, the tests won't be compiled if you run just the pitest goal. I've updated the docs now to add test-compile. Calling the goal directly requires minimal setup, but is not a great way to run pitest. I recomend creating a profile as discussed here. https://blog.pitest.org/pitest-pr-setup/ This also shows one (slightly hacky) method of avoiding surefire also running, by binding pitest to test-compile instead of test. A cleaner way is described here, although it requires more boilerplate. https://stackoverflow.com/questions/14476757/disable-maven-plugins-when-using-a-specific-profile |
I know there is already a closed issue "Pit Maven Plugin Should Honor -DskipTests Flag #157", but the flag is not working, the command "mvn install -DskipTests" is still executing Pitest.
Affected Version org.pitest.pitest-maven.1.5.1
Btw.: The command "mvn install -DskipPitest" works as expected!
The text was updated successfully, but these errors were encountered: