호환성 테스트 모음(CTS)은 기기가 Android와 호환되는지 확인하는 데 사용되는 상용 등급의 무료 테스트 모음이자 도구입니다. CTS는 연속 빌드 시스템 등을 통해 개발자의 일상 워크플로에 통합되도록 설계되었습니다. CTS는 데스크톱 컴퓨터에서 실행되며 연결된 기기나 에뮬레이터에서 직접 테스트를 실행합니다. Android 호환성에 관한 개요는 Android 호환성 프로그램 개요를 참고하세요.
그림 1. 자동화된 CTS 테스트
그림 1은 자동화된 CTS 테스트를 실행하는 프로세스를 보여줍니다.
CTS를 다운로드하여 설치합니다. 이 단계에서 테스트 환경과 테스트 워크스테이션, 테스트할 기기 또는 테스트 대상 기기(DUT)도 설정합니다.
자동화된 CTS 테스트를 실행합니다.
결과를 저장하고 검토합니다.
문제를 해결하고 테스트를 다시 실행합니다.
CTS를 사용하여 비호환성을 조기에 식별함으로써 Android 구현이 개발 프로세스 전반에 걸쳐 호환성을 유지하도록 하세요.
CTS 구성요소
CTS에는 다음 주요 구성요소가 포함되어 있습니다.
Trade Federation
테스트 하네스와 프레임워크를 통해 테스트를 자동으로 실행할 수 있습니다.
자동화된 CTS 테스트
Trade Federation 프레임워크를 사용하고 Trade Federation 테스트 하네스를 사용하여 실행할 수 있는 테스트입니다.
CTS 인증 도구(CTS-V) 테스트
수동으로 실행해야 하는 테스트입니다.
CTS 인증 도구(CTS-V) 앱
CTS-V 테스트를 실행하고 CTS-V 테스트 결과를 수집하는 데 사용하는 앱입니다.
테스트 사례
DUT에서 실행되는 개별 테스트입니다. 자동화된 테스트 사례는 Java를 사용하여 JUnit 테스트로 작성되며 기기 타겟에서 실행하기 위해 Android APK 파일로 패키징됩니다.
테스트 사례는 단위 테스트 또는 기능 테스트일 수 있습니다. 단위 테스트는 Android 플랫폼 내 코드의 원자 단위를 테스트합니다. 예를 들어 단위 테스트는 단일 Android 클래스를 테스트할 수 있습니다.
기능 테스트는 특정 사용 사례에 사용되는 메서드와 클래스의 조합을 실행합니다.
테스트 구성
DUT에서 실행되는 자동화된 테스트의 특정 세트입니다. 테스트 구성은 WORKING_DIRECTORY/cts/tools/cts-tradefed/res/config에 있는 XML 파일입니다.
모든 자동화된 테스트 사례가 포함된 테스트 구성과 일부 테스트 사례가 포함된 테스트 구성이 있습니다.
테스트 모듈
동일한 기능 영역의 테스트 사례 모음으로 이루어진 테스트 구성입니다.
테스트 계획
테스트 모듈 모음으로 이루어진 테스트 구성입니다.
테스트 적용 범위
테스트 사례에는 호환성을 보장하기 위해 다음 영역이 포함됩니다.
지역
설명
서명 테스트
각 Android 버전에는 버전에 포함된 모든 공개 API의 서명을 설명하는 XML 파일이 있습니다. CTS에는 기기에서 사용할 수 있는 API를 기준으로 이러한 API 서명을 확인하는 유틸리티가 포함되어 있습니다. 서명 확인의 결과는 테스트 결과 XML 파일에 기록됩니다.
플랫폼 API 테스트
올바른 클래스, 속성 및 메서드 서명, 올바른 메서드 동작, 잘못된 매개변수 처리를 위해 예상되는 동작을 확인하기 위한 네거티브 테스트 등 API 정확성을 확인하기 위해 SDK 클래스 색인에 문서화된 대로 플랫폼(핵심 라이브러리 및 Android 애플리케이션 프레임워크)을 테스트합니다.
Dalvik 테스트
Dalvik 실행 파일 형식을 테스트하는 데 초점을 맞춥니다.
플랫폼 데이터 모델
CTS는 연락처, 브라우저, 설정 등 SDK android.provider 패키지에 문서화된 대로 콘텐츠 제공자를 통해 애플리케이션 개발자에게 노출되는 핵심 플랫폼 데이터 모델을 테스트합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 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,["# The Compatibility Test Suite (CTS) overview\n\n*Compatibility Test Suite (CTS)* is a free, commercial-grade test suite and\ntools used to help ensure that your devices are Android compatible. CTS is\nintended to be integrated into your daily workflow, such as through a\ncontinuous build system. CTS runs on a desktop machine and executes tests\ndirectly on attached devices or on an emulator. For an overview of Android compatibility, see [Android compatibility program overview](/docs/compatibility).\n\n**Figure 1.** CTS automated testing.\n\nFigure 1 shows the process of executing CTS automated tests:\n\n1. Download and install CTS. This step also involves setting up the test environment, the testing workstation, and the device you are testing or *device under test (DUT)*\n2. Run CTS automated tests.\n3. Store and review the results.\n4. Troubleshoot issues and rerun tests.\n\nUse CTS to reveal incompatibilities early, and to ensure that your Android\nimplementations remain compatible throughout the development process.\n\nCTS components\n--------------\n\nCTS contains the following major components:\n\n*Trade Federation*\n: A test harness and framework allow for the automated execution of tests.\n\n*CTS automated tests*\n: Tests that use the Trade Federation framework and can be run using the Trade\n Federation test harness.\n\n*CTS Verifier (CTS-V) tests*\n: Tests that must be run manually.\n\n*CTS Verifier (CTS-V) app*\n: An app used to conduct CTS-V tests and collect CTS-V test results.\n\n*Test case*\n\n: An individual test executed on the DUT. Automated test cases are\n written in Java as JUnit tests and packaged Android APK files to run on the\n device target.\n\n Test cases can be *unit tests* or *functional tests*. A unit test tests atomic\n units of code within the Android platform. For example, a unit test might test\n a single Android class.\n\n A functional test exercises a combination of methods and classes used for a\n specific use case.\n\n*Test configuration*\n\n: A specific set of automated tests that are run on the\n DUT. Test configurations are XML files located in\n \u003cvar translate=\"no\"\u003eWORKING_DIRECTORY\u003c/var\u003e`/cts/tools/cts-tradefed/res/config`.\n There are test configurations that contains all automated test cases and test\n configurations that contain a subset of test cases.\n\n*Test module*\n\n: A test configuration consisting of a collection of test cases for the same\n feature area.\n\n*Test plan*\n\n: A test configuration consisting of a collection of test modules.\n\n| **Note:** The Android Open Source Project accepts contributions to improve CTS just as for any other component. Improving the coverage and quality of CTS tests is one of the best ways to contribute to Android. To make contributions to CTS, follow the same process in [Submit code changes](/docs/setup/contribute/submit-patches).\n\nTest coverage\n-------------\n\nTest cases cover the following areas to ensure compatibility:\n\n| Area | Description |\n|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Signature tests | For each Android release, there are XML files describing the signatures of all public APIs contained in the release. The CTS contains a utility to check those API signatures against the APIs available on the device. The results from signature checking are recorded in the test result XML file. |\n| Platform API tests | Test the platform (core libraries and Android Application Framework) APIs as documented in the SDK [Class Index](https://developer.android.com/reference/classes) to ensure API correctness, including correct class, attribute and method signatures, correct method behavior, and negative tests to ensure expected behavior for incorrect parameter handling. |\n| Dalvik tests | The tests focus on testing the Dalvik executable format. |\n| Platform data model | The CTS tests the core platform data model as exposed to application developers through content providers, as documented in the SDK [`android.provider`](https://developer.android.com/reference/android/provider/package-summary) package (including contacts, browsers, and settings) |\n| Platform intents | The CTS tests the core platform intents, as documented in the SDK [Common intents](https://developer.android.com/guide/appendix/g-app-intents). |\n| Platform permissions | The CTS tests the core platform permissions, as documented in the SDK [`Manifest.permission`](https://developer.android.com/reference/android/Manifest.permission). |\n| Platform resources | The CTS tests for correct handling of the core platform resource types, as documented in the SDK [Resource types overview](https://developer.android.com/guide/topics/resources/available-resources). The CTS tests include tests for simple values, drawables, nine-patch, animations, layouts, styles and themes, and loading alternate resources. |\n\nWhat's next\n-----------\n\nAfter reading this document, continue to [Set up CTS](/docs/compatibility/cts/setup)."]]