Replies: 1 comment
-
Fuzzing is a form of mutation testing and is something we actively do. I don't see us investing much beyond fuzzing in other forms. You're of course welcome to explore on your own and demonstrate its value. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Enhancement proposal in our testing strategy: Mutation Testing
I've been thinking hard on the topic of testing lately. And I guess we are all interested in increasing the quality of the runtime and the BCL so we can eliminate bugs in the bud.
Currently, our primary goal is to maximize test coverage. But has any thought ever been given to test quality?
That is one reason why the concept of mutation testing exists.
Mutation testing mutates the program so that certain sections of code in the code are changed and the test case is applied to the changed code. If it fails, it is called killed. If it passes it is a survivor. And that is bad.
From these two values we calculate the mutation score. Similar to the test coverage, it is necessary to achieve the highest possible value.
Goals 1
Application in runtime
In my opinion, this is a very good concept that we should apply in the runtime and base class libraries as well as extensions.
I have to say that a rate of 100% would be too good to be true (similar to coverage) but a steady improvement is a good start in my opinion.
We could, in my opinion, start to expand the BCL with these tests in small steps.
One idea would be to create a manually triggerable CI job for this purpose.
Why manually?
The CI takes a long time and the mutation testing will take much longer than a normal test run because it will test multiple mutations.
Approach to use this strategy in .NET
There is actually a tool called Stryker 2 which is currently becoming more and more popular that can be installed via the
dotnet
CLI.I'm not sure to what extent we can use it in our project, as our project structure is quite different from other projects (Usage of Shared projects, directory structure and many other parameters which could influence this).
Approach to use this strategy in C++
Such a process would also be useful for the CoreCLR and Mono Runtime. There is a C++ library for this purpose.
Useful references
Here is a small list of links that may help you to understand the topic a little better.
I would very much like to hear about your opinion on this subject 😄
Footnotes
Source - 02/21/2022 17:42 CEST ↩
GitHub Repository - Documentation ↩
Beta Was this translation helpful? Give feedback.
All reactions