DEV Community

Gary Bell
Gary Bell

Posted on

1

What level of test coverage do you aim for?

I'm sure we would all want to work on a code base with 100% test coverage, but it's not always possible for reasons of budget, legacy laziness, or people not understanding the benefits.

I'm currently re-working a major part of a project at the moment, and am very glad we have high test coverage in it (even if poorly implemented in places). This has let me identify the areas I would be causing to break without having to manually test everything.

The project has a minimum threshold of 95% test coverage, which we're slowly edging down to (we're on about 98 at the moment), but will catch up again in the new year (there's technical debt tasks for them already).

It's accepted that aiming for 100% gets to a point of diminishing returns over a large code base, so what level of coverage do you aim for?

Top comments (0)

Heroku

This site is powered by Heroku

Heroku was created by developers, for developers. Get started today and find out why Heroku has been the platform of choice for brands like DEV for over a decade.

Sign Up

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay