IMetricCollectorReceiver
public
interface
IMetricCollectorReceiver
com.android.tradefed.device.metric.IMetricCollectorReceiver |
如果 IRemoteTest
需要获取测试运行的 IMetricCollector
列表,则需要实现此接口。
实现此接口的测试不会使用收集器插桩其默认 ITestInvocationListener
,而是必须通过 IMetricCollector.init(com.android.tradefed.invoker.IInvocationContext, com.android.tradefed.result.ITestInvocationListener)
自行插桩。
某些测试机制涉及缓冲 Tradefed 回调并在最后重放回调(如 ITestSuite
中所述),此类机制会导致在重放期间调用收集器,而不是在实际执行期间调用。通过让测试运行程序处理何时使用收集器,我们可以确保回调在适当的时间处理。
In order to use the collectors, the following pattern can be used: for (IMetricCollector collector : config.getMetricCollectors()) { originalCollector = collector.init(mModuleInvocationContext, originalCollector); }
摘要
公共方法 | |
---|---|
abstract
void
|
setMetricCollectors(
设置为测试运行定义的 |
公共方法
setMetricCollectors
public abstract void setMetricCollectors (collectors)
设置为测试运行定义的 IMetricCollector
列表。
参数 | |
---|---|
collectors |
|