Suggesting: Test coverage

Avatar

poelzi

about 1 month ago

Hi,

i suggest a addition to the quality of code by measuring test ratios.

testratio = (Lines of Code - Lines of Tests)/Lines of Tests

would give a rouge percentage of test coverage for a project. Of course there has to be some fuzzy code to detect which code could be tests like code in folders with names like test(s|suite){1,0}, lines with asserts, doctests,...

Projects which have a large testsuite usually have a good code base which lesser regression bugs then projects without.


Avatar

Hagen Möbius

about 1 month ago

Tha would really be great! Any way we are going to see something like this implemented?

Hagen.


Avatar

marcospereira

about 1 month ago

Totally nice.

+1


Avatar

DMINATOR

about 1 month ago

It would be a good addition, but only when the tests had been correctly spotted. Otherwise the project would look like a complete untested trash :)

There are so many different approaches and many custom ones, so I think the best way to do something like that is allow the project admins to describe test environment themselves.


Avatar

poelzi

about 1 month ago

good idea. maybe some regular expression technique