[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-05-08。"],[],[],null,["# Run CTS automated tests (AOSP 10 or lower)\n\nThis page contains instructions for running CTS automated tests on Android 10\nor lower.\n\nRun a retry session\n-------------------\n\nIf this is your first test run, there might be tests that fail due to issues\nbeyond your control. For example, a network connection might be slow or a GPS\nsignal might be weak. So, rerun (retry) the tests until all test modules are\ncompleted and the test failure numbers are the same in the last two retry\nsessions. To run a retry session for Android 9 and 10: \n\n run retry --retry \u003cvar translate=\"no\"\u003esession_number\u003c/var\u003e`\n\nTo run a retry session for Android 8.1 or lower: \n\n run cts --retry \u003cvar translate=\"no\"\u003esession_number\u003c/var\u003e\n\n| **Note:** For implementation details for CTS retry, see [Use suite retry](/docs/core/tests/tradefed/testing/through-suite/suite-retry).\n\nRun a retry session on failed parameterized tests\n-------------------------------------------------\n\nPassed parameterized tests aren't retried. To run a retry session on failed\nparameterized tests only: \n\n run retry --retry \u003cvar translate=\"no\"\u003esession_number\u003c/var\u003e --new-parameterized-handling\n\nRun individual test plans\n-------------------------\n\nInstead of running all test plans at once, you can run individual test plans.\nTo run an individual test plan:\n\n1. Identify the name of the test plan you want to run.\n\n For Android 7 and higher: \n\n list modules\n\n For Android 6 or lower: \n\n list plans\n\n2. Run the test plan:\n\n run cts --plan \u003cvar translate=\"no\"\u003etest_module_or_plan_name\u003c/var\u003e\n\n| **Note:** For a list of all CTS console commands for Android 7 and higher, see [CTS v2 command console](/compatibility/cts/command-console-v2). For a list of all CTS console commands for Android 6 or lower, see [CTS v1 command console](/compatibility/cts/command_console).\n\nImprove test execution time\n---------------------------\n\nIf you want to improve test execution time, you can shard tests across multiple\ndevices. Sharding requires the host to connect at least two devices, but six or\nmore devices are recommended for efficiency.\n\nTo shard tests on Android 9 or 10, run: \n\n run cts --shard-count \u003cvar translate=\"no\"\u003enumber_of_shards\u003c/var\u003e\n\nTo shard tests on Android 8.1 or lower, run: \n\n run cts --shards \u003cvar translate=\"no\"\u003enumber_of_shards\u003c/var\u003e\n\nRun CTS for multiscreen devices\n-------------------------------\n\nIf your device is running Android 10, and your device has multiple\nscreens, you must run the `cts-foldable` test plan separately: \n\n run cts-foldable\n\nPassed or failed test cases for alternate screen mode are appended with the\nvalue from `display_mode`, for example, `testcase1[display_mode=0]`."]]