STAT Plug-in
STAT (Symbian Test Automation Tool) plug-in is used to communicate with a
Symbian OS device from a remote PC. It is an interface between the PC and the
STAT agent running on the device.
The STAT agent is a Symbian OS application that provides commands to:
-
terminate a process running on the device,
-
specify a log file location on the device,
-
poll a process running on the device.
TestDriver uses the STAT plug-in to pass the commands to the STAT agent
running on a Symbian OS device. Besides the tasks listed earlier, the plug-in
also allows TestDriver to copy files from the PC to the device and vice versa,
create directories on the device, and so on. These activities are remotely
controlled on the device by a PC through a serial cable (TCP/IP, or any
standard protocol), infrared, USB or Bluetooth. To perform these activities,
ensure that:
-
the connection to the device is set up correctly,
-
the STAT agent
is available on the device
-
the STAT agent is running.
Note: You can start the STAT agent either manually or
automatically by building into the ROM image, using the
techview_statapi.oby
file.
TestDriver can also use the STAT plug-in to communicate with the emulator
through WinTAP or a similar loopback system installed on the PC. For more
details on WinTAP, see Setting up WinTAP.
TestDriver uses the STAT plug-in by default to communicate with the
Symbian OS device. If you are using the IP-based plug-in, you can always switch
to the STAT plug-in by running the following command:
> testdriver
config
--commplugin
com.symbian.driver.plugins.comms.stat
Configuring the STAT
There are two ways of launching STAT:
-
Using buildrom
-
From the device
Using buildrom
The standard BUILDROM
commands are used to build the ROM
image. For more details, see ROM Building Tools Guide >> Using
the ROM building tools >> Rebuilding Symbian OS reference ROMs
The ROM built is simple as it is built without the test code.
The following example builds the ROM image and launches STAT at the
time of system startup:
buildrom –D_EABI=ARMV5 –DRVCT –D_STARTUPMODE2 -DUSE_STRONG_CRYPTOGRAPHY h4hrp techview platsec statauto.iby"
where,
-
–D_EABI=ARMV5 –DRVCT
: specifies that the code is
built using the ARM RVCT compiler for the ARMV5 processor.
-
Techview
: specifies that TechView, the test GUI must
be built in the ROM
-
Platsec
: specifies that PlatSec is enforced in this
ROM image
-
statauto.iby
: specifies that STAT must be built in
the ROM image
-
–D_STARTUPMODE2
: specifies that the ROM should start
STAT automatically.
If you include testexecute.iby
, or similar file in the
ROM image, switch the TestExec
to OFF. This can
be done by running the following command:
TestDriver.cmd config --testexec OFF
If testexecute.iby
is not included in the ROM image, run
the following command:
TestDriver.cmd config --testexec ON
From the device
You can launch STAT by including the stat.ini
file in
the Compact Flash (CF) card on the sys\data
directory.
Before the communication is established and the test results are
collected, copy the following files from your PC on to the device:
-
epoc32\data\z\system\data\stat.ini
-
epoc32\release\<platform>\urel\statapi.exe
-
epoc32\release\<platform>\urel\cinidata.dll
-
epoc32\release\<platform>\urel\testexecuteLogClientExt.dll
(used for console logging)
-
epoc32\release\<platform>\urel\econsext.dll
(used for console logging)
Complete the following steps to configure STAT:
-
Copy the files listed earlier to the CF card in the following
locations:
-
system\data\stat.ini
-
system\programs\statapi.exe
-
system\libs\cinidata.dll
-
system\libs\testexecuteLogClientExt.dll
-
system\libs\econs.dll
NOTE: Rename the file econsext.dll
to econs.dll
.
-
Insert the CF card into the CF slot and power on the device.
-
Browse to the drive mapped to the CF card and then browse to the
location system\programs
.
-
Start the STAT
tool manually by double-clicking on
it.
Press 'b' on the device to run STAT
in
the background. Press 'ESC' to close the application.
Modify the c:\system\data\stat.ini
file on the EPOC
device. Set the communication type and the logging settings.