JavaCodeCoverageCollector

public final class JavaCodeCoverageCollector
extends BaseDeviceMetricCollector implements IConfigurationReceiver

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


A BaseDeviceMetricCollector that will pull Java coverage measurements off of the device and log them as test artifacts.

Summary

Fields

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

Public constructors

JavaCodeCoverageCollector()

Public methods

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

Callback when a test run is ended.

void setConfiguration(IConfiguration configuration)

Injects the IConfiguration in use.

Fields

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

Public constructors

JavaCodeCoverageCollector

public JavaCodeCoverageCollector ()

Public methods

extraInit

public void extraInit (IInvocationContext context, 
                ITestInvocationListener listener)

Throws
DeviceNotAvailableException

onTestRunEnd

public void onTestRunEnd (DeviceMetricData runData, 
                 runMetrics)

Callback when a test run is ended. This should be the time for clean up.

Parameters
runData DeviceMetricData: the DeviceMetricData holding the data for the run. Will be the same object as during BaseDeviceMetricCollector.onTestRunStart(com.android.tradefed.device.metric.DeviceMetricData).

runMetrics : the current map of metrics passed to ERROR(/#testRunEnded(long,Map)).

Throws
DeviceNotAvailableException

setConfiguration

public void setConfiguration (IConfiguration configuration)

Injects the IConfiguration in use.

Parameters
configuration IConfiguration