Re: Side effects between test cases
| Newsgroups | gmane.comp.java.junit.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, *Esko Luontola [email protected] [junit] <[email protected]> [14/07/25]: > Tobias Werth [email protected] [junit] wrote on 24.7.2014 23:49: > > So what's the best practice to reduce or even avoid these side effects > > when writing JUnit test methods? > > I don't worry about excess CPU and memory consumption when it only > happens when tests fail. After the test run ends and the JVM is killed, > those resources are automatically freed by the OS. And even if it > starves the JVM so much that the test run will never end, it's possible > to force kill the process manually. Thanks for your reply, but my case focuses on side effects *between* test cases. 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. I do care about these unrelated fails which should not fail. Cheers, Tobi ------------------------------------ Posted by: Tobias Werth <[email protected]> ------------------------------------