JarHostTest.HostTestListener
public
class
JarHostTest.HostTestListener
extends ResultForwarder
| java.lang.Object | ||
| ↳ | com.android.tradefed.result.ResultForwarder | |
| ↳ | com.android.compatibility.common.tradefed.testtype.JarHostTest.HostTestListener | |
封装容器监听器,用于将 testRunStarted() 和 testRunEnded() 以外的所有事件转发到嵌入式监听器。jar 中的每个测试类都会调用这些事件,HostTestListener 会将这些事件隐藏起来,以便控制台日志记录和结果报告。
摘要
公共构造函数 | |
|---|---|
HostTestListener(ITestInvocationListener listener)
|
|
公共方法 | |
|---|---|
void
|
testRunEnded(long elapsedTime,
报告测试运行结束。 |
void
|
testRunStarted(String name, int numTests)
报告测试运行的开始。 |
公共构造函数
HostTestListener
public HostTestListener (ITestInvocationListener listener)
| 参数 | |
|---|---|
listener |
ITestInvocationListener |
公共方法
testRunEnded
public void testRunEnded (long elapsedTime,
metrics) 报告测试运行结束。
| 参数 | |
|---|---|
elapsedTime |
long:设备报告的经过时间(以毫秒为单位) |
metrics |
:测试运行结束时报告的键值对 |
testRunStarted
public void testRunStarted (String name,
int numTests)报告测试运行的开始。
| 参数 | |
|---|---|
name |
String:测试运行作业名称 |
numTests |
int:测试运行中的测试总数 |