STAREAST 2022 - Unit Testing | TechWell

STAREAST 2022 - Unit Testing

Wednesday, April 27

Steampunk
W3

Test Your Unit Tests: Mutation Testing

Wednesday, April 27, 2022 - 11:30am to 12:30pm

Even if your code coverage is 80%, how much confidence do you have in your unit tests? Are they catching the edge cases? Can you fearlessly refactor? Add new features? Perhaps you are writing code that another team will rely on (or worse, you have to rely on!) Or maybe you have to untangle some ugly spaghetti code and want some idea of what it does before you start chopping it up. A mutation testing framework like PIT from pitest.org tests your JUnit tests and shows you what you are and aren’t testing. If your unit tests all pass, mutation tests make changes to a copy of your source code...