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.
Develop Tradefed
Stay organized with collections
Save and categorize content based on your preferences.
This section is aimed at Tradefed developers. If you are interested in extending
TF or adding new test support, this is the section for you.
Open source
If you plan to use the open source variant of Trade Federation, use these
commands to check out and build the AOSP android-latest-release
branch of
Trade Federation:
cd <sourceroot>
mkdir android-latest-release
cd android-latest-release
repo init -u https://android.googlesource.com/platform/manifest -b android-latest-release
repo sync -c -j8
source build/envsetup.sh
lunch aosp_cf_arm64_only_phone-userdebug # or any other device target
m -j tradefed-all
See Development Environment
for more details.
All open-sourceable Trade Federation code is stored in the
tools/tradefederation/
git project of AOSP. Please keep the
open source guidelines
in mind when writing code and submitting changes.
Alternatively, if you are creating tests/utilities that use Trade Federation but
aren't working on the framework itself, consider placing your work inside one of
the Trade Federation contrib projects to speed approvals.
Coding style
Trade Federation follows the
Android coding style guidelines,
with the following clarifications: interface names are prefixed with 'I' e.g.
ITestDevice.
Develop using Eclipse
If you are interested in using Eclipse in developing Tradefed, refer to
Set up Eclipse IDE for tips on
setting up your environment.
Run Tradefed's tests
You made a change to Trade Federation and you are searching how to test it? see
Running Trade Federation's tests.
Architecture
If you seek a deeper understanding of the innerworkings of Tradefed, see the
Architecture section.
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,["# Develop Tradefed\n\nThis section is aimed at Tradefed developers. If you are interested in extending\nTF or adding new test support, this is the section for you.\n\nOpen source\n-----------\n\nIf you plan to use the open source variant of Trade Federation, use these\ncommands to check out and build the AOSP `android-latest-release` branch of\nTrade Federation: \n\n cd \u003csourceroot\u003e\n mkdir android-latest-release\n cd android-latest-release\n repo init -u https://android.googlesource.com/platform/manifest -b android-latest-release\n repo sync -c -j8\n source build/envsetup.sh\n lunch aosp_cf_arm64_only_phone-userdebug # or any other device target\n m -j tradefed-all\n\nSee [Development Environment](/docs/core/tests/tradefed/fundamentals/machine_setup)\nfor more details.\n\nAll open-sourceable Trade Federation code is stored in the\n[tools/tradefederation/](https://android.googlesource.com/platform/tools/tradefederation/)\ngit project of AOSP. Please keep the\n[open source guidelines](/docs/setup/contribute/code-style)\nin mind when writing code and submitting changes.\n\nAlternatively, if you are creating tests/utilities that use Trade Federation but\naren't working on the framework itself, consider placing your work inside one of\nthe [Trade Federation contrib projects](/docs/core/tests/tradefed/development/contribute-noncore) to speed approvals.\n\nCoding style\n------------\n\nTrade Federation follows the\n[Android coding style guidelines](/source/code-style),\nwith the following clarifications: interface names are prefixed with 'I' e.g.\nITestDevice.\n\nDevelop using Eclipse\n---------------------\n\nIf you are interested in using Eclipse in developing Tradefed, refer to\n[Set up Eclipse IDE](/docs/core/tests/tradefed/development/eclipse) for tips on\nsetting up your environment.\n\nRun Tradefed's tests\n--------------------\n\nYou made a change to Trade Federation and you are searching how to test it? see\n[Running Trade Federation's tests](/docs/core/tests/tradefed/development/tf-tests).\n\nArchitecture\n------------\n\nIf you seek a deeper understanding of the innerworkings of Tradefed, see the\n[Architecture](/docs/core/tests/tradefed/architecture) section."]]