[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[stellation-res] Work merging Unit tests
|
As I've been going hog-wild writing unit tests, one problem that has
developed is that there are a lot of different unit test suites
floating around the unittest project. Each of these suites targets
a different part of the system. That's terrific: I've come to really
love JUnit.
The catch is that with them all living separately, they're scattered
all around, and it's hard to make sure that you're running everything
when you want to do a broad generalized test.
What I'd like to do is propose adding a new master test runner, which
will run all of the suites in the unittest project. To do this, we
would add a method "static void addTests(TestSuite suite)" to each
of the unit tests; and the current "suite" method in each of the
current test suites would be replaced with boilerplate:
public static TestSuite suite() {
TestSuite result = new TestSuite();
addTests(result);
return result;
}
Then, in the master unit test class, when you add a suite, you just add
one line to its "suite" method, to call the "addTests" method of
your new test suite class.
This should be a pretty trivial thing to do.
Whatcha think?
-Mark
--
Mark Craig Chu-Carroll, IBM T.J. Watson Research Center
*** The Stellation project: Advanced SCM for Collaboration
*** http://www.eclipse.org/stellation
*** Work Email: mcc@xxxxxxxxxxxxxx ------- Personal Email: markcc@xxxxxxxxxxx