Get started with TF

Trade Federation is a large test infrastructure that can be adapted to a great variety of different usecases, and most people will probably only need some subset of its functionality. First off, we envision that TF users will fulfill any of three primary roles: Developer, Integrator, and Test Runner. A particular individual might wear any (or all) of those three hats, but we feel the distinction will help make it easier to navigate the documentation.


Developers spend the majority of their time creating TF modules that are written in Java. They may write configurations and execute tests, but will typically only do so to verify that their modules are being invoked properly and are functioning as expected.


Integrators spend the majority of their time creating XML test configurations, or command files (which are written in a simple shell-like language). They tie together TF modules written by the Developer with specific configurations that are required for particular test requirements and goals.

Test Runners

Test Runners spend the majority of their time executing tests and generally making sure that test results are being generated, and that the generated test results are relevant, reproducible, and accurate. They spend the majority of their time interacting with tradefed's command line interface, and will also verify that the results make sense.

In order to get the most out of Trade Federation, all three roles will need to be represented. It will take Developers and Integrators to make TF interoperate with other pieces of infrastructure, like build systems and test result repositories. It will take Integrators and Test Runners to get TF to actually run the desired tests and produce the desired test results. It will take Test Runners to identify results that don't make sense, and to work with the Developers and Integrators to figure out where the bugs may lie and get them fixed.

What's next

People in all three roles should at least glance through all the rest of the docs. Machine Setup will get you to the point where you can run TF (by building or downloading it). Working with Devices will explain how to run tests with a physical device, with an emulator, or with no device at all. The Test Lifecycle page will explain from a theoretical perspective how the roles of the Developer, Integrator, and Test Runner interact, and then Option Handling will demonstrate how to put that theory into practice.

Finally, the End-to-End Example takes you through the development, integration, and deployment of a sample test. It involves aspects of each role, and should offer hints at how to do more complicated things that aren't directly discussed in the documentation.

If you've gotten through everything here and still have unanswered questions, first try taking a look at the Trade Federation source code. Beyond that, feel free to try asking on the android-platform Google Group. For best results, make sure to mention "Trade Federation" (or "tradefed", or "TF") in the message subject.