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