dev-resources.site
for different kinds of informations.
Mutation testing in 1000 characters
Published at
12/7/2018
Categories
tests
craftsmanship
mutation
Author
schreiber_chris
Author
15 person written this
schreiber_chris
open
Code coverage is an common metric to measure code quality but it doesn't guarantee that tests are really testing the expected behavior.
Mutation testing can be described as tests of tests. It consists of introducing mutations to your codebase and checking if at least one test fails for each mutation (we say that mutation is killed in this case, otherwise it lived):
- inversion of conditions
- change boundary conditions (< becomes <=)
- change incrementation of counters
- change mathematical operators
- return null instead of returned value
- don't call void methoids, constructors...
- many other type of transformations
If a mutation is killed, that means that your tests are covering some edge cases, giving you more confidence about the quality of your tests.
Mutation testing can be an heavy process, so it doesn't need to be executed as often as unit tests, but it can be a step in your release process.
Java projects can use Pitest library.
mutation Article's
11 articles in total
Who tests the tests? Mutation testing with Infection in PHP
read article
Beware mutation
read article
Getting started with GraphQL in .NET 6 - Part 2 (Query + Mutation to Database)
read article
Why I should care about Mutation Testing?
read article
Announcing Hasura 1.4.0.alpha1
read article
Setting up mutation testing with stryker and web-test-runner
read article
The evil powers of mutants
read article
Beware of Mutation in Spread & React Hooks and How Can You Fix It
read article
Bulk update and delete mutations in GraphQL
read article
Increase the quality of unit tests using mutation with PITest
read article
Mutation testing in 1000 characters
currently reading
Featured ones: