I am running Stryker.NET in a pre-merge pipeline (i.e. on PRs) as a quality control check on testing for new code. I use the since option with the target derived by running git merge-base between the PR branch and the master branch.
The default behaviour is to revert to run all mutations (i.e. no longer only changed CSharp files determined from the diff) if any non-CSharp file has changed. I appreciate that is the safe and robust solution, but in practice changes to non-CSharp files will rarely be relevant to the mutation testing.
I worked out the following setting to consider diffs only on CSharp files.
{
"stryker-config": {
"since": {
"enabled": true,
"ignore-changes-in": ["**/*", "!**/*.cs*"]
}
}
}
I just thought this may be relevant for others as well and suggest including it in the documentation, in the way that negation is covered under the mutate config option. Unless you think this approach is a bad idea.