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: ผู้ฟังจะรายงานผลที่ใด

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

การขว้าง
DeviceNotAvailableException

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