JUnit 4 test suite problems
- by Hypnus
Hi, i have a problem with some JUnit 4 tests that i run with a test suite.
If i run the tests individually they work with no problems but when run in a suite most of them, 90% of the test methods, fail with errors. What i noticed is that always the first tests works fine but the rest are failing. Another thing is that a few of the tests the methods are not executed in the right order (the reflection does not work as aspected - or it does because the retrieval of the methods is not necessarily in the created order). This usually happens if there is more than one test with methods that have the same name. I tried to debug some of the tests and it seems that from a line to the next the value of some attributes gets null.
Does anyone know what is the problem, or if the behavior is "normal"?
Thanks in advance.