JavaCodeCoverageCollector

public final class JavaCodeCoverageCollector
extends BaseDeviceMetricCollector implements IConfigurationReceiver

java.lang.Object 中
   ↳ com.android.tradefed.device.metric.BaseDeviceMetricCollector
     ↳ com.android.tradefed.device.metric.JavaCodeCoverageCollector


用于拉取 Java 的 BaseDeviceMetricCollector 测量结果,并将其记录为测试工件。

摘要

字段

public static final String COMPRESS_COVERAGE_FILES

public static final String COVERAGE_DIRECTORY

public static final String COVERAGE_MEASUREMENT_KEY

public static final String FIND_COVERAGE_FILES

public static final String MERGE_COVERAGE_MEASUREMENTS_TEST_NAME

公共构造函数

JavaCodeCoverageCollector()

公共方法

void extraInit(IInvocationContext context, ITestInvocationListener listener)
void onTestRunEnd(DeviceMetricData runData, runMetrics)

测试运行结束时的回调。

void setConfiguration(IConfiguration configuration)

注入正在使用的 IConfiguration

字段

COMPRESS_COVERAGE_FILES

public static final String COMPRESS_COVERAGE_FILES

COVERAGE_DIRECTORY

public static final String COVERAGE_DIRECTORY

COVERAGE_MEASUREMENT_KEY

public static final String COVERAGE_MEASUREMENT_KEY

FIND_COVERAGE_FILES

public static final String FIND_COVERAGE_FILES

MERGE_COVERAGE_MEASUREMENTS_TEST_NAME

public static final String MERGE_COVERAGE_MEASUREMENTS_TEST_NAME

公共构造函数

JavaCodeCoverageCollector

public JavaCodeCoverageCollector ()

公共方法

extraInit

public void extraInit (IInvocationContext context, 
                ITestInvocationListener listener)

抛出
DeviceNotAvailableException

onTestRunEnd

public void onTestRunEnd (DeviceMetricData runData, 
                 runMetrics)

测试运行结束时的回调。这时应该进行清理。

参数
runData DeviceMetricData:保存运行数据的 DeviceMetricData。将保持不变 该对象与 BaseDeviceMetricCollector.onTestRunStart(com.android.tradefed.device.metric.DeviceMetricData) 期间相同。

runMetrics :传递给 ERROR(/#testRunEnded(long,Map)) 的指标的当前映射。

抛出
DeviceNotAvailableException

setConfiguration

public void setConfiguration (IConfiguration configuration)

注入正在使用的 IConfiguration

参数
configuration IConfiguration