عنصر إعدادات Tradefed

يتم تحليل إعداد XML في Tradefed ، ويتم إنشاء عنصر Configuration منه يصف الإعداد الكامل.

يتم وصف العنصر من خلال الواجهة IConfiguration. وسيحتوي على مثال لجميع العناصر المحدّدة في XML.

في هذا المثال:

<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>

سيؤدي ذلك إلى:

  • IConfiguration#getBuildProvider() لعرض مثال BootstrapBuildProvider
  • IConfiguration#getTargetPreparers() لعرض قائمة ITargetPreparer تحتوي على مثال PreloadedClassesPreparer
  • IConfiguration#getTests() لعرض قائمة IRemoteTest تحتوي على مثال HostTest

يمكن ربط كل عنصر في عنصر الإعداد بتعريف XML، لذا يساعد فهم تعريف XML عادةً في فهم ما يمكن توقّعه من عنصر الإعداد.