gradle-pitest-plugin icon indicating copy to clipboard operation
gradle-pitest-plugin copied to clipboard

Implements scmMutationCoverage task to be able to run pttest only on changed files

Open mstachniuk opened this issue 4 years ago • 4 comments

The pitest-maven plugin (together with scm maven plugin) provides a task scmMutationCoverage. This task can run pitest only on modified files (based on git/other VCS history). This is very useful for pull request builds. Is it possible to implement this functionality for gradle-pitest-plugin as well?

mstachniuk avatar Dec 13 '19 11:12 mstachniuk

Hello, has this been implemented ? My team would love to have this feature !

ThomasCarca avatar Apr 02 '21 14:04 ThomasCarca

The scmMutationCoverage is built on top of the maven source control abstraction, so I don't think it would be easy to port to gradle. It also has a few issues due to the tension between pitest working in terms of bytecode and java packages, and source control working in terms of files.

If you're working with git, CDG are looking for teams to trial a pitest plugin that provides, git, github and gitlab integration for both maven and gradle.

I have a slightly long winded blog post about it over here -> https://blog.pitest.org/dont-let-your-code-dry/

hcoles avatar Apr 02 '21 14:04 hcoles

Very interesting article, thanks for sharing ! I particularly like your take on nightly runs with more often than not forgotten results... We're working on a closed-source project and may be interested in trying out your solution that looks promising !

ThomasCarca avatar Apr 02 '21 15:04 ThomasCarca

Hey folks, can anyone tell us if this is not yet available for gradle?

CaiqueCoelho avatar Oct 18 '23 17:10 CaiqueCoelho