Home | History | Annotate | Download | only in tradefed
      1 <!--
      2    Copyright 2011 The Android Open Source Project
      3 
      4    Licensed under the Apache License, Version 2.0 (the "License");
      5    you may not use this file except in compliance with the License.
      6    You may obtain a copy of the License at
      7 
      8        http://www.apache.org/licenses/LICENSE-2.0
      9 
     10    Unless required by applicable law or agreed to in writing, software
     11    distributed under the License is distributed on an "AS IS" BASIS,
     12    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13    See the License for the specific language governing permissions and
     14    limitations under the License.
     15 -->
     16 
     17 # Trade Federation Overview #
     18 
     19 TradeFederation (tradefed or TF for short) is a continuous test framework designed for running tests
     20 on Android devices. Its a Java application which runs on a host computer, and communicates to one or
     21 more Android devices using ddmlib (the library behind DDMS) over adb.
     22 
     23 ## Features
     24 
     25 - modular, flexible design
     26 - has built in support for running many different types of Android tests: instrumentation, native/gtest, host-based JUnit, etc
     27 - provides reliability and recovery mechanism on top of adb
     28 - supports scheduling and running tests on multiple devices in parallel
     29 
     30 ## Fundamentals
     31 The lifecycle of a test executed using TradeFederation is composed of four separate stages, designed
     32 around formally defined interfaces.
     33 
     34 - [Build provider](bp.html): Provides a build to test, downloading appropriate files if necessary
     35 - [Target preparer](tp.html): Prepares the test environment, e.g. software installation and setup
     36 - [Test](test.html): Executes test(s) and gathers test results
     37 - [Result reporter](result.html): Listens for test results, usually for the purpose of forwarding
     38   test results to a repository
     39 
     40 The fundamental entity in TradeFederation is a Configuration. A Configuration is an XML file that
     41 declares the lifecycle components of a test.
     42 
     43 This separation of the test's lifecycle is intended to allow for reuse.  Using this design, you can
     44 create a Test, and then different Configurations to run it in different environments. For example,
     45 you could create a Configuration that will run a test on your local machine, and dump the result to
     46 stdout.  You could then create a second Configuration that would execute that same test, but use a
     47 different Result reporter to store the test results in a database.
     48 
     49 ### Additional components of a configuration
     50 
     51 - [Device recovery](recovery.html): mechanism to recover device communication if lost
     52 - [Logger](logger.html): collects tradefed logging data
     53 
     54 A complete TradeFederation test execution, across its entire lifecycle, is referred to as an
     55 Invocation.
     56