When you are running tests on a device remotely from a PC, you need to make sure that the tool STATAPI
is available, and at the right location on the device. You also need to make sure that you have set up the connection correctly.
There are currently four transport modes available for communicating with the device. These are serial, TCP/IP, Bluetooth and USB.
STATAPI
is a tool that is used by TestDriver to communicate with a Symbian device, execute tests, and to collect the test results.
It can be started manually from the device, or be built into a ROM, using the techview_statapi.oby
file.
NOTE: When STATAPI is built into a ROM, it must be run in a full graphical environment, such as Techview.
Before communication can be established and test results collected, you need to copy five files onto the device.
These files are located under the epoc32 directory on your PC, as follows:
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)
1. Copy the above files to the CF (Compact Flash) card at the following locations:
system\data\stat.ini
system\programs\statapi.exe
system\libs\cinidata.dll
system\libs\testexecuteLogClientExt.dll
system\libs\econs.dll
NOTE: This file needs to be renamed from econsext.dll
to econs.dll
.
2. Insert the CF card into the CF slot and power up the device.
3. Once the device has loaded, browse to the drive mapped to the CF card and then browse to the location system\programs.
4. Start the STATAPI
tool manually by double-clicking on it.
You can run STATAPI
in the background by pressing "b" on the device. Alternatively, you can close the application by pressing "ESC".
TestDriver supports TCP/IP over NTRAS. This needs to be set up on both the device side and PC side as described below. Please see Connecting TestDriver, which explains the cable connections required.
Modify the stat.ini
file according to the example below. Note that NTRAS should be left on comm:0 on the device.
[SectionOne]
comport= 0
[SectionTwo]
transport= tcpip
[SectionThree]
logging= 0
debugport=3
The com port setting in SectionOne is ignored at present, and commdb is always used.
Install NTRAS on COM2 of the PC.
Start the Remote Access Service.
You can get the IP address that will be assigned to the device from the static address pool set in the Control Panel. The address that must be used is the next value after that specified in the "Begin" field.
The command line option for running test over TCP/IP is -t tcp --ip 'address', as shown in the following example:
> Testdriver run -p arm4 -b urel -s root.syncmlclient.rtest -t tcp --ip 10.1.0.2
When a PPP connection is established it will show up in the windows tool remote access admin. If you are unable to make a connection, you may need to edit the Comms database so that all the modems except the null modem are removed on comm:0. This should enable communication.
TestDriver supports serial communication. You need to set this up both on the device side and PC side as described below.
Modify the stat.ini file according to the example below.
[SectionOne]
comport= 2
[SectionTwo]
transport= serial
[SectionThree]
logging= 0
debugport=1
The com port must be set to 2 for serial connection. This is because COMM:0 is usually unavailable and access is denied when trying to connect. (Logging should be left at 0, as it is only used for TestDriver debugging.)
Connect a null modem cable between a com port on the PC and comm:2 on the device.
The command line option for running the test over serial is -t serialX
where X
is the PC com port number.
Below is an example on how to run a test over a serial connection:
> Testdriver run -p arm4 -b urel -s testsuite1.testsuite3 -t serial1
Activate BLUETOOTH on your Symbian device.
Modify the STAT.ini
file to include -bt
as your transport option, as shown below.
[SectionOne]
comport=0
[SectionTwo]
transport=bt
[SectionThree]
logging=0
debugport=1
Start STATAPI. This will connect and advertise STATAPI as one of the available BLUETOOTH services.
Ensure your BLUETOOTH dongle is connected correctly. Note the comport to which it is mapped.
Browse to your BLUETOOTH neighbourhood and to your BLUETOOTH device. Refresh by pressing F5. You should see a STATAPI serial port service. Right click and connect. This will pair your PC and the STATAPI service.
You are now ready to use TestDriver over a BLUETOOTH connection.
Below is an example on how to run a test over a bluetooth connection:
> TestDriver run -p arm4 -b urel -s suite1.suite2.testA -t bt6
where 6
is the mapped comport number for the BLUETOOTH dongle.
An available USB port and USB cable connected to the device via the square port (labelled U33 on a Lubbock board).
A software driver to recognise the device as a USB supported device and expose it as a virtual serial port.
Symbian MCCI drivers, for detecting a Lubbock board as a plug-and-play USB device identified as SGH-D700 and allocating it a virtual serial port.
Intall the drivers on the PC.
NOTE: Attach the Lubbock board only after it has fully started up (so it is not detected as anonymous by the PC).
If the PC shows an anonymous plug-and-play device connected, then remove it from the list of devices by using "Device Manager" or right-clicking the system tray icon and selecting "Stop" (depending on operating system).
The device component STATAPI can not access the USB port from Flash or RAM drives. In order to access the USB port, STATAPI must be run from ROM.
On the Lubbock board, ensure the USB Manager icon is on, by using the Control Panel.
Physically attach the USB cable between the PC and Lubbock port J30. The Symbian device will appear as a port under Device Manager.
Make a note of the virtual serial port created.
Start STATAPI on the device with transport=USB
set in the stat.ini
file.
You are now ready to use TestDriver over a USB connection.
Below is an example on how to run a test over a USB connection:
> TestDriver run -p arm4 -b urel -t usbX -s suiteA.suiteB
where X
is the mapped port number.