[Question] How can we find mutants file

66 views
Skip to first unread message

AG S

unread,
Dec 7, 2020, 7:41:51 PM12/7/20
to PIT Users

Hi Team,

I successfully run PIT tool on my program and its unit tests.
I was wondering how can I find (or dump) the mutated program files (i.e., the mutants).

Thanks in advance!
Tiger

Jessica Aguado

unread,
Dec 9, 2020, 1:27:26 AM12/9/20
to PIT Users
Hello!!!

I run mutationCoverage goal of maven with -Dfeatures=+EXPORT and it generates the classes files with the mutations.

Nice day!

Jessi

AG S

unread,
Dec 9, 2020, 7:04:49 PM12/9/20
to PIT Users
Thank you so much, Jessi!

Would it be possible to share more details (or an example) about how to run " mutationCoverage goal of maven with -Dfeatures=+EXPORT " ?
Thanks in advance!

Have a great week!

Tiger

Jessica Aguado

unread,
Dec 10, 2020, 2:12:28 AM12/10/20
to PIT Users
You're welcome! ;)

I run mutationCoverage goal this way:

./mvnw org.pitest:pitest-maven:mutationCoverage -Dfeatures=+EXPORT

It creates a folder called pit-report/export.

You can find additional info about it here: https://pitest.org/quickstart/maven/

Have a nice day!



AG S

unread,
Dec 10, 2020, 9:09:21 PM12/10/20
to PIT Users
Thanks, Jessi!

It's very helpful. I'll try it.

Have a good weekend!

Tiger
Reply all
Reply to author
Forward
0 new messages