Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Defining RTests

RTests are the original test harnesses used for testing Symbian OS. They compile into executables. The RTest logs of these tests are currently redirected from a device via a serial port. Each RTest should be described in an XML file based on the RTest DTD (Rtest.dtd).

Below is an example of an RTest XML file, SampleLegacyTest7.xml:

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

<Rtest>

  <name>SampleLegacyTest7</name>

  <mmpFile>SampleLegacyTest7.mmp</mmpFile>

  <bldInfPath>TestX\Test\Data\Source\group\bld.inf</bldInfPath>

  <devicePath>c:\TestX\SampleLegacyTest7.exe</devicePath>

  <timeout>30</timeout>

  <copyFrom src="c:\testdriver\test.txt" dst="test.txt"/>

  <beforeTestRun cmd="C:\WINNT\notepad.exe"/>

  <afterTestRun cmd="c:\WINNT\notepad.exe"/>
    
  <dependencies>
    <data>
      <hostPath>epoc32\WINSCW\c\testx\SampleLegacyTest7DataDep.txt</hostPath> 
      <devicePath>c:\TestX\SampleLegacyTest7DataDep.txt</devicePath>
    </data>

    <build type="test">
      <hostPath>SampleLegacyTest7BuildDep.dll</hostPath>
      <devicePath>c:\system\libs\SampleLegacyTest7BuildDep.dll</devicePath>
      <mmpFile>SampleLegacyTest7BuildDep.mmp</mmpFile>
      <bldInfPath>TestX\Test\Data\Source\group\bld.inf</bldInfPath>
    </build>
  </dependencies>

</RTest> 


RTest XML tags

XML tag

Description

<RTest>

The test is described within a <RTest> 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 RTest. The name must be set the same name as the XML file.

<mmpFile>

The name of the .mmp file of the test.

<bldInfPath>

This defines the location of the bld.inf file, used for building the test .mmp file.

<logMemory>

This defines the amount of memory to allocate for the test log.

<devicePath>

The path for the test executable location on the device.

<resultFile>

This is the test log to be retrieved from the device.

<timeout>

This is the maximum amount of time, in seconds, for the test to run to completion. If the test runs for longer than the specified timeout period, the test will be killed and the next test is started automatically.

<copyFrom>

This is optional and can be used when performing remote testing and additional files are required as part of the test results. It allows you to specify a file to be copied from a source location (src) to a location in the results repository (dest).

The additional files become part of the results.zip file which is passed from the server to the client in TestMaster/TestClient environment (see XREF to Remote testing section).

<beforeTestRun>

This tag is optional and allows you to perform any pre-test processing on the server using an external program (not part of TestDriver) when executing a test remotely. This may be useful, for example, when wanting to make sure that the environment is clean before running the test.

The processing can take up to 5 mins - if it has not finished within this time period, an error message will be sent to the user.

<afterTestRun>

This tag is optional and allows you to perform any post-test processing, using an external program (not part of TestDriver) when executing tests remotely. This may be useful, for example, when wanting to send an email notification to the client after the test has been completed.

The processing can take up to 5 mins - if it has not finished within this time period, an error message will be sent to the user.

<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 binary file on the PC.

  • <devicePath> - defines the target location where the buildable file is to be found 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