Run Pitest from the command line
Asked Answered
U

1

7

According to Pitest's documentation, it seems that this should be simple, but it is giving me some trouble. I should be able to have

java -cp <your classpath> \
     org.pitest.mutationtest.commandline.MutationCoverageReport \
    --reportDir c:\\mutationReports \
    --targetClasses example.foo.* \
    --sourceDirs c:\\myProject\\src \
    --targetTests example.foo*

but I don't know what some of those things should be for my project, such as "<your classpath>".

My project's file structure looks like this:

enter image description here

Ultimately I want to put this in a .bat file and run it on TeamCity for my CI

Any help would be appreciated!

Unbelt answered 18/2, 2015 at 5:39 Comment(3)
It is not the answer to your question, but I see build.xml in your workspace. Maybe it would be easier to use Ant plugin for PIT do that automatically? In addition there is an Eclipse plugin to play with PIT locally from your IDE.Unstressed
I tried that, but again I'm not sure what values I need to input. What I've tried doesn't seem to work.Unbelt
In general on your classpath you should have all your classes and all dependencies of your project (including PIT). Eclipse should provide classpath string for you when for example you are running tests.Unstressed
A
1

The command line parameter should cover every single jar you would need to build your project (when making the project inside an IDE it should provide a classpath for you that you can use in command line).

Ashla answered 30/8, 2015 at 19:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.