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。