Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.26 KB

01.mutation-testing.md

File metadata and controls

35 lines (24 loc) · 1.26 KB

Let's mutate some code

Discover the Code

Take a few minutes to discover the source code (production and related tests).

Code Coverage

Run a code coverage analysis and discuss regarding the result.

Would you be confident to refactor the production code with such coverage?

Mutation Testing

Take some time to discover the concept behind Mutation Testing

  • What did you learn from this page?
  • Implement what is mandatory in your language to run a mutant analysis
  • Analyze the resulting report

What did you learn from this report?

Kill the Mutants

Fix the tests to kill the mutants that have been identified.

Would you be more confident to refactor the production code now?

Our Advice

Always focus on good assertions when writing tests.

Take a look at the Test Desiderata if you want to know more.

Here mutants have been identified because the code has not been written using TDD and systematic refactoring.

Mutant killer

Step-by-step solution