New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mutation testing #1068
Comments
Ran the mutation tests again since Stryker has evolved over the past two years and our test suite should be completely free of timing dependencies now. All mutators enabled All mutators minus string and linq After a quick glimpse Assertion classes in |
Nice. |
Did a new run of mutation testing The new report is not 1:1 comparable with previous reports as the new version of Stryker generates more mutations, e.g. remove statements and entire blocks of code. The general mutation score decreased from 87.46% to 86.86%
|
What does this mean exactly? Mutation testing is a thing that makes random changes to the code and then sees whether they are detected in the form of test failures? What do the numbers you quote mean for Does a Stryker run take a long time?? I would be curious to know what the percentage is without #1814 but with the new Stryker version, so that the numbers are 1:1 compatible, but not if that's a lot of effort. :-) |
Since I pointed A complete run takes ~1 hour on my machine, but it can be configured to skip parts of code and tests. Below I've run the mutation testing only for
before: 60.65% after: 68.61% stryker-config.json{
"stryker-config":
{
"project": "Src\\FluentAssertions\\FluentAssertions.csproj",
"test-projects": [
"Tests\\FluentAssertions.Equivalency.Specs\\FluentAssertions.Equivalency.Specs.csproj"
],
"reporters": [
"progress",
"html"
],
"verbosity": "info",
"concurrency": 6,
"mutation-level": "Complete",
"ignore-mutations": [
"string",
"linq"
],
"mutate": [
"**/Data/*.cs",
"**/Equivalency/Steps/Constraint*.cs",
"**/Equivalency/Steps/Data*.cs"
],
"test-case-filter": "Category=System.Data"
}
} |
That's pretty cool :-) |
Add |
After a fix in Stryker.NET, so VSTest does not time-out, I finally could do a full run (~1h 20m) Total score: 85.43% |
Total score: 85.89% |
I've been playing around with mutation testing of Fluent Assertions using Stryker.NET.
From their docs
It gives a nice html report of all found mutations making it easy to see what mutations survived our test suite.
mutation-report.zip
I've used this to identify and add some missing unit tests.
I didn't find any bugs in the library, but found some missing extension methods for
DateTimeOffset
.If anyone wants to chime on improving the test suite, this is a great tool.
The text was updated successfully, but these errors were encountered: