Java Mutation Testing with Pitest

Line by Line coverage can be very tricky. Many companies rely on line coverage as metric signals however you can easily have waste with that kind of metric like Getters/Setters, Database Calls, etc. The other issue is that kind of tools can be easily gamed.  The mutation test is not a new idea, it appears in the 70s. The main idea behind mutation testing is to test your Tests. Therefore harden your application solution and tests. The mutation test has the concept of mutators. Mutators are bugs and they should be KILLEd if they SURVIVE it means you have bugs in your code that your tests are not catching. Mutants are much harder to fool unlike line coverage tools. Today I want to share a hands-on Refactoring video I made using Pitest.  So Let's get started.
Video


Code


Cheers,
Diego Pacheco

Popular posts from this blog

Java Agents

Manage Work not People

HMAC in Java