ExecutableTargetTest
public class ExecutableTargetTest
extends ExecutableBaseTest
implements IDeviceTest
java.lang.Object | ||
. | com.android.tradefed.testtype.binary.ExecutableBaseTest | |
. | com.android.tradefed.testtype.binary.ExecutableTargetTest |
นักวิ่งทดสอบสำหรับการวิ่งบนเป้าหมาย รันเนอร์ใช้ IDeviceTest
เนื่องจากไบนารีทำงานบนอุปกรณ์
สรุป
ผู้สร้างสาธารณะ | |
---|---|
ExecutableTargetTest () |
วิธีการสาธารณะ | |
---|---|
String | findBinary (String binary) ค้นหาไบนารีเพื่อให้สามารถเรียกใช้ได้ |
ITestDevice | getDevice () รับอุปกรณ์ภายใต้การทดสอบ |
void | runBinary (String binaryPath, ITestInvocationListener listener, TestDescription description) รันไบนารีจริงตามเส้นทางที่กำหนด |
void | setDevice ( ITestDevice device) ฉีดอุปกรณ์ภายใต้การทดสอบ |
วิธีการป้องกัน | |
---|---|
void | checkCommandResult ( CommandResult result, ITestInvocationListener listener, TestDescription description) ตรวจสอบผลลัพธ์ของคำสั่งทดสอบ |
ผู้สร้างสาธารณะ
ExecutableTargetTest
public ExecutableTargetTest ()
วิธีการสาธารณะ
findBinary
public String findBinary (String binary)
ค้นหาไบนารีเพื่อให้สามารถเรียกใช้ได้
พารามิเตอร์ | |
---|---|
binary | String : เส้นทางของไบนารีหรือเพียงแค่ชื่อไบนารี |
คืนสินค้า | |
---|---|
String | เส้นทางไปยังไบนารีหรือ null หากไม่พบ |
ขว้าง | |
---|---|
DeviceNotAvailableException |
getDevice
public ITestDevice getDevice ()
รับอุปกรณ์ภายใต้การทดสอบ
คืนสินค้า | |
---|---|
ITestDevice | ITestDevice |
วิ่งไบนารี
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 ที่จะใช้ |
วิธีการป้องกัน
checkCommandResult
protected void checkCommandResult (CommandResult result, ITestInvocationListener listener, TestDescription description)
ตรวจสอบผลลัพธ์ของคำสั่งทดสอบ
พารามิเตอร์ | |
---|---|
result | CommandResult : ผลการทดสอบของคำสั่ง CommandResult |
listener | ITestInvocationListener : ITestInvocationListener |
description | TestDescription : กำลังดำเนินการทดสอบ |