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