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