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, metrics) testRunEnded (long elapsedTime, metrics)

报告测试运行结束。

void testRunStarted (String name, int numTests)

报告测试运行的开始。

公共构造函数

主机测试监听器

public HostTestListener (ITestInvocationListener listener)

参数
listener ITestInvocationListener

公共方法

测试运行结束

public void testRunEnded (long elapsedTime, 
                 metrics)

报告测试运行结束。 FIXME:我们不能有两个不同类型的 Map<> 接口,所以我们必须在这里使用 HashMap。

参数
elapsedTime long :设备报告的经过时间,以毫秒为单位

metrics :使用Metric测试运行结束时报告的键值对。

测试运行开始

public void testRunStarted (String name, 
                int numTests)

报告测试运行的开始。

参数
name String : 测试运行名称

numTests int : 测试运行中的测试总数