ModuleSplitter

public class ModuleSplitter
extends Object

java.lang.Object
   ↳ com.android.tradefed.testtype.suite.ModuleSplitter


ตัวช่วยในการแยกรายการโมดูลที่แสดงโดย IConfiguration ออกเป็นรายการหน่วยการดําเนินการที่แสดงโดย ModuleDefinition

การกําหนดค่าแต่ละรายการอาจสร้าง ModuleDefinition อย่างน้อย 1 รายการ ทั้งนี้ขึ้นอยู่กับตัวเลือกและประเภทการทดสอบ

  • IConfiguration ที่ไม่แบ่งกลุ่มจะสร้าง ModuleDefinition รายการเดียว
  • IConfiguration ที่แบ่งกลุ่มได้จะสร้าง ModuleDefinition จํานวนหนึ่งซึ่งลิงก์กับพร็อพเพอร์ตี้ IRemoteTest ดังนี้
    • ส่วนรายการที่ไม่ใช่ IShardableTest จะสร้าง ModuleDefinition รายการเดียว
    • IShardableTest จะสร้าง ModuleDefinition 1 รายการต่อแต่ละการทดสอบที่ IShardableTest.split() แสดงผล

สรุป

ตัวสร้างแบบสาธารณะ

ModuleSplitter()

เมธอดสาธารณะ

static splitConfiguration(TestInformation testInfo, runConfig, suitePreparersPerDevice, int shardCount, boolean dynamicModule, boolean intraModuleSharding)

สร้างรายการModuleDefinitionหน่วยที่เรียกใช้ได้ตามแผนที่การกําหนดค่าที่โหลด

ตัวสร้างแบบสาธารณะ

ModuleSplitter

public ModuleSplitter ()

เมธอดสาธารณะ

splitConfiguration

public static  splitConfiguration (TestInformation testInfo, 
                 runConfig, 
                 suitePreparersPerDevice, 
                int shardCount, 
                boolean dynamicModule, 
                boolean intraModuleSharding)

สร้างรายการModuleDefinitionหน่วยที่เรียกใช้ได้ตามแผนที่การกําหนดค่าที่โหลด

พารามิเตอร์
testInfo TestInformation: TestInformation ปัจจุบันเพื่อดำเนินการแยกข้อมูล

runConfig : ERROR(/LinkedHashMap) โหลดจาก ITestSuite.loadTests()

suitePreparersPerDevice : แมปของเครื่องมือเตรียมระดับชุดทดสอบต่ออุปกรณ์ทดสอบ

shardCount int: คำแนะนำจำนวนกลุ่มที่จะแบ่งเพื่อช่วยในการแยกกลุ่ม

dynamicModule boolean: โมดูลสามารถแชร์ในพูลได้หรือไม่ หรือต้องแยกต่างหาก (การแยกส่วนแบบเข้มงวด)

intraModuleSharding boolean: กำหนดว่าจะแบ่งกลุ่มภายในโมดูลหรือไม่

คิกรีเทิร์น
รายการ ModuleDefinition