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