| Step 7a: Unit tests | previous contents next |
junitx.framework.TestCase. In order to execute the tests and
to see if they succeed or why they fail, they are collected in so-called
test suites. The suites implement junitx.framework.TestPackage and
can be run by the textual and graphical UIs of JUnit(X).
Before implementing tests you should decide on a strategy where to place
the tests. I recommend placing them in a parallel hierarchy using the
class naming convention Test<TestedClassName>. Thus the class
de.extremejava.url.URL would be tested by a class like
unittests.de.extremejava.url.TestURL.
XPTest saves a lot of work in implementing tests by generating code automatically.
If you want to use JUnitX without XPTest, you have to write the code yourself.
See the various snapshots of the tutorial project to avoid entering all code.
Now we need to configure XPTest in order to create tests.
| previous contents next |
© 2001 A. Heilwagen