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 多次运行的不同尝试。 attemptsNumber 是从 0 开始索引的,并且每次新的运行发生时都应该递增。例如,一个测试被粒度重试 3 次,它应该在同一 runName 下总共运行 4 次,并且 attemptsNumber 从 0 到 3。

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

测试运行开始

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

报告测试运行的开始。

参数
runName String : 测试运行名称

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

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