Tradefed एक्सएमएल कॉन्फ़िगरेशन को पार्स किया जाता है और इससे एक Configuration
ऑब्जेक्ट बनाया जाता है, जिसमें पूरे कॉन्फ़िगरेशन के बारे में जानकारी होती है.
ऑब्जेक्ट को इसके ज़रिए बताया गया है: Iकॉन्फ़िगरेशन इंटरफ़ेस. इसमें एक्सएमएल में तय किए गए सभी ऑब्जेक्ट का एक इंस्टेंस शामिल होगा.
इस उदाहरण में:
<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>
इससे ये चीज़ें होंगी:
BootstrapBuildProvider
लौटाने के लिएIConfiguration#getBuildProvider()
इंस्टेंस.IConfiguration#getTargetPreparers()
का इस्तेमाल करके,ITargetPreparer
की सूची पाएं. इसमेंPreloadedClassesPreparer
का एक इंस्टेंस शामिल होगा.IConfiguration#getTests()
,IRemoteTest
की सूची दिखाता है, जिसमेंHostTest
का एक उदाहरण शामिल है.
कॉन्फ़िगरेशन ऑब्जेक्ट में मौजूद हर ऑब्जेक्ट को एक्सएमएल परिभाषा के साथ मैप किया जा सकता है. इसलिए, एक्सएमएल परिभाषा को समझने से, आम तौर पर यह समझने में मदद मिलती है कि कॉन्फ़िगरेशन ऑब्जेक्ट से क्या उम्मीद की जा सकती है.