2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
자동화된 CTS 테스트 실행(AOSP 10 이하)
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 페이지에는 Android 10 이하에서 자동화된 CTS 테스트를 실행하는 방법에 관한 안내가 포함되어 있습니다.
재시도 세션 실행
테스트 실행이 이번이 처음이라면 제어할 수 없는 문제로 인해 실패하는 테스트가 있을 수 있습니다. 예를 들어 네트워크 연결이 느리거나 GPS 신호가 약할 수 있습니다. 따라서 모든 테스트 모듈이 완료되고 테스트 실패 수가 마지막 두 번의 재시도 세션에서 동일할 때까지 테스트를 다시 실행(재시도)하세요. Android 9, 10에서 재시도 세션을 실행하려면 다음을 실행하세요.
run retry --retry session_number`
Android 8.1 이하에서 재시도 세션을 실행하려면 다음을 실행하세요.
run cts --retry session_number
매개변수화된 테스트가 실패한 경우 재시도 세션 실행
통과된 매개변수화된 테스트는 재시도되지 않습니다. 매개변수화된 테스트가 실패한 경우에만 재시도 세션을 실행하려면 다음을 실행하세요.
run retry --retry session_number --new-parameterized-handling
개별 테스트 계획 실행
한 번에 모든 테스트 계획을 실행하는 대신 개별 테스트 계획을 실행할 수 있습니다. 개별 테스트 계획을 실행하려면 다음 단계를 따르세요.
실행하려는 테스트 계획의 이름을 식별합니다.
Android 7 이상에서는 다음을 실행하세요.
list modules
Android 6 이하에서는 다음을 실행하세요.
list plans
다음과 같이 테스트 계획을 실행합니다.
run cts --plan test_module_or_plan_name
테스트 실행 시간 개선
테스트 실행 시간을 개선하기 위해 여러 기기에서 테스트를 샤딩할 수 있습니다. 샤딩하려면 호스트에 2개 이상의 기기를 연결해야 하지만, 효율성을 위해 6개 이상의 기기를 연결하는 것이 좋습니다.
Android 9 또는 10에서 테스트를 샤딩하려면 다음을 실행하세요.
run cts --shard-count number_of_shards
Android 8.1 이하에서 테스트를 샤딩하려면 다음을 실행하세요.
run cts --shards number_of_shards
멀티스크린 기기용 CTS 실행
기기에서 Android 10을 실행하고 기기의 화면이 여러 개라면 cts-foldable
테스트 계획을 별도로 실행해야 합니다.
run cts-foldable
대체 화면 모드의 통과하거나 실패한 테스트 사례는 display_mode
의 값과 함께 추가됩니다. 예를 들면 testcase1[display_mode=0]
과 같습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-05-09(UTC)
[[["이해하기 쉬움","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"]],["최종 업데이트: 2025-05-09(UTC)"],[],[],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]`."]]