ParentSandboxInvocationExecution
public class ParentSandboxInvocationExecution
extends InvocationExecution
java.lang.Object | ||
↳ | com.android.tradefed.invoker.InvocationExecution | |
↳ | com.android.tradefed.invoker.sandbox.ParentSandboxInvocationExecution |
เวอร์ชันของ InvocationExecution
สำหรับแอ็คชันพิเศษในการเรียกใช้พาเรนต์เมื่อรันแซนด์บ็อกซ์
สรุป
ผู้สร้างสาธารณะ | |
---|---|
ParentSandboxInvocationExecution () |
วิธีการสาธารณะ | |
---|---|
void | doCleanUp ( IInvocationContext context, IConfiguration config, Throwable exception) ดำเนินการขั้นตอนการล้างข้อมูล target_preparer และ multi_target_preparer |
void | doSetup ( TestInformation testInfo, IConfiguration config, ITestLogger listener) ดำเนินการตามขั้นตอนการตั้งค่า target_preparer และ multi_target_preparer |
void | doTeardown ( TestInformation testInfo, IConfiguration config, ITestLogger logger, Throwable exception) ดำเนินการขั้นตอนการแยกส่วน target_preparer และ multi_target_preparer |
boolean | fetchBuild ( TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener) ดำเนินการตามขั้นตอน build_provider ของการร้องขอ |
void | reportLogs ( ITestDevice device, ITestLogger logger, TestInvocation.Stage stage) รายงานบันทึกอุปกรณ์บางอย่างในขั้นตอนต่างๆ ของการเรียกใช้ |
void | runDevicePostInvocationTearDown ( IInvocationContext context, IConfiguration config, Throwable exception) เรียกใช้ |
void | runDevicePreInvocationSetup ( IInvocationContext context, IConfiguration config, ITestLogger logger) เรียกใช้ |
void | runTests ( TestInformation info, IConfiguration config, ITestInvocationListener listener) เรียกใช้การทดสอบ |
วิธีการป้องกัน | |
---|---|
IConfigurationFactory | getFactory () ส่งคืน |
getLabPreparersToRun ( IConfiguration config, String deviceName) เรียกดูรายชื่อผู้เตรียมห้องปฏิบัติการเพื่อเรียกใช้บนอุปกรณ์นี้ | |
IRunUtil | getRunUtil () |
getTargetPreparersToRun ( IConfiguration config, String deviceName) เรียกรายชื่อผู้จัดเตรียมเป้าหมายเพื่อเรียกใช้บนอุปกรณ์นี้ | |
boolean | prepareAndRunSandbox ( TestInformation info, IConfiguration config, ITestInvocationListener listener) ส่งกลับสถานะผลลัพธ์ของการเรียกใช้แซนด์บ็อกซ์ |
ผู้สร้างสาธารณะ
ParentSandboxInvocationExecution
public ParentSandboxInvocationExecution ()
วิธีการสาธารณะ
โดคลีนอัพ
public void doCleanUp (IInvocationContext context, IConfiguration config, Throwable exception)
ดำเนินการขั้นตอนการล้างข้อมูล target_preparer และ multi_target_preparer ทำความสะอาดอุปกรณ์หรือไม่
พารามิเตอร์ | |
---|---|
context | IInvocationContext : IInvocationContext ของการเรียกใช้ |
config | IConfiguration : IConfiguration ของการเรียกใช้การทดสอบนี้ |
exception | Throwable : ข้อยกเว้นเดิมที่เกิดขึ้นจากการทดสอบที่กำลังทำงานอยู่ |
ทำการตั้งค่า
public void doSetup (TestInformation testInfo, IConfiguration config, ITestLogger listener)
ดำเนินการตามขั้นตอนการตั้งค่า target_preparer และ multi_target_preparer จำเป็นต้องตั้งค่าอุปกรณ์ทั้งหมดเพื่อให้การทดสอบทำงานหรือไม่
พารามิเตอร์ | |
---|---|
testInfo | TestInformation : TestInformation ของการร้องขอ |
config | IConfiguration : IConfiguration ของการเรียกใช้การทดสอบนี้ |
listener | ITestLogger : ITestLogger เพื่อรายงานบันทึกความล้มเหลวในการตั้งค่า |
พ่น | |
---|---|
BuildError | |
DeviceNotAvailableException | |
TargetSetupError |
ทำTeardown
public void doTeardown (TestInformation testInfo, IConfiguration config, ITestLogger logger, Throwable exception)
ดำเนินการขั้นตอนการแยกส่วน target_preparer และ multi_target_preparer อุปกรณ์ฉีกขาดที่เกี่ยวข้องกับการตั้งค่าหรือไม่
พารามิเตอร์ | |
---|---|
testInfo | TestInformation : TestInformation ของการร้องขอ |
config | IConfiguration : IConfiguration ของการเรียกใช้การทดสอบนี้ |
logger | ITestLogger : ITestLogger เพื่อรายงานบันทึก |
exception | Throwable : ข้อยกเว้นเดิมที่เกิดขึ้นจากการทดสอบที่กำลังทำงานอยู่ |
ดึงข้อมูลสร้าง
public boolean fetchBuild (TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener)
ดำเนินการตามขั้นตอน build_provider ของการร้องขอ
พารามิเตอร์ | |
---|---|
testInfo | TestInformation : TestInformation ของการร้องขอ |
config | IConfiguration : IConfiguration ของการเรียกใช้การทดสอบนี้ |
rescheduler | IRescheduler : IRescheduler สำหรับการกำหนดเวลาใหม่ในส่วนของการร้องขอสำหรับการดำเนินการกับทรัพยากรอื่น |
listener | ITestInvocationListener : ITestInvocation เพื่อรายงานความล้มเหลวในการดาวน์โหลดบิลด์ |
ส่งคืน | |
---|---|
boolean | เป็นจริงหากเราดาวน์โหลดบิลด์สำเร็จ มิฉะนั้นจะเป็นเท็จ |
พ่น | |
---|---|
BuildRetrievalError | |
DeviceNotAvailableException |
บันทึกรายงาน
public void reportLogs (ITestDevice device, ITestLogger logger, TestInvocation.Stage stage)
รายงานบันทึกอุปกรณ์บางอย่างในขั้นตอนต่างๆ ของการเรียกใช้ ตัวอย่างเช่น: logcat
พารามิเตอร์ | |
---|---|
device | ITestDevice : อุปกรณ์ที่จะรายงานบันทึกจาก |
logger | ITestLogger : ตัวบันทึกสำหรับบันทึก |
stage | TestInvocation.Stage : ขั้นตอนของการร้องขอที่เราอยู่ |
runDevicePostInvocationTearDown
public void runDevicePostInvocationTearDown (IInvocationContext context, IConfiguration config, Throwable exception)
เรียกใช้ ITestDevice#postInvocationTearDown(Throwable)
สำหรับแต่ละส่วนอุปกรณ์ของการเรียกใช้
พารามิเตอร์ | |
---|---|
context | IInvocationContext : IInvocationContext ของการเรียกใช้ |
config | IConfiguration : IConfiguration ของการเรียกใช้การทดสอบนี้ |
exception | Throwable : ข้อยกเว้นดั้งเดิมที่เกิดจากการทดสอบที่รันอยู่ ถ้ามี |
runDevicePreInvocationSetup
public void runDevicePreInvocationSetup (IInvocationContext context, IConfiguration config, ITestLogger logger)
เรียกใช้ ERROR(ITestDevice#preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice#preInvocationSetup(IBuildInfo))
สำหรับอุปกรณ์แต่ละส่วนของการเรียกใช้
พารามิเตอร์ | |
---|---|
context | IInvocationContext : IInvocationContext ของการเรียกใช้ |
config | IConfiguration : IConfiguration ของการเรียกใช้การทดสอบนี้ |
logger | ITestLogger : ITestLogger เพื่อรายงานบันทึก |
พ่น | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |
เรียกใช้การทดสอบ
public void runTests (TestInformation info, IConfiguration config, ITestInvocationListener listener)
เรียกใช้การทดสอบ
พารามิเตอร์ | |
---|---|
info | TestInformation : TestInformation เพื่อเรียกใช้การทดสอบด้วย |
config | IConfiguration : IConfiguration ที่จะเรียกใช้ |
listener | ITestInvocationListener : ITestInvocationListener ของผลการทดสอบ |
วิธีการป้องกัน
รับโรงงาน
protected IConfigurationFactory getFactory ()
ส่งคืน IConfigurationFactory
ที่ใช้สร้างการกำหนดค่า
ส่งคืน | |
---|---|
IConfigurationFactory |
getLabPreparersToRun
protectedgetLabPreparersToRun (IConfiguration config, String deviceName)
เรียกดูรายชื่อผู้เตรียมห้องปฏิบัติการเพื่อเรียกใช้บนอุปกรณ์นี้
ถูกแทนที่ในคลาสแซนด์บ็อกซ์เพื่อจำกัดไม่ให้ผู้เตรียมห้องปฏิบัติการเรียกใช้ภายในแซนด์บ็อกซ์ชายน์
พารามิเตอร์ | |
---|---|
config | IConfiguration |
deviceName | String |
ส่งคืน | |
---|---|
getTargetPreparersToRun
protectedgetTargetPreparersToRun (IConfiguration config, String deviceName)
เรียกรายชื่อผู้จัดเตรียมเป้าหมายเพื่อเรียกใช้บนอุปกรณ์นี้
ถูกแทนที่ในคลาสแซนด์บ็อกซ์เพื่อจำกัดไม่ให้ผู้เตรียมห้องปฏิบัติการเรียกใช้ภายในแซนด์บ็อกซ์ชายน์
พารามิเตอร์ | |
---|---|
config | IConfiguration |
deviceName | String |
ส่งคืน | |
---|---|
เตรียม AndRunSandbox
protected boolean prepareAndRunSandbox (TestInformation info, IConfiguration config, ITestInvocationListener listener)
ส่งกลับสถานะผลลัพธ์ของการเรียกใช้แซนด์บ็อกซ์
พารามิเตอร์ | |
---|---|
info | TestInformation |
config | IConfiguration |
listener | ITestInvocationListener |
ส่งคืน | |
---|---|
boolean |