This section explains how to configure and run runtime testing. It covers:

Environment-Specific Configuration

Automating Unit Testing with Microsoft ActiveSync

To facilitate using Microsoft ActiveSync as a communication channel during unit testing, an ASconnector command line tool is provided. ASconnector can automate the following tasks:

For details on ASconnector, see Unit Testing with ASconnector

The "Build and run test executable for Windows Mobile/CE using ActiveSync" test flow was specifically designed to facilitate setting up unit tests with ActiveSync as a communication channel. ASconnector is invoked in the CustomStep in this flow. The CustomStep can be further customized to better suit your testing environment.

This flow supports unit testing with the actual target device, as well as with the emulator.

In this case, we are assuming that the target device (or emulator) is properly connected with the host, and the ActiveSync is up before running unit testing. This connection will be used by ASconnector.

This is an example of a CustomStep, which can be used in this scenario:

        label="Running test executable..." 

Unit Testing with ASconnector

ASconnector is a tool that allows you to automate unit testing on a target device or emulator using Microsoft ActiveSync as a communication channel.

ASconnector can be customized by the following options:

ASconnector  [options]... [--ExecutableCmd ...]


Option/FormatShort EquivalentDescription
--testExecutable=<path>--teSpecifies the path to the target-executable on the host machine.
Mandatory option.
--logFile=<target_path>--lfSpecifies a path to the log file on the target device. The log file is downloaded to the host after the test executable execution finishes. The default host location for downloaded log files is the working directory. The host location can be changed with the --logDir option. A comma-separated list of files can be issued. If this option is not present, standard log files are processed (cpptest_results.tlog and cpptest_results.clog).
--logDir=<path>--ldSpecifies how long (in milliseconds) ASconnector will wait for the ActiveSync connection.
If set to 0, there will be no timeout.
Default value: 8000 milliseconds
--targetArch=<arch>--taTarget platform architecture. May be one of the following: arm, mips, sh, x86 or emu for emulator.
--printHelp--helpDisplays options summary.
--testExecutableCmd <...>N/AAfter this option, the rest of the command line is directly passed to the target executable.


The program flow consists of the following steps:

  1. The target executable is copied from the host to the target executable.
  2. If the program detects that the same version of the target executable is already copied (in the previous run of the test flow, for example) the executable is not copied. Timestamps are checked in order to determine this.
  3. The target executable is started and testing begins.
  4. When the testing finishes, the log files are copied back from the target system to the host.
  5. Temporary log files are deleted.

Unit Testing

The following Test Configurations were designed specifically for using with Windows Mobile/Windows CE applications:

The last three flows are intended for use with Microsoft Device Emulator. The following properties used in the Windows Mobile/Windows CE test flow definitions can be customized to adjust your flow definition to a particular environment:

For general information on generating and executing unit test cases with C++test, Test Creation and Execution.

Application Monitoring

The following Test Configurations were designed specifically for use with Windows Mobile/Windows CE in Application Monitoring Mode:

The last two flows are intended for use with Microsoft Device Emulator. You can customize them like you can customize other unit testing flows.


For general information on performing application monitoring and runtime error detection with C++test, see Runtime Error Detection