Re: Side effects between test cases
| Newsgroups | gmane.comp.java.junit.user |
|---|---|
| Message-ID | <[email protected]> |
Tobias Werth [email protected] [junit] wrote on 25.7.2014 9:53: > Let's assume someone broke a part of the code and commits it. The CI > system picks up, runs JUnit tests. Then not only a single test case > fails, but more *unrelated* test cases might fail afterwards. How often does that happen in your projects? My experience is that it happens very rarely. I can't even remember any specific instance right now. (I presume you don't mean the problem of the same functionality being covered by many tests, in which case many tests may fail as a result of a single bug. See http://blog.orfjackal.net/2012/05/unit-test-focus-isolation.html) In my last project I've mostly seen just intermittent failures due to fragile tests (typically Selenium based tests), the cause typically being badly handled concurrency and timing issues (or maybe it's just Selenium). There have also been failures because of writing things to the database and not cleaning up properly after themselves - or because the tests were not designed to work in the presense of existing data, whichever way you want to think about it. -- Esko Luontola www.orfjackal.net ------------------------------------ Posted by: Esko Luontola <[email protected]> ------------------------------------