A JTestCase XML file can contain the test data for several test classes and test methods therein. The
XML is therefore structured in <class>
and <method>
tags:
|
As you can see in the example the <class>
tag has a name
attribute. This
contains the class name of your test class (e.g. "MyCodeTest
" if your test class is named
"MyCodeTest.java
").
The <class>
tags contain <method>
tags which in turn
contain <test-case>
tags.
Each tag must have and unique name
attribute
There may be several <test-case>
tags with the different name
attribute.
This gives you the possibility to create more than one
test case with the same JUnit test method.
You can define some parameters that controls the behaviour of your test runs. These are independent of any specific test class or method.
|
Global parameters are parameters that you want to use in all test methods of a test class. These parameter
can be defined directly inside of the <class>
tag:
|