Tradefed XML yapılandırması
ayrıştırılır ve yapılandırmanın tamamını açıklayan bir Configuration nesnesi oluşturulur.
Nesne, IConfiguration arayüzü ile tanımlanır.XML'de tanımlanan tüm nesnelerin bir örneğini içerir.
Bu örnek:
<configuration description="<description of the configuration>">
<!-- A build provider that takes local device information -->
<build_provider class="com.android.tradefed.build.BootstrapBuildProvider" />
<!-- Some target preparation, disabled by default -->
<target_preparer class="com.android.tradefed.targetprep.PreloadedClassesPreparer">
<option name="disable" value="true" />
</target_preparer>
<!-- One test running some unit tests -->
<test class="com.android.tradefed.testtype.HostTest">
<option name="class" value="com.android.tradefed.build.BuildInfoTest" />
</test>
</configuration>
Sonuç:
IConfiguration#getBuildProvider(),BootstrapBuildProviderörneğini döndürmek için kullanılır.IConfiguration#getTargetPreparers(),PreloadedClassesPreparerörneğini içerenITargetPreparerlistesini döndürür.IConfiguration#getTests(),HostTestörneğini içerenIRemoteTestlistesini döndürür.
Yapılandırma nesnesindeki her bir nesne XML tanımına eşlenebilir. Bu nedenle, XML tanımını anlamak genellikle yapılandırma nesnesinden ne bekleneceğini anlamaya yardımcı olur.