LegacySubprocessResultsReporter

public final class LegacySubprocessResultsReporter
extends SubprocessResultsReporter

java.lang.Object
   ↳ com.android.tradefed.result.SubprocessResultsReporter
     ↳ com.android.tradefed.result.LegacySubprocessResultsReporter


subprocess 結果回報器的凍結實作,即使其超類別有所變更,仍應與舊版 TF/CTS (例如 8 以上) 相容。

這個檢舉人可以動態插入,以便在舊版 TF 型測試套件中啟用子程序回報功能。

摘要

公用建構函式

LegacySubprocessResultsReporter()

受保護的建構函式

LegacySubprocessResultsReporter(boolean installHandler)

公用方法

void invocationEnded(long elapsedTime)

回報是否因某種錯誤狀況而終止呼叫 (無論是否成功)。

void invocationFailed(Throwable cause)

Reports an incomplete invocation due to some error condition.

void invocationStarted(IBuildInfo buildInfo)
void logAssociation(String dataName, LogFile logFile)

在某些情況下,記錄必須與測試案例密切相關,但無法在直接 testLogSaved(String,LogDataType,InputStreamSource,LogFile) 回呼中執行這項操作。

void setLogSaver(ILogSaver logSaver)
void testAssumptionFailure(TestIdentifier testId, String trace)
void testEnded(TestIdentifier testId, long endTime, Map<String, String> metrics)
void testEnded(TestIdentifier testId, Map<String, String> metrics)
void testFailed(TestIdentifier testId, String reason)
void testIgnored(TestIdentifier testId)
void testLogSaved(String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)
void testModuleEnded()

回報模組執行作業的結束時間。

void testModuleStarted(IInvocationContext moduleContext)

回報模組的執行開始時間。

void testRunEnded(long time, Map<String, String> runMetrics)
void testRunFailed(String reason)

發生嚴重錯誤,因此無法完成報表測試執行。

void testRunStarted(String runName, int testCount)

回報測試執行的開始。

void testStarted(TestIdentifier testId)
void testStarted(TestIdentifier testId, long startTime)

公用建構函式

LegacySubprocessResultsReporter

public LegacySubprocessResultsReporter ()

受保護的建構函式

LegacySubprocessResultsReporter

protected LegacySubprocessResultsReporter (boolean installHandler)

參數
installHandler boolean

公用方法

invocationEnded

public void invocationEnded (long elapsedTime)

回報是否因某種錯誤情況而終止呼叫 (無論是否成功)。

TradeFederation 架構會自動呼叫。

參數
elapsedTime long:以毫秒為單位的呼叫經過時間

invocationFailed

public void invocationFailed (Throwable cause)

由於發生某些錯誤情況,因此回報不完整的叫用。

TradeFederation 架構會自動呼叫。

參數
cause ThrowableThrowable 失敗的原因

invocationStarted

public void invocationStarted (IBuildInfo buildInfo)

參數
buildInfo IBuildInfo

logAssociation

public void logAssociation (String dataName, 
                LogFile logFile)

在某些情況下,記錄必須與測試案例密切相關,但無法在直接 testLogSaved(String,LogDataType,InputStreamSource,LogFile) 回呼中執行此操作。因此,這個回呼可明確提供強關聯。

參數
dataName String:資料名稱

logFile LogFile:先前記錄的 LogFile,應與測試案例建立關聯。

setLogSaver

public void setLogSaver (ILogSaver logSaver)

參數
logSaver ILogSaver

testAssumptionFailure

public void testAssumptionFailure (TestIdentifier testId, 
                String trace)

參數
testId TestIdentifier

trace String

testEnded

public void testEnded (TestIdentifier testId, 
                long endTime, 
                Map<String, String> metrics)

參數
testId TestIdentifier

endTime long

metrics Map

testEnded

public void testEnded (TestIdentifier testId, 
                Map<String, String> metrics)

參數
testId TestIdentifier

metrics Map

testFailed

public void testFailed (TestIdentifier testId, 
                String reason)

參數
testId TestIdentifier

reason String

testIgnored

public void testIgnored (TestIdentifier testId)

參數
testId TestIdentifier

testLogSaved

public void testLogSaved (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream, 
                LogFile logFile)

參數
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile

testModuleEnded

public void testModuleEnded ()

回報模組執行作業的結束時間。

testModuleStarted

public void testModuleStarted (IInvocationContext moduleContext)

回報模組的執行開始時間。這個回呼與 testModuleEnded() 相關聯,且在序列中為選用項目。只有在使用模組的執行期間,才會使用這個標記:以套件為基礎的執行器。

參數
moduleContext IInvocationContext:模組的 IInvocationContext

testRunEnded

public void testRunEnded (long time, 
                Map<String, String> runMetrics)

參數
time long

runMetrics Map

testRunFailed

public void testRunFailed (String reason)

發生嚴重錯誤,因此無法完成報表測試執行作業。

參數
reason StringString,說明執行失敗的原因。

testRunStarted

public void testRunStarted (String runName, 
                int testCount)

回報測試執行的開始時間。

參數
runName String:測試執行名稱

testCount int:測試執行作業中的測試總數

testStarted

public void testStarted (TestIdentifier testId)

參數
testId TestIdentifier

testStarted

public void testStarted (TestIdentifier testId, 
                long startTime)

參數
testId TestIdentifier

startTime long