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