blob: 3e73d47a45a565a3187fc47eca5d7e2b37245608 [file] [log] [blame]
<html devsite><head>
<meta name="book_path" value="/_book.yaml"/>
<meta name="project_path" value="/_project.yaml"/>
</head>
<body>
<!--
Copyright 2018 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<h1 id="tests" class="page-title">测试</h1>
<p>作为一个开放源代码操作系统,Android 提供了许多测试和调试工具。请先花点时间了解一下<a href="https://android.googlesource.com/platform/platform_testing/+/master/docs/basics/index.md" class="external">测试的基础知识</a>,然后再了解以下选项。</p>
<h2 id="atest">Atest</h2>
<p><a href="https://android.googlesource.com/platform/tools/tradefederation/+/master/atest/README.md" class="external">Atest</a> 是一个命令行工具,可让用户在本地构建、安装并运行 Android 测试。</p>
<h2 id="compatibility_test_suite_cts">兼容性测试套件 (CTS)</h2>
<p><a href="/compatibility/cts/">兼容性测试套件</a> (CTS) 是一个免费的商业级测试套件,可在桌面设备上运行,并直接在连接的设备或模拟器上执行测试用例。</p>
<h2 id="vendor_test_suite_vts">供应商测试套件 (VTS)</h2>
<p><a href="/compatibility/vts/">供应商测试套件</a> (VTS) 会自动执行 HAL 和操作系统内核测试。要使用 VTS 测试 Android 原生系统实现,请设置一个测试环境,然后使用 VTS 方案来测试相应补丁程序。</p>
<h2 id="trade_federation_testing_infrastructure">Trade Federation 测试基础架构</h2>
<p><a href="/devices/tech/test_infra/tradefed/">Trade Federation</a>(简称 tradefed 或 TF)是一种连续的测试框架,专门用于在 Android 设备上运行测试。TF 可以在本地、在桌面设备上以及在平台检验处运行功能测试。要在 TF 中运行测试,您必须具备两个文件,一个是 Java 测试源文件,另一个是 XML 配置文件。有关示例,请参阅 <a href="https://android.googlesource.com/platform/tools/tradefederation/contrib/+/master/src/com/android/example/RebootTest.java" class="external">RebootTest.java</a><a href="https://android.googlesource.com/platform/tools/tradefederation/contrib/+/master/res/config/example/reboot.xml" class="external">reboot.xml</a></p>
<h2 id="debugging">调试</h2>
<p><a href="/devices/tech/debug/">调试</a>部分总结了开发平台级功能时,可用于调试、跟踪和剖析原生 Android 平台代码的实用工具和相关命令。</p>
</body></html>