AnthonyMastrean / anthonymastrean.github.io

https://anthonymastrean.com
0 stars 0 forks source link

What statistics are appropriate for unit tests? #63

Open AnthonyMastrean opened 7 years ago

AnthonyMastrean commented 7 years ago

There comes a time, it seems, in any team, when you have to port a codebase, or update a major framework, or dramatically change some tooling and, inevitably, a ton of unit tests fail, for some period.

Someone usually decides to work up some stats on the data from, say, the last run of the tests. They might present a table like this...

     Project | Tests | Pass | Fail |  %
    ---------|-------|------|------|-----
     A       |   102 |   91 |   11 | 89%
     B       |    27 |   26 |    1 | 96%
     C       |    39 |   25 |   14 | 64%
     D       |     2 |    0 |    2 |  0%
     E       |     8 |    1 |    7 | 13%

And then they would conclude...

The average success rate is 52.4%

And maybe they'd present this information day-over-day or week-over-week until the number are "good" or the effort is over.

I'm having a really hard time with these numbers...

Problems...

Considerations...

Todo...