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


类助手来捕捉丢失的运行开始和结束。

概括

字段

public boolean mRunEndedReported

public boolean mRunStartReported

公共方法

void testRunEnded (long elapsedTimeMillis, runMetrics) testRunEnded (long elapsedTimeMillis, runMetrics)

报告测试运行结束。

void testRunStarted (String runName, int testCount)

报告测试运行的开始。

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

报告测试运行的开始。

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

报告测试运行的开始。

字段

mRunEndedReported

public boolean mRunEndedReported

mRunStartReported

public boolean mRunStartReported

公共方法

测试运行结束

public void testRunEnded (long elapsedTimeMillis, 
                 runMetrics)

报告测试运行结束。 FIXME:我们不能有两个不同类型的 Map<> 接口,所以我们必须在这里使用 HashMap。

参数
elapsedTimeMillis long :设备报告的经过时间,以毫秒为单位

runMetrics :在使用Metric的测试运行结束时报告的键值对。

测试运行开始

public void testRunStarted (String runName, 
                int testCount)

报告测试运行的开始。

参数
runName String : 测试运行名称

testCount int :测试运行中的测试总数

测试运行开始

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

报告测试运行的开始。

参数
runName String : 测试运行名称

testCount int :测试运行中的测试总数

attemptNumber int :订单号,标识同一 runName 多次运行的不同尝试。 attemptNumber 是 0-indexed 并且应该在每次新的运行发生时递增。例如,一个测试是粒度重试 3 次,它应该在相同的 runName 下总共运行 4 次,并且尝试编号是从 0 到 3。

startTime long :运行开始的时间,通过System.currentTimeMillis()测量

测试运行开始

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

报告测试运行的开始。

参数
runName String : 测试运行名称

testCount int :测试运行中的测试总数

attemptNumber int :订单号,标识同一 runName 多次运行的不同尝试。 attemptNumber 是 0-indexed 并且应该在每次新的运行发生时递增。例如,一个测试是粒度重试 3 次,它应该在相同的 runName 下总共运行 4 次,并且尝试编号是从 0 到 3。