This package is a layer on top of JUnit. The main goals that this package addresses that are not well handled by JUnit are:
TestCase.toString()
come up with
a different description.
TestCaseBase
- Base class of all test classes. Each test in
the test case is implemented as a public method using the
testXXX()
in the pattern of JUnit and it is a
JUnit TestCase
. However, it overrides
TestCase.runTest()
and has it's own method of constructing
instance of the class for each testXXX(). The big gain
here is that it doesn't use the name
as the test method,
allowing for more complex identifiers that reflected parameterized reuse.
All kind of a round about way of changing what is returned by
TestCase.toString()
.
-
XmlcTestCaseBase
- Test case that is parameterized
by DOM, parser and reloading.
TestCaseBase
follows the
following steps, with TheTestCase
representing
the derived class.
TestCaseBase.suite()
to create the test suite.
This methods must be defined in every test case.
TheTestCase.suite()
then calls
TestCaseBase.createSuite()
, which finds all
test methods in TheTestCase.suite()
.
TheTestCase
is created
for each test method, passing the Method
object to the
constructor.
TestSuite
object is constructor with all of the
TheTestCase
objects.
TestCaseBase.runTest()
,
which then invokes the actually test method via the saved
Method
object.
xmlc.test.root
- Directory, relative to the current
directory, that contains the collection of test cases. This is required
so that ant can run the tests in a higher-level directory.
xmlc.test.update
- If a true value, updated expected files
after diff failure.
xmlc.test.update
- If a true value, updated expected files
after diff failure.
xmlc.test.verbose
- If a true value, print test trace infomation.
xmlc.test.parser
- If a true value, use this parser for the
test.
xmlc.test.dom
- If a true value, use this DOM for the test.
xmlc.test.reloading
- If a true value, including reloading testing.