可执行目标测试
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 :正在进行的测试。 |