Tradefed configuration Oobject

Tradefed XML configuration is parsed, and a Configuration object is created from it that describes the complete configuration.

The object is described by the IConfiguration interface. it will contain an instance of all the objects defined in the XML.

This example:

<configuration description="<description of the configuration>">
    <!-- A build provider that takes local device information -->
    <build_provider class="" />

    <!-- Some target preparation, disabled by default -->
    <target_preparer class="">
        <option name="disable" value="true" />

    <!-- One test running some unit tests -->
    <test class="">
        <option name="class" value="" />

Will result in:

  • IConfiguration#getBuildProvider() to return a BootstrapBuildProvider instance.
  • IConfiguration#getTargetPreparers() to return a list of ITargetPreparer containing an instance of PreloadedClassesPreparer.
  • IConfiguration#getTests() to return a list of IRemoteTest containing an instance of HostTest.

Every single object in the configuration object can be mapped to the XML definition, so understanding the XML definition usually helps to understand what to expect from the configuration object.