Unit tests in Frameworks

Dario Freddi drf54321 at gmail.com
Tue Dec 6 17:45:38 UTC 2011


Hello everyone,

I know some of you are crying blood just by looking at the title, but
yes, I want to bring this up :)

I think Frameworks could be a good chance to enhance and force
requirements regarding unit tests, especially for new code. I am the
first who apologizes as most of the code I committed to kdelibs didn't
have unit tests at all, most of the times because the code itself was
too hard to test (which of course is not a good excuse). AFAIK there
is no policy (yet) in this regard; if we want to provide even better
quality with our product, I think we should fix that.

It would be nice to enable coverage through gcov (I already have some
cmake code for doing that) and enforce a minimum percentage of
coverage for each component, maybe dependent on the tier (Tier 1
requires 90%, Tier 2 75%, etc...). Of course I know this is hard to
apply to existent code unless people will do an effort, but I think it
could be a sensible decision for future newcomers.

What do you think about that? Is there an interest in applying
something like that to our policies? In case, who would like to help
me in drafting and implementing it?


More information about the Kde-frameworks-devel mailing list