Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Write and run Tradefed tests
Stay organized with collections
Save and categorize content based on your preferences.
This section is aimed at developers, or test writers, providing guidance on test
execution, as well as writing tests. The instructions are split into two broad
categories of tests:
We detail some features that are applicable to both suite and non-suite tests,
for example:
We also provide some generic end-to-end examples about how to run some of the
more common test types, such as:
The end-to-end examples above do not require a local checkout of Android. You
can simply
download Tradefed
and use them directly.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-12 UTC."],[],[],null,["# Write and run Tradefed tests\n\nThis section is aimed at developers, or test writers, providing guidance on test\nexecution, as well as writing tests. The instructions are split into two broad\ncategories of tests:\n\n- Tests executing [directly through Tradefed](/docs/core/tests/tradefed/testing/through-tf).\n- Tests executing in the [context of a suite](/docs/core/tests/tradefed/testing/through-suite), for example the [Android Compatibility Test Suite (CTS)](/docs/compatibility/cts).\n\nWe detail some features that are applicable to both suite and non-suite tests,\nfor example:\n\n- [Automatic Retries](/docs/core/tests/tradefed/testing/through-tf/auto-retry) for tests.\n- [Retry Isolation](/docs/core/tests/tradefed/testing/through-tf/retry-isolation) for tests.\n\nWe also provide some generic end-to-end examples about how to run some of the\nmore common test types, such as:\n\n- Execute the [instrumentation tests from an existing APK](/docs/core/tests/tradefed/testing/through-tf/instrumentation).\n\nThe end-to-end examples above do not require a local checkout of Android. You\ncan simply\n[download Tradefed](/docs/core/tests/tradefed/fundamentals/machine_setup#download-tradefed)\nand use them directly."]]