2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
테스트 개발 워크플로
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
테스트를 플랫폼 연속 테스트 서비스에 통합하려면 이 페이지의 가이드라인을 준수하고 추천하는 흐름을 따라야 합니다.
- 간단한 테스트 구성에는 Soong 빌드 시스템을 사용합니다.
- 테스트 매핑을 사용하여 Android 소스 트리에서 바로 사전 및 사후 제출 테스트 규칙을 만들 수 있습니다.
- Atest를 사용하여 로컬에서 테스트를 실행합니다.
테스트 유형
지원되는 테스트 유형은 다음과 같습니다.
기능 테스트는 테스트 사례의 통과 또는 실패 어설션을 만드는 반면, 측정항목 테스트는 일반적으로 타이밍 측정항목을 수집하기 위해 반복하여 작업을 실행합니다.
표준화된 입출력 형식을 사용하면 테스트마다 맞춤 결과 파싱 및 사후 처리가 필요하지 않으며 규칙에 맞는 모든 테스트에 일반 테스트 하네스를 사용할 수 있습니다. Android에 포함된 지속적인 테스트 프레임워크는 Trade Federation 개요를 참고하세요.
테스트 사례 가이드라인
연속 테스트 서비스를 통해 실행된 테스트 사례는 밀폐될 것으로 예상되며, 이는 모든 종속 항목이 선언되고 테스트를 통해 제공되었음을 의미합니다. 이 원칙을 이해하려면 Google 테스팅 블로그의 밀폐 서버를 참고하세요. 즉, 밀폐 테스트에는 다음 작업이 필요하지 않습니다.
- Google 계정 로그인
- 연결성(전화 통신/Wi-Fi/블루투스/NFC) 설정
- 테스트 매개변수 전달
- 특정 테스트 사례에 대해 테스트 하네스에서 수행한 설정 또는 해체
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[null,null,["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Test development workflow\n\nTo integrate tests into a platform continuous testing service, they should meet\nthe guidelines on this page and follow this recommended flow.\n\n1. Use the [Soong build system](https://android.googlesource.com/platform/build/soong/) for [Simple Test Configuration](/docs/core/tests/development/blueprints).\n2. Employ [Test Mapping](/docs/core/tests/development/test-mapping) to create pre- and post-submit test rules directly in the Android source tree.\n3. Run tests locally using [Atest](/docs/core/tests/development/atest).\n\nTest types\n----------\n\nSupported test types are:\n\n- [Instrumentation tests](/docs/core/tests/development/instrumentation) support both functional and metrics tests. See [Test your app](https://developer.android.com/studio/test/) for general app testing guidance.\n- [GoogleTest](/docs/core/tests/development/gtest) (GTest) supports the following test types:\n - [Functional GTests](/docs/core/tests/development/gtest-func-e2e) using the [GTest](https://github.com/google/googletest) framework\n - [Metric tests](/docs/core/tests/development/metrics) using [`google-benchmark`](https://github.com/google/benchmark)\n- [JAR host tests](/docs/core/tests/development/jar) using JUnit\n\nFunctional tests make assertions of pass or fail on test cases, while metrics\ntests generally perform an action repeatedly to collect timing metrics.\n\nWith standardized input/output format, the need for customized result parsing\nand post-processing per test is eliminated, and generic test harnesses can be\nused for all tests that fit into the convention. See the [Trade Federation\nOverview](/docs/core/tests/tradefed) for the continuous test framework\nincluded with Android.\n\nTest case guidelines\n--------------------\n\nTest cases executed through the continuous testing service are expected to be\n**hermetic** , meaning that all dependencies are declared and provided with the\ntests. See [Hermetic Servers on the Google Testing\nBlog](https://testing.googleblog.com/2012/10/hermetic-servers.html)\nfor an understanding of this principle. In short, hermetic tests require **no**:\n\n- Google Account sign-in\n- Connectivity configured (telephony/Wi-Fi/Bluetooth/NFC)\n- Test parameters passed in\n- Setup or tear down performed by test harness for a specific test case"]]