hcoles / pitest

State of the art mutation testing system for the JVM
Apache License 2.0
1.67k stars 357 forks source link

Support for analyzing diffs and only running mutation on the diffs #342

Open SxMShaDoW opened 7 years ago

SxMShaDoW commented 7 years ago

Hi,

Is there a way to only run mutation testing on the diffs of files?

I am currently running mutation testing on all my PR builds, but as my service complexity expands, the longer mutation testing takes to run. When I use the "withHistory" it goes lightning fast locally, but that isn't possible since CI/PR builds spin up new instances and git clone the code down.

If there isn't a way to do so, I included a user story below. Let me know how I can help!

As a developer, I would like to run a fast set of mutation testing on all my pull request builds, so that I can increase confidence in tests from other contributors.

Requirements

Examples of other frameworks doing this:

Current things that pitest supports:

pedrorijo91 commented 6 years ago

been digging into this as well. for my PoC project, I'm using travis, and it seems it would be possible to use the withHistory flag to support this, since travis allows to keep cached directories between builds: https://docs.travis-ci.com/user/caching/#arbitrary-directories

Probably other CI's also have such feature. Have you looked at it?