Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Defining test suites

Suites comprise of tests and / or other test suites, as well as (optional) test servers. (Test servers are required by the TestExecute tests and contained in those suites.)

Test suites are defined as XML files using the testSuite.dtd.

Below is an example of a test suite XML file, SampleSuite.xml.

<?xml version="1.0"?>
<!DOCTYPE testSuite SYSTEM "file:///c:/program files/common files/symbian/testSuite.dtd" [ ]>

<testSuite>

  <name>SampleSuite</name>

  <testItems>
    <test>SampleLegacyTest1</test>
    <test>SampleLegacyTest2</test>
    <test>SampleTestExecuteTest</test>
  </testItems>

  <testExecuteServers>
    <server>sampleServer</server>
  </testExecuteServers>

  <dependencies>
    <data>
      <hostPath>epoc32\WINSCW\c\testx\SampleLegacySuiteDataDep.txt</hostPath>
      <devicePath>c:\TestX\SampleLegacySuiteDataDep.txt</devicePath>
    </data>
    
    <build type="test">
      <hostPath>SampleLegacySuiteBuildDep.dll</hostPath>
      <devicePath>c:\system\libs\SampleLegacySuiteBuildDep.dll</devicePath>
      <mmpFile>SampleLegacySuiteBuildDep.mmp</mmpFile>
      <bldInfPath>TestX\Test\Data\Source\group\bld.inf</bldInfPath>
    </build>
  </dependencies>

</testSuite>


Test Suite XML tags

XML tag

Description

<testSuite>

The test suite is described within a <testSuite> tag. The test consists of a number of tags. Some tags are required and some are optional. The optional tags are displayed in italics.

<name>

This is the name of the test suite. This must be set the same name as the XML file.

<testItems>

This is where the tests and suites contained within the test suite should be specified.

It is also possible to reference other, exisiting tests or suites within this tag, by using the following elements:

  • <testRef> - the location and name of the test to be referenced, for example TestSuite1.TestSuite2.Test2.

  • <suiteRef> - the location and name of the suite you are referrring to, for example, TestSuite1.TestSuite2.TestSuite4.

<test>

Specifies the name of a test to be included in the test suite.

<suite>

Specifies the name of the suite to be created.

<testExecuteServers>

Specifies the name of a TestExecuteServer used within the test suite.

<server>

Contains all servers required for TestExecute tests in this suite.

<dependencies>

This tag is used to describe any dependencies required for this test. Dependencies are optional, but when used they need to be defined as either data files or buildable files. The format used for each type is described below.

<data>

This tag is used to describe a data file dependency for the test, e.g. an existing file that does not need to be built. It contains two sub tags:

  • <hostPath> - defines the source location of the data file on the PC, after an export has been made.

  • <devicePath> - defines the target location of the data file on the device.

<build>

This tag is used to describe a buildable file dependency for the test. It has an attribute; "type" which specifies how the dependency should be built using the abld command.

This could be either of the following:

  • "normal", indicating that the dependency will be built as a non-test project, i.e. build this dependency without 'test' in the abld command. For example abld build ….

  • "ASSP" (Application-Specific Standard Product), indicating that the dependency will be built for a specific product, e.g. MISA for an Assabet board.

  • "Normal_ASSP", indicating that the dependency will be built as a non-test project specific to a product.

  • "test", indicating that the dependency will be built as a test project. For example abld test build …. ·

  • Default is set to "test" as described above.

The <build> tag also contains several sub tags:

  • <hostPath> - defines the location of the buildable file on the PC.

  • <devicePath> - defines the target location where the buildable file is to be built on the device.

  • <mmpFile> - defines the name of the project file (.mmp) to be built.

  • <bldInfPath> - defines the location and name of the bld.inf file for the project to be built.

[Top]


See also