1CTS Trade Federation 2--------------------- 3 4CTS Trade Federation, cts-tradefed for short, is an early look of the next 5generation test harness for CTS. 6 7cts-tradefed is built on top of the Android Trade Federation test harness. 8 9It works in a similar manner to the existing CTS harness, but supports some 10advanced features such as: 11 12 - modular, flexible extensible design. cts-tradefed can be extended to 13support running CTS in a continuous test environment. 14 - supports sharding a CTS test run across multiple devices in parallel 15 - automatically continue a CTS test run on another device if connection 16is lost 17 18However, note the cts-tradefed is currently experimental, and should not 19be used to generate official CTS compatibility reports. Please see 20'Known issues' section for more details. 21 22Configuring cts-tradefed 23------------------------ 24 251. Ensure 'adb' is in your current PATH. adb can be found in the 26Android SDK available from http://developer.android.com 27 28Example: 29 PATH=$PATH:/home/myuser/android-sdk-linux_x86/platform-tools 30 312. Follow the 'Setting up your device' steps documented in the 32CTS User Manual. The CTS User Manual can be downloaded at 33http://source.android.com/compatibility/downloads.html 34 353. Connect the device to the host machine. 36 374. Ensure device is visible via 'adb devices' 38 39Using cts-tradefed 40------------------- 41 42To run a test plan on a single device: 43 441. Make sure you have at least one device connected 452. Launch the cts-tradefed console by running the 'cts-tradefed' script at 46android-cts/tools/cts-tradefed 473. Type: 48'run command --plan CTS cts' to run the default CTS plan 49 50Some other useful commands are 51 52To run a test package: 53'run command --package <packagename> cts' 54 55To run a test class: 56'run command --class <full test class name> cts' 57 58To shard a plan test run on multiple devices 59'run command --plan CTS --shards <number of shards> cts 60note: all connected devices must be running the same build 61 62For more options: 63'run command --help cts' 64 65Known issues and missing features 66---------------------------------- 67- missing support for listing packages and plans (coming soon) 68- missing support for reporting incomplete tests 69- missing support for resuming previous test runs 70- logging to be improved 71 72CTS Tradefed Development 73------------------------ 74See http://source.android.com for instructions on obtaining the Android 75platform source code and setting up a build environment. 76 77The source for the CTS extensions for tradefed can be found at 78<android source root>/cts/tools/tradefed-host 79 80The source for the tradefed framework itself can be found at 81<android source root>/tools/tradefederation 82 83Perform these steps to build and run cts-tradefed from the development 84environment: 85cd <path to android source root> 86make cts 87cts-tradefed 88 89More documentation and details on using and extending trade federation will 90be forthcoming in the near future. 91 92