Suite organization

Andreas Pakulat apaku at gmx.de
Tue May 27 19:51:36 UTC 2008


On 27.05.08 00:10:54, Manuel Breugelmans wrote:
> Kdevelop has a wealthy set of tests. However I'm not convinced that they are 
> being used optimally.

I suspect they're currently not really used at all, however thats a
problem of kde in general as execution of tests is not enforced.

> Currently you cannot tell if a test just broke or if it is 'known to fail - 
> will fix later'.

IMHO a test is either broken and needs to be fixed (either by adapting
the test to the API changes or fixing the code that broke it) or its an
expected fail and thus is considered broken once it passes. If you want
to do test-driven development I think its better to either

- commit test and fix together
- commit test first, without building it and enabling it as soon as the
  fix is done

> Also there's no distinction between tests which verify a 
> single part (aka unit tests) and those that verify a combination (aka 
> integration tests, eg gui ones). 

I'm not sure we really have anything that qualifies as integration test.
A gui test is not necessarily an integration test IMHO, if it tests just
one specific behaviour of a gui widget/component its still a unit test.

> I suggest simple tagging of the cmake test targets. A failing test could be 
> suffixed with '-fail-<name(s)-of-failing-method(s)>'.

Thats too much maintenance IMHO.

> Unit tests could be  prefixed with 'ut', integration ones with 'it'.
> This is particularly useful since Ctest allows for inclusion/exclusion
> of tests in a run based on regexes. I'm following this naming
> convention for my tests ... feel free to adopt it.

That one I agree with, though I'd probably prefer U.<testname> and
I.<testname> instead of ut and it.

Andreas

-- 
You will attract cultured and artistic people to your home.




More information about the KDevelop-devel mailing list