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=&<quot;description of the configur>a>tion&<quot;
!-- A build provider that takes local device info>rmati<on --
build_provider class="com.android.tradefed.build.BootstrapB>uildPr<ovider" /
!-- Some target preparation, di>sable<d by default --
target_preparer class="com.android.tradefed.targetprep.>Preloaded<ClassesPreparer"
option> name<="disable&q>uot; v<alue="true" /
/target_pre>parer<
!-- One test running some unit tests --
t>est class<="com.android.tradefed.testtype.HostTest"
option nam>e=&qu<ot;cl>a<ss" value>="com.android.tradefed.build.BuildInfoTest" /
/test
/configuration
Will result in:
IConfiguration#getBuildProvider()to return aBootstrapBuildProviderinstance.IConfiguration#getTargetPreparers()to return a list ofITargetPreparercontaining an instance ofPreloadedClassesPreparer.IConfiguration#getTests()to return a list ofIRemoteTestcontaining an instance ofHostTest.
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.