muteringsmått
Muteringsmått, often translated as mutation metrics or mutational metrics, are quantitative measures used to assess the quality of source code by evaluating the impact of code changes. The core idea is to generate variations of existing test cases by introducing small, artificial changes (mutations) into the source code. These mutated code snippets are then run against the original test suite. If the tests fail for a mutated code snippet, it indicates that the test suite is effective in detecting that particular type of change. Conversely, if the tests pass, it suggests a potential weakness in the test suite, as it failed to detect the introduced fault.
The primary metric derived from this process is the mutation score, which is typically calculated as the