Vemund Ostgaard wrote:
I'm trying to get all the tests in suites.All to run successfully with
the phoneME advanced platform.
A problem I have discovered is that when JUnit creates a suite of
tests from the test* methods in a class, I get them executed in a
different order on this platform (seems to be the exact opposite
order). I guess reflection behaves a little different, I don't think
it's a bug. This causes some tests to fail because they are not really
independent of the order that the test* methods in the class get
executed, but the methods happen to be executed in an order that works
when running on other JVMs.
I don't think it's a huge issue, I don't know yet how many tests are
failing because of this as there is still too much noise in my
testresults, but I've discovered a few so far. I just wanted to
mention it so that people are aware that the order the methods get
executed in may be different in other environments, even though they
normally get executed in the order they have in the file, so all the
test* methods do have to work independent of the order.
Vemund
Thanks for bringing this up, Vemund. I think that the JUnit
documentation states that the order in which test* tests run is not
guaranteed to be same across platforms--unless you hardcode the order
you want by explicitly adding each test* test to your suite.
Regards,
-Rick