Kill All Mutants! (Intro to Mutation Testing)

Short description

Would your test suite still pass if the tested code was changed? If so, there may be problems with your code, your tests, or both!

 

Mutation Testing reveals these cases. This talk will tell you what mutation testing is, how it works, how to use it, and its benefits, drawbacks, and history. There will be multiple examples, and a list of tools for many popular languages.

 

You will come away equipped with a powerful technique for making sure your tests are strict and your code is meaningful!

Value for the audience:
Mutation testing is a technique to find gaps in your test suite, not merely by lines or branches but semantic concepts. It can also be used to find redundant or unreachable code, or code that for whatever other reason, doesn't make any difference to your tests.

So, it can help you ensure that your code is really fully tested (as opposed to fully *run* by the tests), and has no extra "junk code" in it.

Problems addressed:
Test suites created by developers (unit tests, integration tests, etc.) often fall far short of fully testing the code.

Developers often make many small simple mistakes, such as dividing when they should multiply, being off by one when applying a limit, or applying the wrong comparison to a limit (such as "less or equal" instead of "strictly less").

Even if developers *try* to test their code completely, this is usually measured in terms of the percent of code that was run. Achieving 100% coverage can be achieved without actually testing the code at all, and is therefore meaningless.

Talk language: English
Level: Advanced
Target group: Developers (and maybe some testers) of any tech-stack

Company:
Codosaurus, LLC

Presented by:
Dave Aronson

Dave Aronson