ExecutableTargetTest

public class ExecutableTargetTest
extends ExecutableBaseTest implements IDeviceTest

java.lang.Object
   ↳ com.android.tradefed.testtype.binary.ExecutableBaseTest
     ↳ com.android.tradefed.testtype.binary.ExecutableTargetTest


โปรแกรมเรียกใช้การทดสอบสำหรับไฟล์ที่เรียกใช้ได้ซึ่งทำงานในเป้าหมาย Runner จะใช้ IDeviceTest เนื่องจากไบนารีทำงานในอุปกรณ์

สรุป

ค่าคงที่

String DEVICE_LOST_ERROR

String ROOT_LOST_ERROR

เครื่องมือสร้างสาธารณะ

ExecutableTargetTest()

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

String findBinary(String binary)

ค้นหาไบนารีเพื่อดำเนินการ

boolean getCollectTestsOnly()
ITestDevice getDevice()

เตรียมอุปกรณ์ภายใต้การทดสอบ

void runBinary(String binaryPath, ITestInvocationListener listener, TestDescription description)

เรียกใช้ไบนารีในเส้นทางที่ระบุจริง

void setDevice(ITestDevice device)

แทรกอุปกรณ์ภายใต้การทดสอบ

FailureDescription shouldAbortRun(TestDescription description)

ตรวจสอบว่าควรสิ้นสุด TestRun ก่อนกำหนดหรือไม่

วิธีการที่ได้รับการป้องกัน

void checkCommandResult(CommandResult result, ITestInvocationListener listener, TestDescription description)

ตรวจสอบผลลัพธ์ของคำสั่งทดสอบ

boolean doesRunBinaryGenerateTestResults()
boolean doesRunBinaryGenerateTestRuns()
boolean getSkipBinaryCheck()

ค่าคงที่

DEVICE_LOST_ERROR

public static final String DEVICE_LOST_ERROR

ค่าคงที่: "อุปกรณ์สูญหายก่อน %s จึงยกเลิกการเรียกใช้"

ROOT_LOST_ERROR

public static final String ROOT_LOST_ERROR

ค่าคงที่: "สิทธิ์เข้าถึงระดับรูทสูญหายก่อน %s จึงยกเลิกการเรียกใช้"

เครื่องมือสร้างสาธารณะ

ExecutableTargetTest

public ExecutableTargetTest ()

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

findBinary

public String findBinary (String binary)

ค้นหาไบนารีเพื่อดำเนินการ

พารามิเตอร์
binary String: เส้นทางของไบนารีหรือชื่อไบนารี

การคืนสินค้า
String เส้นทางไปยังไบนารี หรือ null หากไม่พบ

ส่ง
DeviceNotAvailableException

getCollectTestsOnly

public boolean getCollectTestsOnly ()

การคืนสินค้า
boolean

getDevice

public ITestDevice getDevice ()

เตรียมอุปกรณ์ภายใต้การทดสอบ

การคืนสินค้า
ITestDevice ITestDevice

runBinary

public void runBinary (String binaryPath, 
                ITestInvocationListener listener, 
                TestDescription description)

เรียกใช้ไบนารีในเส้นทางที่ระบุจริง

พารามิเตอร์
binaryPath String: เส้นทางของไบนารี

listener ITestInvocationListener: Listener ที่ใช้รายงานผลลัพธ์

description TestDescription: อยู่ระหว่างการทดสอบ

ส่ง
DeviceNotAvailableException
IOException

setDevice

public void setDevice (ITestDevice device)

แทรกอุปกรณ์ภายใต้การทดสอบ

พารามิเตอร์
device ITestDevice: ITestDevice ที่จะใช้

shouldAbortRun

public FailureDescription shouldAbortRun (TestDescription description)

ตรวจสอบว่าควรสิ้นสุด TestRun ก่อนกำหนดหรือไม่

พารามิเตอร์
description TestDescription: อยู่ระหว่างการทดสอบ

การคืนสินค้า
FailureDescription FailureDescription หากควรสิ้นสุด Run Loop

วิธีการที่ได้รับการป้องกัน

checkCommandResult

protected void checkCommandResult (CommandResult result, 
                ITestInvocationListener listener, 
                TestDescription description)

ตรวจสอบผลลัพธ์ของคำสั่งทดสอบ

พารามิเตอร์
result CommandResult: ผลการทดสอบของคำสั่ง CommandResult

listener ITestInvocationListener: ITestInvocationListener

description TestDescription: อยู่ระหว่างการทดสอบ

doesRunBinaryGenerateTestResults

protected boolean doesRunBinaryGenerateTestResults ()

การคืนสินค้า
boolean

doesRunBinaryGenerateTestRuns

protected boolean doesRunBinaryGenerateTestRuns ()

การคืนสินค้า
boolean

getSkipBinaryCheck

protected boolean getSkipBinaryCheck ()

การคืนสินค้า
boolean