CountTestCasesCollector

public class CountTestCasesCollector
extends BaseDeviceMetricCollector

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


Count and report the number of test cases for a given IRemoteTest.

Summary

Public constructors

CountTestCasesCollector()
CountTestCasesCollector(IRemoteTest test)

Public methods

void onTestEnd(DeviceMetricData testData, Map<String, MetricMeasurement.Metric> currentTestCaseMetrics)

Callback when a test case is ended.

void onTestFail(DeviceMetricData testData, TestDescription test)

Callback when a test case fails.

void onTestRunEnd(DeviceMetricData runData, Map<String, MetricMeasurement.Metric> currentRunMetrics)

Callback when a test run is ended.

void setTestType(IRemoteTest test)

Public constructors

CountTestCasesCollector

public CountTestCasesCollector ()

CountTestCasesCollector

public CountTestCasesCollector (IRemoteTest test)

Parameters
test IRemoteTest

Public methods

onTestEnd

public void onTestEnd (DeviceMetricData testData, 
                Map<String, MetricMeasurement.Metric> currentTestCaseMetrics)

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

Parameters
testData DeviceMetricData: the DeviceMetricData holding the data for the test case. Will be the same object as during onTestStart(DeviceMetricData).

currentTestCaseMetrics Map: the current map of metrics passed to testEnded(TestDescription,Map).

onTestFail

public void onTestFail (DeviceMetricData testData, 
                TestDescription test)

Callback when a test case fails.

Parameters
testData DeviceMetricData: the DeviceMetricData holding the data for the test case.

test TestDescription: the TestDescription of the test case in progress.

Throws
DeviceNotAvailableException

onTestRunEnd

public void onTestRunEnd (DeviceMetricData runData, 
                Map<String, MetricMeasurement.Metric> currentRunMetrics)

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 onTestRunStart(DeviceMetricData).

currentRunMetrics Map: the current map of metrics passed to testRunEnded(long,Map).

setTestType

public void setTestType (IRemoteTest test)

Parameters
test IRemoteTest