Stay organized with collections Save and categorize content based on your preferences.

GranularRetriableTestWrapper.StartEndCollector

public class GranularRetriableTestWrapper.StartEndCollector
extends ResultAndLogForwarder

java.lang.Object
   ↳ com.android.tradefed.result.ResultForwarder
     ↳ com.android.tradefed.result.ResultAndLogForwarder
       ↳ com.android.tradefed.testtype.suite.GranularRetriableTestWrapper.StartEndCollector


Class helper to catch missing run start and end.

Summary

Fields

public boolean mRunEndedReported

public boolean mRunStartReported

Public methods

void testRunEnded(long elapsedTimeMillis, runMetrics)

Reports end of test run.

void testRunStarted(String runName, int testCount)

Reports the start of a test run.

void testRunStarted(String runName, int testCount, int attemptNumber, long startTime)

Reports the start of a test run.

void testRunStarted(String runName, int testCount, int attemptNumber)

Reports the start of a test run.

Fields

mRunEndedReported

public boolean mRunEndedReported

mRunStartReported

public boolean mRunStartReported

Public methods

testRunEnded

public void testRunEnded (long elapsedTimeMillis, 
                 runMetrics)

Reports end of test run. FIXME: We cannot have two Map<> interfaces with different type, so we have to use HashMap here.

Parameters
elapsedTimeMillis long: device reported elapsed time, in milliseconds

runMetrics : key-value pairs reported at the end of a test run with Metric.

testRunStarted

public void testRunStarted (String runName, 
                int testCount)

Reports the start of a test run.

Parameters
runName String: the test run name

testCount int: total number of tests in test run

testRunStarted

public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber, 
                long startTime)

Reports the start of a test run.

Parameters
runName String: the test run name

testCount int: total number of tests in test run

attemptNumber int: order number, identifying the different attempts of the same runName that run multiple times. The attemptNumber is 0-indexed and should increment everytime a new run happens. e.g. A test is granular retried 3 times, it should have 4 total runs under the same runName and the attemptNumber is from 0 to 3.

startTime long: the time the run started, measured via System.currentTimeMillis()

testRunStarted

public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber)

Reports the start of a test run.

Parameters
runName String: the test run name

testCount int: total number of tests in test run

attemptNumber int: order number, identifying the different attempts of the same runName that run multiple times. The attemptNumber is 0-indexed and should increment everytime a new run happens. e.g. A test is granular retried 3 times, it should have 4 total runs under the same runName and the attemptNumber is from 0 to 3.