DEV Community

Discussion on: Introduction to Front-End unit testing

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

Coverage is one of the worst and most counter productive metrics you can measure on code.

  • It provides a false sense of security by equating lines executed with lines tested.
  • It normalizes the value of code, allowing one to spend equal effort on all code rather than prioritizing high impact code.
  • It treats code as the source of authority instead of treating user stories as the proper driver for tests.

I recommend against using coverage tools as I have only seen them work as a detriment.

Collapse
 
nans profile image
Nans Dumortier

This is a very interesting point !
Is there anything like "User Story coverage" or something like that ? 😄

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

I've see requirements tools that do this... but well, the rest of those tools was nothing to be desired. :)