可執行目標測試
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 | 二進製文件的路徑,如果未找到則為 null。 |
投擲 | |
---|---|
DeviceNotAvailableException |
運行二進製文件
public void runBinary (String binaryPath, ITestInvocationListener listener, TestDescription description)
實際上在給定路徑運行二進製文件。
參數 | |
---|---|
binaryPath | String :二進製文件的路徑。 |
listener | ITestInvocationListener :報告結果的偵聽器。 |
description | TestDescription :正在進行的測試。 |
投擲 | |
---|---|
DeviceNotAvailableException |
受保護的方法
檢查命令結果
protected void checkCommandResult (CommandResult result, ITestInvocationListener listener, TestDescription description)
檢查測試命令的結果。
參數 | |
---|---|
result | CommandResult : 命令CommandResult 的測試結果 |
listener | ITestInvocationListener : ITestInvocationListener |
description | TestDescription :正在進行的測試。 |