自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
Android 10 以下版本的供應商測試套件和基礎架構
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Android 供應商測試套件 (VTS) 為 Android 測試提供多項全新功能,並促進以測試為導向的開發程序。為協助 Android 開發社群與測試資料互動,Android 提供下列測試資源:
- 教學影片。說明在 Android 9 和 Android 8.1 上執行及開發 VTS 和 CTS-on-GSI 的影片。
- 使用 VTS 進行系統測試。
說明如何使用 VTS 測試 Android 原生系統實作方式、設定測試環境,然後使用 VTS 計畫測試修補程式。
- 測試架構。提供使用 VTS 測試架構的詳細資訊。包括:
- 裝置殼層指令。操作說明:如何使用裝置殼層指令執行目標端測試二進位檔、取得/設定屬性、環境變數和系統資訊,以及啟動/停止 Android 架構。
- 測試範本。
針對非 VTS 執行程式 BaseTest 的 host-side Python 子類別的測試模組,說明如何設定及使用測試範本。
- 服務名稱感知 HAL 測試。詳細說明 Android 9 如何支援根據執行 VTS 的裝置,取得特定 HAL 例項的服務名稱。
- HAL 可測試性檢查。
詳細說明 Android 9 支援的執行階段方法,該方法會使用裝置設定來判斷應略過哪些 VTS 測試,以便針對該裝置目標執行。
- 多裝置測試。說明如何設定需要在多部 Android 裝置之間進行互動的測試。
- 使用偵錯 RAM 磁碟進行 VTS 測試。說明如何使用偵錯 RAM 磁碟機,以便透過通用系統映像檔 (GSI) 執行 VTS。
- VTS 資訊主頁用於查看 VTS 結果的網頁式使用者介面。包括以下詳細資訊:
- 設定。操作說明:如何設定及設定 VTS 資訊主頁。
- 資料庫:可支援持續整合資訊主頁的彈性後端。
- 使用者介面。使用 Material Design 設計的完整使用者介面,可有效顯示測試結果、剖析和涵蓋率的相關資訊。
- 實驗室基礎架構。說明自動化測試基礎架構的架構,可在執行 AOSP 通用系統映像檔 (GSI) 的合作夥伴裝置上執行 VTS、CTS 或其他測試。需要主機控制器。
- Binder 和 hwbinder 效能測試。用於評估處理量和延遲時間的工具。
如需更多詳細資訊,請參閱 Google 開發人員製作的 Android VTS 產品影片,以及 Treble:透過在全球分散的利益相關者活躍軟體生態系統中建立平衡,實現快速軟體更新論文 (ACM 會員可免費取得,非會員則可購買或閱讀摘要)。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","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-07-27 (世界標準時間)。"],[],[],null,["# Vendor Test Suite and infrastructure for Android 10 and lower\n\nThe Android Vendor Test Suite (VTS) provides extensive new functionality for\nAndroid testing and promotes a test-driven development process. To help the\nAndroid development community interact with test data, Android includes the\nfollowing testing resources:\n\n- [Video Tutorials.](/docs/core/tests/vts/vts-video) Describes the videos on running and developing VTS and CTS-on-GSI on Android 9 and Android 8.1.\n- [Systems Testing with VTS.](/docs/core/tests/vts/systems) Describes how to use VTS to test an Android native system implementation, set up a testing environment, then test a patch using a VTS plan.\n- **Test Framework.** Provides details on using the VTS test framework. Includes:\n - [Device shell commands](/docs/core/tests/vts/shell-commands). Instructions on how to use device shell commands to execute target-side test binaries, to get/set properties, environment variables, and system information, and to start/stop the Android framework.\n - [Test templates](/docs/core/tests/vts/test-templates). Details on configuring and using test templates for test modules that are not host-side Python subclass of VTS runner's BaseTest.\n - [Service name aware HAL\n testing](/docs/core/tests/vts/sna-hal-testing). Details on Android 9 support for obtaining the service name of a given HAL instance based on the device on VTS is running.\n - [HAL testability check](/docs/core/tests/vts/hal-testability). Details on Android 9 support for a runtime method that uses the device configuration to identify which VTS tests should be skipped for that device target.\n - [Multi-device\n testing](/docs/core/tests/vts/multi-device-testing). Instructions for configuring tests that require interaction between multiple Android devices.\n - [VTS testing with debug ramdisk](/docs/core/tests/vts/vts-on-gsi). Instructions on how to use a debug ramdisk to enable running VTS with a generic system image (GSI).\n- **VTS Dashboard.** Web-based user interface for viewing VTS results. Includes details on:\n - [Setup](/docs/core/tests/vts/setup). Instructions for setting up and configuring the VTS Dashboard.\n - [Database](/docs/core/tests/vts/database). A scalable back-end to support the continuous integration dashboard.\n - [User Interface](/docs/core/tests/vts/ui). A cohesive user interface that uses material design to effectively display information about test results, profiling, and coverage.\n- **Lab infrastructure.** Describes the architecture of an [automated testing\n infrastructure](/docs/core/tests/vts/automated-test-infra) for running VTS, CTS, or other tests on partner devices running the AOSP [Generic System Image (GSI)](/docs/setup/create/gsi). Requires a [Host Controller](/docs/core/tests/vts/host-controller).\n- [binder and hwbinder\n performance tests](/docs/core/tests/vts/performance). Tools for measuring throughput and latency.\n\n\nFor additional details, refer to the\n[Android\nVTS Products video](https://www.youtube.com/watch?v=7BX7oSHc7nk&list=PLWz5rJ2EKKc9JOMtoWWMJHFHgvXDoThva) produced by Google Developers, and the\n[Treble:\nFast Software Updates by Creating an Equilibrium in an Active Software\nEcosystem of Globally Distributed Stakeholders](https://dl.acm.org/doi/10.1145/3358237) paper, which is free\nfor ACM members and non-members can purchase or read the abstract."]]