blob: 99d155a2a77437da013c155a311bd1a3a9f9aa5c [file] [log] [blame]
CTS Trade Federation
CTS Trade Federation, cts-tradefed for short, is the next
generation test harness for CTS.
cts-tradefed is built on top of the Android Trade Federation test harness.
It works in a similar manner to the prior CTS harness, but supports some
advanced features such as:
- modular, flexible extensible design. cts-tradefed can be extended to
support running CTS in a continuous test environment.
- supports sharding a CTS test run across multiple devices in parallel
- automatically continue a CTS test run on another device if connection
is lost
Configuring cts-tradefed
1. Ensure 'adb' is in your current PATH. adb can be found in the
Android SDK available from
2. Follow the 'Setting up your device' steps documented in the
CTS User Manual. The CTS User Manual can be downloaded at
3. Connect the device to the host machine.
4. Ensure device is visible via 'adb devices'
Using cts-tradefed
To run a test plan on a single device:
1. Make sure you have at least one device connected
2. Launch the cts-tradefed console by running the 'cts-tradefed'. If you've
downloaded and extracted the CTS zip, the script can be found at
Or else if you are working from the Android source tree and have run make cts,
the script can be found at
3. Type:
'run cts' to run the default CTS plan
Some other useful commands are
To run a test module:
'run cts --module <module_name>'
To run a specific test:
'run cts --module <module_name> --test <test_name>'
To shard a plan test run on multiple devices
'run cts --shard-count <number of shards>
note: all connected devices must be running the same build
For more options:
'run cts --help'
CTS Tradefed Development
See for instructions on obtaining the Android
platform source code and setting up a build environment.
The source for the CTS extensions for tradefed can be found at
<android source root>/cts/tools/tradefed-host
The source for the tradefed framework can be found on the 'tradefed' branch.
Perform these steps to build and run cts-tradefed from the development
cd <path to android source root>
make cts
More documentation and details on using and extending trade federation will
be forthcoming in the near future.