blob: 545d4b438502ed596303055411fb9caf92df4c29 [file] [log] [blame]
Brett Chabot1589b602011-02-17 17:32:25 -08001CTS Trade Federation
2---------------------
3
Brian Muramatsu63204402011-12-02 12:00:05 -08004CTS Trade Federation, cts-tradefed for short, is the next
Brett Chabot1589b602011-02-17 17:32:25 -08005generation test harness for CTS.
6
7cts-tradefed is built on top of the Android Trade Federation test harness.
8
Brian Muramatsu63204402011-12-02 12:00:05 -08009It works in a similar manner to the prior CTS harness, but supports some
Brett Chabot1589b602011-02-17 17:32:25 -080010advanced 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
Brett Chabot1589b602011-02-17 17:32:25 -080018Configuring cts-tradefed
19------------------------
20
211. Ensure 'adb' is in your current PATH. adb can be found in the
22Android SDK available from http://developer.android.com
23
24Example:
25 PATH=$PATH:/home/myuser/android-sdk-linux_x86/platform-tools
26
272. Follow the 'Setting up your device' steps documented in the
28CTS User Manual. The CTS User Manual can be downloaded at
29http://source.android.com/compatibility/downloads.html
30
313. Connect the device to the host machine.
32
334. Ensure device is visible via 'adb devices'
34
35Using cts-tradefed
36-------------------
37
38To run a test plan on a single device:
39
401. Make sure you have at least one device connected
Stuart Scottebf808b2013-10-24 10:34:57 -0700412. Launch the cts-tradefed console by running the 'cts-tradefed'. If you've
42downloaded and extracted the CTS zip, the script can be found at
43 android-cts/tools/cts-tradefed
44Or else if you are working from the Android source tree and have run make cts,
45the script can be found at
46 out/host/linux-x86/cts/android-cts/tools/cts-tradefed
Brett Chabot1589b602011-02-17 17:32:25 -0800473. Type:
Brian Muramatsu63204402011-12-02 12:00:05 -080048'run cts --plan CTS' to run the default CTS plan
Brett Chabot1589b602011-02-17 17:32:25 -080049
50Some other useful commands are
51
52To run a test package:
Brian Muramatsu63204402011-12-02 12:00:05 -080053'run cts --package <packagename>'
Brett Chabot1589b602011-02-17 17:32:25 -080054
55To run a test class:
Brian Muramatsu63204402011-12-02 12:00:05 -080056'run cts --class <full test class name>'
Brett Chabot1589b602011-02-17 17:32:25 -080057
58To shard a plan test run on multiple devices
Brian Muramatsu63204402011-12-02 12:00:05 -080059'run cts --plan CTS --shards <number of shards>
Brett Chabot1589b602011-02-17 17:32:25 -080060note: all connected devices must be running the same build
61
62For more options:
Brian Muramatsu63204402011-12-02 12:00:05 -080063'run cts --help'
Brett Chabot1589b602011-02-17 17:32:25 -080064
65CTS Tradefed Development
66------------------------
67See http://source.android.com for instructions on obtaining the Android
68platform source code and setting up a build environment.
69
70The source for the CTS extensions for tradefed can be found at
71<android source root>/cts/tools/tradefed-host
72
Brian Muramatsu63204402011-12-02 12:00:05 -080073The source for the tradefed framework can be found on the 'tradefed' branch.
Brett Chabot1589b602011-02-17 17:32:25 -080074
75Perform these steps to build and run cts-tradefed from the development
76environment:
77cd <path to android source root>
78make cts
79cts-tradefed
80
81More documentation and details on using and extending trade federation will
82be forthcoming in the near future.
83