DEV Community

Discussion on: The Myth of Code Coverage

luigledr profile image
Luiz Alberto

One way to avoid some of the pitfalls you'd presented here is using mutation tests technique, it's a very cost way of guarantee more code quality to our projects, but done correctly, it could be very effective.

integerman profile image
Matt Eland Author

This is a huge point. I love it. Yes, you can automate some of these tests, particularly with enums. I picked a few readily available examples from my own hobby code to discuss.

Fuzz testing, test data generators, and looping over all possible values won't find everything, but it's something to strongly consider.