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)
เรียกใช้ขั้นตอน cleanUp ของ target_preparer และ multi_target_preparer |
void
|
doSetup(TestInformation testInfo, IConfiguration config, ITestLogger listener)
เรียกใช้ขั้นตอน target_preparer และ multi_target_preparersetUp |
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()
แสดงผล |
|
getPreparersToRun(IConfiguration config, String deviceName)
เรียกข้อมูลรายการโปรแกรมเตรียมความพร้อมที่จะทำงานในอุปกรณ์นี้ |
IRunUtil
|
getRunUtil()
|
boolean
|
prepareAndRunSandbox(TestInformation info, IConfiguration config, ITestInvocationListener listener)
แสดงสถานะผลลัพธ์ของการเรียกใช้แซนด์บ็อกซ์ |
ตัวสร้างแบบสาธารณะ
ParentSandboxInvocationExecution
public ParentSandboxInvocationExecution ()
เมธอดสาธารณะ
doCleanUp
public void doCleanUp (IInvocationContext context,
IConfiguration config,
Throwable exception)เรียกใช้ขั้นตอน cleanUp ของ target_preparer และ multi_target_preparer อุปกรณ์ล้างข้อมูลแล้ว
| พารามิเตอร์ | |
|---|---|
context |
IInvocationContext: IInvocationContext ของการเรียกใช้ |
config |
IConfiguration: IConfiguration ของการทดสอบนี้ |
exception |
Throwable: ข้อยกเว้นเดิมที่การทดสอบแสดง
|
doSetup
public void doSetup (TestInformation testInfo,
IConfiguration config,
ITestLogger listener)เรียกใช้ขั้นตอน target_preparer และ multi_target_preparersetUp อุปกรณ์ทั้งหมดต้องได้รับการตั้งค่าหรือไม่เพื่อให้การทดสอบทำงานได้
| พารามิเตอร์ | |
|---|---|
testInfo |
TestInformation: TestInformation ของการเรียกใช้ |
config |
IConfiguration: IConfiguration ของการทดสอบนี้ |
listener |
ITestLogger: ITestLogger เพื่อรายงานบันทึกการตั้งค่าที่ไม่สำเร็จ |
| การโยน | |
|---|---|
BuildError |
|
DeviceNotAvailableException |
|
TargetSetupError |
|
doTeardown
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: ข้อยกเว้นเดิมที่การทดสอบแสดง |
fetchBuild
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 |
|
reportLogs
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 |
|
runTests
public void runTests (TestInformation info,
IConfiguration config,
ITestInvocationListener listener)ทำการทดสอบ
| พารามิเตอร์ | |
|---|---|
info |
TestInformation: TestInformation ที่จะใช้ในการทดสอบ |
config |
IConfiguration: IConfiguration ที่จะเรียกใช้ |
listener |
ITestInvocationListener: ITestInvocationListener ของผลการทดสอบ |
วิธีการที่มีการป้องกัน
getFactory
protected IConfigurationFactory getFactory ()
แสดงผล IConfigurationFactory ที่ใช้สร้างการกําหนดค่า
| คิกรีเทิร์น | |
|---|---|
IConfigurationFactory |
|
getPreparersToRun
protectedgetPreparersToRun (IConfiguration config, String deviceName)
เรียกข้อมูลรายการโปรแกรมเตรียมความพร้อมที่จะทำงานในอุปกรณ์นี้
ลบล้างในคลาสแซนด์บ็อกซ์เพื่อจำกัดไม่ให้ผู้เตรียมห้องทดลองทำงานภายในแซนด์บ็อกซ์ บุตร
| พารามิเตอร์ | |
|---|---|
config |
IConfiguration |
deviceName |
String |
| คิกรีเทิร์น | |
|---|---|
|
|
getRunUtil
protected IRunUtil getRunUtil ()
| คิกรีเทิร์น | |
|---|---|
IRunUtil |
|
prepareAndRunSandbox
protected boolean prepareAndRunSandbox (TestInformation info,
IConfiguration config,
ITestInvocationListener listener)แสดงสถานะผลลัพธ์ของการเรียกใช้แซนด์บ็อกซ์
| พารามิเตอร์ | |
|---|---|
info |
TestInformation |
config |
IConfiguration |
listener |
ITestInvocationListener |
| คิกรีเทิร์น | |
|---|---|
boolean |
|