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.
Java Simple Pocs. Contribute to diegopacheco/java-pocs development by creating an account on GitHub.
Originally published at http://diego-pacheco.blogspot.com on August 4, 2020.