问题
C:\Users\TZ>java -cp C:\Users\TZ\Desktop\femr-master\pitest-command-line-
1.2.4.jar;C:\Users\TZ\Desktop\femr-master\pitest-
1.2.4.jar;C:\Users\TZ\Desktop\femr-master\pitest-entry-
1.2.4.jar;C:\Users\TZ\Desktop\femr-master\junit-
4.12.jar;C:\Users\TZ\Desktop\batch-import-3.0\target\batch-import-
3.0.4.jar;C:\Users\TZ\Desktop\femr-
master\xmlpull_1_0_5.jar;C:\Users\TZ\Desktop\femr-master\xstream-1.4.10.jar
org.pitest.mutationtest.commandline.MutationCoverageReport --reportDir
C:\Users\TZ\Desktop --targetClasses org.neo4j.batchimport.* --targetTests
org.neo4j.batchimport.* --sourceDirs C:\Users\TZ\Desktop\batch-import-
3.0\src
output:
6:07:23 PM PIT >> INFO : Verbose logging is disabled. If you encounter an
problem please enable it before reporting an issue.
6:07:23 PM PIT >> INFO : Sending 0 test classes to minion
6:07:23 PM PIT >> INFO : Sent tests to minion
6:07:23 PM PIT >> INFO : Calculated coverage in 0 seconds.
6:07:23 PM PIT >> INFO : Created 0 mutation test units
Exception in thread "main" org.pitest.help.PitHelpError: No mutations found.
This probably means there is an issue with either the supplied classpath or
filters.
See http://pitest.org for more details.
I'm wondering why the filter is not correct. I've literally put everything I have on the CP and tried the targetClasses/testClasses with star * or specific class path.
Thanks!
回答1:
Pitest mutates compiled bytecode, not source files.
You do not look to have included the compiled code on the classpath - only its dependencies.
It is strongly recommended to use one of the build integrations (maven, gradle, ant) rather than the command line tool as this is much less error prone.
来源:https://stackoverflow.com/questions/47502413/pit-no-mutations-found