子流程結果報告器
public class SubprocessResultsReporter
extends Object
implements ITestInvocationListener, ILogSaverListener, ISupportGranularResults
對象 |
↳ | com.android.tradefed.result.SubprocessResultsReporter |
器具ITestInvocationListener
被指定為一個result_reporter和向前從所述子過程的測試中,測試運行,測試調用的結果。
概括
公共方法 |
---|
void | close () |
TestSummary | getSummary () |
void | invocationEnded (long elapsedTime) |
void | invocationFailed (FailureDescription failure) |
void | invocationFailed (Throwable cause) |
void | invocationStarted (IInvocationContext context) |
void | logAssociation (String dataName, LogFile logFile) |
void | printEvent (String key, Object event) 幫助打印事件鍵,然後打印 json 對象。 |
void | setOutputTestLog (boolean outputTestLog) 設置我們是否應該輸出記錄的測試。 |
boolean | supportGranularResults () |
void | testAssumptionFailure (TestDescription testId, String trace) |
void | testAssumptionFailure (TestDescription testId, FailureDescription failure) |
void | testEnded (TestDescription testId, long endTime, metrics) testEnded (TestDescription testId, long endTime, metrics) |
void | testEnded (TestDescription testId, metrics) testEnded (TestDescription testId, metrics) |
void | testFailed (TestDescription testId, FailureDescription failure) |
void | testFailed (TestDescription testId, String reason) |
void | testIgnored (TestDescription testId) |
void | testLog (String dataName, LogDataType dataType, InputStreamSource dataStream) |
void | testModuleEnded () |
void | testModuleStarted (IInvocationContext moduleContext) |
void | testRunEnded (long time, runMetrics) testRunEnded (long time, runMetrics) |
void | testRunFailed (FailureDescription failure) |
void | testRunFailed (String reason) |
void | testRunStarted (String runName, int testCount, int attemptNumber) |
void | testRunStarted (String runName, int testCount) |
void | testRunStarted (String runName, int testCount, int attemptNumber, long startTime) |
void | testRunStopped (long arg0) |
void | testStarted (TestDescription testId, long startTime) |
void | testStarted (TestDescription testId) |
公共構造函數
子流程結果報告器
public SubprocessResultsReporter ()
公共方法
獲取摘要
public TestSummary getSummary ()
調用結束
public void invocationEnded (long elapsedTime)
調用失敗
public void invocationFailed (FailureDescription failure)
參數 |
---|
failure | FailureDescription |
調用失敗
public void invocationFailed (Throwable cause)
調用開始
public void invocationStarted (IInvocationContext context)
參數 |
---|
context | IInvocationContext |
日誌關聯
public void logAssociation (String dataName,
LogFile logFile)
參數 |
---|
dataName | String |
logFile | LogFile |
打印事件
public void printEvent (String key,
Object event)
幫助打印事件鍵,然後打印 json 對象。
參數 |
---|
key | String |
event | Object |
設置輸出測試日誌
public void setOutputTestLog (boolean outputTestLog)
設置我們是否應該輸出記錄的測試。
支持粒度結果
public boolean supportGranularResults ()
測試假設失敗
public void testAssumptionFailure (TestDescription testId,
String trace)
參數 |
---|
testId | TestDescription |
trace | String |
測試假設失敗
public void testAssumptionFailure (TestDescription testId,
FailureDescription failure)
參數 |
---|
testId | TestDescription |
failure | FailureDescription |
測試結束
public void testEnded (TestDescription testId,
long endTime,
metrics)
參數 |
---|
testId | TestDescription |
endTime | long |
metrics | |
測試結束
public void testEnded (TestDescription testId,
metrics)
參數 |
---|
testId | TestDescription |
metrics | |
測試失敗
public void testFailed (TestDescription testId,
FailureDescription failure)
參數 |
---|
testId | TestDescription |
failure | FailureDescription |
測試失敗
public void testFailed (TestDescription testId,
String reason)
參數 |
---|
testId | TestDescription |
reason | String |
測試忽略
public void testIgnored (TestDescription testId)
public void testLog (String dataName,
LogDataType dataType,
InputStreamSource dataStream)
參數 |
---|
dataName | String |
dataType | LogDataType |
dataStream | InputStreamSource |
測試模塊結束
public void testModuleEnded ()
測試模塊啟動
public void testModuleStarted (IInvocationContext moduleContext)
參數 |
---|
moduleContext | IInvocationContext |
測試運行結束
public void testRunEnded (long time,
runMetrics)
測試運行失敗
public void testRunFailed (FailureDescription failure)
參數 |
---|
failure | FailureDescription |
測試運行失敗
public void testRunFailed (String reason)
測試運行開始
public void testRunStarted (String runName,
int testCount,
int attemptNumber)
參數 |
---|
runName | String |
testCount | int |
attemptNumber | int |
測試運行開始
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 |
startTime | long |
測試運行停止
public void testRunStopped (long arg0)
測試開始
public void testStarted (TestDescription testId,
long startTime)
參數 |
---|
testId | TestDescription |
startTime | long |
測試開始
public void testStarted (TestDescription testId)