Running tests faster..

David Faure faure at kde.org
Tue May 15 17:57:55 BST 2012


On Tuesday 15 May 2012 18:47:16 Harald Sitter wrote:
> On Tue, May 15, 2012 at 6:42 PM, David Faure <faure at kde.org> wrote:
> > E.g. in kdelibs I get 3 more failures, due to ksycoca-related tests
> > creating and removing services that show up in other tests' queries, or
> > other tests reading and writing from the same shared files.
> > Any shared resource makes this impossible, but it's interesting to keep in
> > mind for the design of future unit tests.
> 
> TBH, a test that depends on another test sounds like a bad test and
> should be fix. I am certain Kent Beck agrees ;)

No no, they don't *depend* on each other.
They *interfer* with each other.
That's different :)

Any two tests that read and write in the same file (e.g. config file) or database 
(e.g. ksycoca, or mysql), create such trouble.

Yes it can be avoided, making sure that each test uses its own file or 
database, but this is extra effort, it just doesn't work out of the box, that's 
all I was pointing out. It's always easy (but never fair) to look back at 
existing things and declare them "bad" after the fact, when in fact the 
requirements have changed meanwhile :-)

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. KDE Frameworks 5





More information about the kde-core-devel mailing list