后处理器
public interface IPostProcessor
implements ITestInvocationListener , ILogSaverListener , IDisableable
com.android.tradefed.postprocessor.IPostProcessor |
后处理器是一个 Trade Federation 对象,旨在允许在测试之后和结果报告之前处理指标和日志。这允许对一些数据进行后处理并让所有 result_reporter 对象接收它,而不是只在一个 result_reporter 中进行后处理并在传递新数据时遇到问题。
概括
公共方法 | |
---|---|
abstract ITestInvocationListener | init ( ITestInvocationListener listener) 后处理器的初始化步骤。 |
abstract | processAllTestMetricsAndLogs (ListMultimap<String, MetricMeasurement.Metric> allTestMetrics, allTestLogs) processAllTestMetricsAndLogs (ListMultimap<String, MetricMeasurement.Metric> allTestMetrics, allTestLogs) 实施此方法以聚合所有测试的指标和日志。 |
abstract | processRunMetricsAndLogs ( rawMetrics, runLogs) processRunMetricsAndLogs ( rawMetrics, runLogs) processRunMetricsAndLogs ( rawMetrics, runLogs) 实施此方法以便从现有指标和日志生成一组新指标。 |
abstract | processTestMetricsAndLogs ( TestDescription testDescription, testMetrics, testLogs) processTestMetricsAndLogs ( TestDescription testDescription, testMetrics, testLogs) processTestMetricsAndLogs ( TestDescription testDescription, testMetrics, testLogs) 实施此方法以发布每个测试的流程指标和日志。 |
公共方法
在里面
public abstract ITestInvocationListener init (ITestInvocationListener listener)
后处理器的初始化步骤。确保在任何测试回调之前被调用。
参数 | |
---|---|
listener | ITestInvocationListener |
退货 | |
---|---|
ITestInvocationListener |
processAllTestMetricsAndLogs
public abstractprocessAllTestMetricsAndLogs (ListMultimap<String, MetricMeasurement.Metric> allTestMetrics, allTestLogs)
实施此方法以聚合所有测试的指标和日志。来自此方法的指标将报告为运行指标。只应返回新生成的指标,并具有唯一的键名(不允许与现有键冲突)。
参数 | |
---|---|
allTestMetrics | ListMultimap :一个 HashMultimap 存储每个测试的指标,按指标名称分组。 |
allTestLogs | TestDescription 作为键,以其数据名称为键。 |
退货 | |
---|---|
来自所有测试指标的一组新生成的指标。 |
processRunMetricsAndLogs
public abstractprocessRunMetricsAndLogs ( rawMetrics, runLogs)
实施此方法以便从现有指标和日志生成一组新指标。只应返回新生成的指标,并具有唯一的键名(不允许与现有键冲突)。
参数 | |
---|---|
rawMetrics | |
runLogs |
退货 | |
---|---|
从运行指标中新生成的一组指标。 |
processTestMetricsAndLogs
public abstractprocessTestMetricsAndLogs (TestDescription testDescription, testMetrics, testLogs)
实施此方法以发布每个测试的流程指标和日志。只应返回新生成的指标,并具有唯一的键名(不允许与现有键冲突)。
参数 | |
---|---|
testDescription | TestDescription :描述测试的 TestDescription 对象。 |
testMetrics | |
testLogs |
退货 | |
---|---|
来自测试指标的一组新生成的指标。 |