CTS v1 command console

For Android 6.0 or lower, use CTS v1.

The following test plans are available:

  • CTS—all tests required for compatibility.
  • Signature—the signature verification of all public APIs
  • Android—tests for the Android APIs
  • Java—tests for the Java core library
  • VM—tests for ART or Dalvik
  • Performance—performance tests for your implementation

These can be executed with the run cts command.

The table below summarizes the CTS v1 console commands for various uses.

Host Description
help Display a summary of the most commonly used commands
help all Display the complete list of available commands
exit Gracefully exit the CTS console. Console will close when all currently running tests are finished
Run Description
run cts Run the specified tests and displays progress information. One of --plan, --package, --class or --continue-session needs to be specified

The CTS console can accept other commands while tests are in progress

If no devices are connected, the CTS desktop machine (or host) will wait for a device to be connected before starting tests

If more than one device is connected, the CTS host will choose a device automatically

--plan <test_plan_name> Run the specified test plan
--package/-p <test_package_name>  [--package/-p <test_package2>...] Run the specified test packages
--class/-c <class_name> [--method/-m <test_method_name> Run the specified test class and/or method
--continue-session Run all not executed tests from previous CTS session; the sessions testResult.xml are updated with the new results
--shards <number_of_shards> Shard a CTS run into given number of independent chunks, to run on multiple devices in parallel
--serial/-s <deviceID> Run CTS on the specific device
-t <class_name>#<test_method_name> Run a specific test method
--force-abi 32|64 On 64-bit devices, run the test against only the 32-bit or 64-bit ABI
--skip-preconditions Skip preconditions to save run time for iterative development of a new test. This bypasses verification and setup of the device's configuration, such as pushing media files or checking for Wi-Fi connection.
List Description
list packages List all available test packages in the repository
list plans List all available test plans in the repository
list invocations List 'run' commands currently being executed on devices
list commands List all 'run' commands currently in the queue waiting to be assigned to devices
list results List CTS results currently stored in repository
list devices List currently connected devices and their state

'Available' devices are functioning, idle devices, available for running tests

'Unavailable' devices are devices visible via adb, but are not responding to adb commands and won't be allocated for tests

'Allocated' devices are devices currently running tests

Add Description
add derivedplan --plan <plan_name>
--result/-r
[pass | fail | timeout | notExecuted]
[--session/-s <session_id>]
Create a plan derived from given result session; use this option to rerun reports and validate test issues