The XML files used to define the test suite hierarchy should be stored and structured in such a way that they reflect a composite tree pattern; tests can be grouped to form suites, and suites can be grouped together to form other suites. Suites can also contain a combination of tests and suites. This means that each test and test suite should have their own defining XML file at the same level as they appear in the test suite hierarchy.
The XML files describe tests and test suites. Tests are defined in either a <RTest>
, <testExecuteTest>
or <commandLineTest>
tag, depending on the test type. Suites are defined using a <testSuite>
tag. When using a Test Execute test, the associated servers also need to be defined in a separate XML file within a <testExecuteServer>
tag.
NOTE:
None of the tags are case sensitive.
The XML elements available for edit in each XML file depends on which DTD is being used, i.e. RTest.dtd
, TestSuite.dtd
, TestExecuteServer.dtd
, TestExecuteTest.dtd
or CommandLineTest.dtd
.
Any associated dependencies are defined within a <dependencies>
tag inside the main tag.
Below is an example of how XML files have been organised to reflect the test suite hierarchy described in Defining a test suite hierarchy.
In the XML structure above, we have a number of suites and tests organised into directories. The contents of a directory represent the contents of a suite and the XML files define the suites and tests.
In the diagram above, TestSuite1 is the top most suite. This suite is defined by the TestSuite1.xml
file. The path [XMLRoot]
is specified when configuring Test Driver. See Installing and configuring Test Driver for more information.
The Test Suite 1 directory contains two suite directories, Test Suite 2 and Test Suite 3, as well as the corresponding XML
files for these suites, TestSuite2.xml
and TestSuite3.xml
. These XML files are based on the TestSuite.dtd
.
The Test Suite 2 directory contains yet another suite directory, Test Suite 4, the corresponding suite XML file, TestSuite4.xml
and two tests, RTest1.xml
and RTest2.xml
. The tests in this instance are RTests, and are defined based on RTest.dtd
.
The Test Suite 4 directory is the final suite in that branch and contains two RTests, i.e. RTest XML files.
Test Suite 3 is slightly different though, as it contains a TestExecute test that needs associated TestExecute servers:
The Test Suite 3 directory contains two TestExecute tests, TestExecuteTest5.xml
and TestExecuteTest6.xml
files, based on testExecuteTest.dtd
. It also contains a TestExecuteServers directory for the servers associated with these tests.
The TestExecuteServers directory contains the XML files for the servers; TestExecuteServer1.xml
and TestExecuteServer2.xml
. These are defined using TestExecuteServer.dtd
.
When several TestExecute tests within different suites are using the same TestExecute servers, the servers need to be defined within the top most common suite.
If, for example, the Test Suite 1 folder contained yet another test suite containing TestExecute tests that make use of the same servers as the tests defined in Test Suite 3, the servers should be defined within a TestExeuteServers directory in the Test Suite 1 folder, as shown below: