Execute on Symbian
Three types of tests namely, command-line tests, TEF tests and RTest
tests are executed using the TestDriver. <executeOnSymbian>
task allows you to execute these tests on the Symbian device (hardware or
emulator). Each of these tasks are explained in the following section.
<executeOnSymbian>
task contains three sub-tasks:
-
<cmdSymbian>
: This task is used to run a STAT
command on the Symbian board. Specify the STAT commands that need to be run
using statCommand
attribute. While running this task you have the
following options:
-
statCommand
: This is the STAT command that you need
to run.
-
output
: The result is printed to the file specified,
otherwise it is printed to stdout and/or to the log files.
-
sync
: To run the command asynchronously to the
current thread set this attribute to false. The command is terminated when the
timeout occurs or at the end of the current task (whichever is first). By
default sync
is true and the current thread will wait till the
command is completed or the timeout occurs.
-
<testExecuteScript>
: This task is used to run a
TEF test on the device. The TEF script file is transferred, run and the results
are retrieved and stored in the TestDriver result folder. It also allows you to
target individual test cases in the test script. That is, you can either choose
to run or not to run a particular test case defined in the script.
TEF Scripts accepts only variables in the PCPath and not the
wildcards. During the build phase of the TestDriver all scripts are collected
into the repository and packaged into a .SIS
file.
In the run phase, if the PlatSec is on, the scripts are transfered
and installed at the beginning of the task, and uninstalled and deleted at the
end of the task. If PlatSec is off, the files in the repository are transfered
at the beginning of the task and deleted at the end of the task.
<testExecuteScript>
provides the following
attributes and an element:
-
PCPath
-
SymbianPath
-
<testCasesList>
tag is an enumeration of
<testCase>
tags that identifies each test case to be
included or excluded from execution by their ID using its
target attribute. The inclusion or exclusion of test cases
listed are controlled by the operator attribute of
<testCasesList>
tag, which can take the values,
'include' or 'exclude'.
If the operator attribute is set to
'include', all the test cases listed here are included in the
execution and the remaining test cases are excluded during execution. For more
details on how to do it, refer to Including or excluding test cases during execution.
The following image shows the structure of this tag:
Where, the <testCase>
tag must point to the
test cases to be included/excluded using their IDs. The following are the
different ways in which you can specify the test case(s) using the
<testCase>
tag(s):
-
You can either use their ID or their name, as shown in the
example below:
<testCase target="testCase1"/>
Or
<testCase target="1"/>
-
You can refer to a list of test cases either by listing each
of their IDs/names delimited by comma (,) or by specifying their range, as
shown in the example below:
<testCase target="1,2,3,4,5"/>
Or
<testCase target="1:5"/>
-
You can list all the test cases in a .tcs
file
and specify its name in the target attribute.
Note: You can have more than one
<testCase>
tag within the <testCasesList>
tag, as shown in the example below:
<testCasesList operator="include">
<testCase target="8981"/>
<testCase target="1:5"/>
<testCase target="20,40,63"/>
<testCase target="list.tcs"/>
</testCasesList>
For details on PCPath
and SymbianPath
, see
transferToSymbian task.
-
<rtest>
: RTests provide a way to send information
on the debug port and less often used. RTests are "legacy" type of tests.
Example for <executeOnSymbian>
An example xml file to describe an <executeOnSymbian>
task is provided below:
<executeOnSymbian>
<testExecuteScript PCPath="${epocroot}\epoc32\release\${platform}\${build}\z\systemtest\ST_Http_v6Cases.script" SymbianPath="c:\systemtest\ST_Http_v6Cases.script"/>
<testCasesList operator="include">
<testCase target="8981"/>
</testCasesList>
</testExecuteScript>
<rtest ResultFile="c:\result\result.txt" SymbianPath="c:\rtest.exe"/>
<cmd statCommand="getScreenCapture" output="${resultroot}/screencapture.gif"/>
</executeOnSymbian>