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 teardown

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)

เรียกใช้ ITestDevice#postInvocationTearDown(Throwable) สำหรับอุปกรณ์แต่ละส่วนของ คำขอ

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)) สำหรับอุปกรณ์แต่ละส่วนของ คำขอ

void runTests(TestInformation info, IConfiguration config, ITestInvocationListener listener)

ทำการทดสอบ

วิธีการป้องกัน

IConfigurationFactory getFactory()

แสดงผล IConfigurationFactory ที่ใช้เพื่อสร้างการกำหนดค่า

getPreparersToRun(IConfiguration config, String deviceName)

ดึงข้อมูลรายการผู้เตรียมที่จะเรียกใช้บนอุปกรณ์นี้

IRunUtil getRunUtil()
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

DoTeardown

public void doTeardown (TestInformation testInfo, 
                IConfiguration config, 
                ITestLogger logger, 
                Throwable exception)

ดำเนินการตามขั้นตอน target_preparer และ multi_target_preparer teardown อุปกรณ์ฉีกขาดไหม ที่เชื่อมโยงกับการตั้งค่าดังกล่าว

พารามิเตอร์
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: ขั้นของการเรียกใช้ของเรา

เรียกใช้อุปกรณ์หลังการเรียกใช้การฉีกขาด

public void runDevicePostInvocationTearDown (IInvocationContext context, 
                IConfiguration config, 
                Throwable exception)

เรียกใช้ ITestDevice#postInvocationTearDown(Throwable) สำหรับอุปกรณ์แต่ละส่วนของ คำขอ

พารามิเตอร์
context IInvocationContext: IInvocationContext ของการเรียกใช้

config IConfiguration: IConfiguration ของการทดสอบนี้

exception Throwable: ข้อยกเว้นเดิมที่เกิดจากการทดสอบ หากมี

ตั้งค่าการเรียกใช้อุปกรณ์ล่วงหน้า

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 ของผลการทดสอบ

วิธีการป้องกัน

Getโรงงาน

protected IConfigurationFactory getFactory ()

แสดงผล IConfigurationFactory ที่ใช้เพื่อสร้างการกำหนดค่า

คิกรีเทิร์น
IConfigurationFactory

เตรียมพร้อมเรียกใช้

protected  getPreparersToRun (IConfiguration config, 
                String deviceName)

ดึงข้อมูลรายการผู้เตรียมที่จะเรียกใช้บนอุปกรณ์นี้

ลบล้างในคลาสแซนด์บ็อกซ์เพื่อจำกัดการเรียกใช้เครื่องมือเตรียมห้องทดลองภายในแซนด์บ็อกซ์ เด็ก

พารามิเตอร์
config IConfiguration

deviceName String

คิกรีเทิร์น

GetRunUtil

protected IRunUtil getRunUtil ()

คิกรีเทิร์น
IRunUtil

กำลังเตรียมAndRunSandbox

protected boolean prepareAndRunSandbox (TestInformation info, 
                IConfiguration config, 
                ITestInvocationListener listener)

แสดงสถานะผลลัพธ์ของการเรียกใช้แซนด์บ็อกซ์

พารามิเตอร์
info TestInformation

config IConfiguration

listener ITestInvocationListener

คิกรีเทิร์น
boolean