PIT no mutations found

孤街浪徒 提交于 2021-02-10 06:46:33

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!