DEV Community

Discussion on: Tell me an unpopular software opinion

Collapse
 
s_aitchison profile image
Suzanne Aitchison

Super high coverage testing is sometimes a waste of time 😬

Collapse
 
vulpcod3z profile image
vulpz

Who writes the tests to test the tests?? 😡

Collapse
 
mike_hasarms profile image
Mike Healy

Coast guard.

Thread Thread
 
jgaskins profile image
Jamie Gaskins

I understood that reference

Collapse
 
dwilmer profile image
Daan Wilmer

Mutation testing

Collapse
 
patryktech profile image
Patryk

sometimes

Many, many times.

That said, if you are publishing libraries that are meant to be reused (e.g. on PyPI, or NPM), 100% is often a good idea.

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€

100% coverage of low quality tests is so much worse than 20% critical tests.

Collapse
 
gypsydave5 profile image
David Wickes

πŸ’― coverage is usually an indicator of highly coupled testing, which leads to very fragile tests, which leads to the tests being turned off...

Which leads to anger, anger leads to hate, and hate leads to suffering.

Collapse
 
ben profile image
Ben Halpern

For every metric, there is an equal and opposite metric.

Test coverage is good to know and track, but it can hide problems if it isn't a factor considered alongside a lot of principles and qualitative decision making.

Collapse
 
s_aitchison profile image
Suzanne Aitchison

Yes exactly; test coverage isn't the goal in itself and I think sometimes focusing too much on a percentage coverage is a distraction from creating an actual robust pipeline.

See also: snapshot testing in the frontend. Very easy to achieve close to 100% coverage with tests that are easily ignored and overwritten when they fail πŸ™„