ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Lipkis <...@pss.com>
Subject Re: Sorting filesets
Date Mon, 14 Oct 2002 23:35:00 GMT
> It tends to run them in order test1, test2, etc. but that may be an artifact
> of how the JVM runtime, rather than junit itself.

I've noticed that Class.getMethods() seems to return them in the order they
appear in the source file, but I certainly wouldn't depend on that.  And
again, I'm trying to sort the test classes, not the test methods within a
class.

> > If you're writing tests that depend on ordering, don't.
> 
> agreed.

Sure, but while the tests themselves are order-independent, *I* prefer a
certain order because it's more useful to me.  And I don't want a separate
test suite that knows the order, because I'd have to change the list
whenever I add a test.  What I want to do is put

  public static Class prerequisiteTests[] = {
    TestClassA.class,
    TestClassB.class,
  };

into each test class, then I can easily compute the partial order.  Is what
I'm trying to do (run tests of components before tests of classes that use
those components) that unusual?

(This has ceased to be an ant discussion, so we should probably stop.)

Tom

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message