Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Defining TestExecute tests

TestExecute tests are relatively new test types used for testing Symbian OS components and should be defined using the testExecuteTest.dtd. The logs of these tests are written to file.

Test Execute tests use scripts to execute a series of test steps defined in one or several Test Execute servers. These servers also need to be defined using the testExecuteServer.dtd, see Defining TestExecute Servers.

Below is an example of how to create a Test Execute test XML file, SimpleTest.xml.

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

<testExecuteTest>

  <name>simpleTest</name>

  <timeout>120</timeout>

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

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

  <afterTestRun cmd="c:\WINNT\notepad.exe"/>

  <testScripts>
    <script>
      <hostPath>TestX\Test\Data\Source\SimpleTestExecuteTest\Scripts\SimpleTest.script</hostPath>
      <devicePath>c:\SimpleTest\simpletest.script</devicePath>
    </script>
    
    <script>
      <hostPath>TestX\Test\Data\Source\SimpleTestExecuteTest\Scripts\simpletest1.script</hostPath>
      <devicePath>c:\SimpleTest\simpletest1.script</devicePath>
    </script>
  </testScripts>

  <testServers>
    <server>simpleServer</server>
  </testServers>

</testExecuteTest>


TestExecute test XML tags

XML tag

Description

<testExcuteTest>

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

<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 automatically started.

<copyFrom>

This tag 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.

<testScripts>

This is where the name and location of the test scripts are defined.

<script>

This tag specifies the name of each script to be used. It contains two sub tags:

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

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

<testServers>

This is where the test's servers are declared.

<server>

This tag specifies the name of each server to be used.

<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 fort 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 binary 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