Mutation testing -Pittest error

173 views
Skip to first unread message

shela...@gmail.com

unread,
May 2, 2017, 12:56:55 PM5/2/17
to PIT Users

I am using https://github.com/hcoles/pitest to write mutation tests on our existing Unit Test suite. We are getting an error as below:

12:09:40 PM PIT >> INFO : MINION : 12:09:40 PM PIT >> FINE : Expecting 1 tests classes from parent

12:09:40 PM PIT >> INFO : MINION : 12:09:40 PM PIT >> FINE : Tests classes received

12:09:40 PM PIT >> INFO : MINION : 12:09:40 PM PIT >> INFO : Found  0 tests

12:09:40 PM PIT >> INFO : MINION : 12:09:40 PM PIT >> INFO : Dependency analysis reduced number of potential tests by 0

12:09:40 PM PIT >> INFO : MINION : 12:09:40 PM PIT >> INFO : 0 tests received

12:09:40 PM PIT >> INFO : MINION : 12:09:40 PM PIT >> FINE : Running 0 units

12:09:40 PM PIT >> FINE : Coverage generator Minion exited ok
12:09:40 PM PIT >> INFO : Calculated coverage in 0 seconds.
12:09:40 PM PIT >> FINE : Used memory after coverage calculation 26 mb
12:09:40 PM PIT >> FINE : Free Memory after coverage calculation 219 mb
12:09:40 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.
    at org.pitest.mutationtest.tooling.MutationCoverage.checkMutationsFound(MutationCoverage.java:287)
    at org.pitest.mutationtest.tooling.MutationCoverage.runReport(MutationCoverage.java:138)
    at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:103)
    at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:45)
    at org.pitest.mutationtest.commandline.MutationCoverageReport.runReport(MutationCoverageReport.java:87)
    at org.pitest.mutationtest.commandline.MutationCoverageReport.main(MutationCoverageReport.java:45)

I ran both using Ant and Command Line, and ended in the same error. The command we are running is:

java -cp ".:classes:lib/*:otherlib/*" org.pitest.mutationtest.commandline.MutationCoverageReport --reportDir "test-result-cli" --targetClasses "tests.unitest.*" --targetTests "tests.unitest.PiExample" --sourceDirs "src" --mutators "ALL" --verbose

Could someone tell what might be doing wrong? We checked the classpath and the source path, and they are correct. I wonder if Pittest makes an assumption on how the test class name should be?

Any help will be greatly appreciated.

Thanks!

Henry Coles

unread,
May 3, 2017, 4:33:10 AM5/3/17
to pitu...@googlegroups.com
I'm guessing that this is an issue with the filters. What package does your code live under?

Henry

--
You received this message because you are subscribed to the Google Groups "PIT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pitusers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages