模塊監聽器

public class ModuleListener
extends CollectingTestListener

對象
com.android.tradefed.result.CollectingTestListener
com.android.tradefed.testtype.suite.ModuleListener


監聽器連接到每個IRemoteTest每個模塊,以收集結果列表。

概括

公共構造函數

ModuleListener (ITestInvocationListener listener)

構造函數。

公共方法

boolean hasLastAttemptFailed ()

返回偵聽器上次重試會話是否失敗。

void logAssociation (String dataName, LogFile logFile)

void setAttemptIsolation (CurrentInvocation.IsolationGrade isolation)

設置是否應將嘗試報告為孤立的。

void setCollectTestsOnly (boolean collectTestsOnly)

設置我們是否只收集測試。

void setMarkTestsSkipped (boolean skip)

是否標記所有跳過的測試用例。

void testAssumptionFailure (TestDescription test, String trace)
void testAssumptionFailure (TestDescription test, FailureDescription failure)
void testEnded (TestDescription test, long endTime, testMetrics) testEnded (TestDescription test, long endTime, testMetrics)

void testEnded (TestDescription test, testMetrics) testEnded (TestDescription test, testMetrics)

void testFailed (TestDescription test, FailureDescription failure)

void testFailed (TestDescription test, String trace)

void testIgnored (TestDescription test)
void testLog (String dataName, LogDataType dataType, InputStreamSource dataStream)

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

void testRunEnded (long elapsedTime, runMetrics) testRunEnded (long elapsedTime, runMetrics)

void testRunFailed (FailureDescription failure)

void testRunFailed (String errorMessage)

void testRunStarted (String name, int numTests, int attemptNumber)

void testRunStarted (String name, int numTests, int attemptNumber, long startTime)

void testStarted (TestDescription test, long startTime)

公共構造函數

模塊監聽器

public ModuleListener (ITestInvocationListener listener)

構造函數。

參數
listener ITestInvocationListener

公共方法

上次嘗試失敗

public boolean hasLastAttemptFailed ()

返回偵聽器上次重試會話是否失敗。

退貨
boolean

日誌關聯

public void logAssociation (String dataName, 
                LogFile logFile)

參數
dataName String

logFile LogFile

設置嘗試隔離

public void setAttemptIsolation (CurrentInvocation.IsolationGrade isolation)

設置是否應將嘗試報告為孤立的。

參數
isolation CurrentInvocation.IsolationGrade

setCollectTestsOnly

public void setCollectTestsOnly (boolean collectTestsOnly)

設置我們是否只收集測試。

參數
collectTestsOnly boolean

setMarkTestsSkipped

public void setMarkTestsSkipped (boolean skip)

是否標記所有跳過的測試用例。

參數
skip boolean

測試假設失敗

public void testAssumptionFailure (TestDescription test, 
                String trace)

參數
test TestDescription

trace String

測試假設失敗

public void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

參數
test TestDescription

failure FailureDescription

測試結束

public void testEnded (TestDescription test, 
                long endTime, 
                 testMetrics)

參數
test TestDescription

endTime long

testMetrics

測試結束

public void testEnded (TestDescription test, 
                 testMetrics)

參數
test TestDescription

testMetrics

測試失敗

public void testFailed (TestDescription test, 
                FailureDescription failure)

參數
test TestDescription

failure FailureDescription

測試失敗

public void testFailed (TestDescription test, 
                String trace)

參數
test TestDescription

trace String

測試忽略

public void testIgnored (TestDescription test)

參數
test TestDescription

測試日誌

public void testLog (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)

參數
dataName String

dataType LogDataType

dataStream InputStreamSource

測試日誌已保存

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

參數
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile

測試運行結束

public void testRunEnded (long elapsedTime, 
                 runMetrics)

參數
elapsedTime long

runMetrics

測試運行失敗

public void testRunFailed (FailureDescription failure)

參數
failure FailureDescription

測試運行失敗

public void testRunFailed (String errorMessage)

參數
errorMessage String

測試運行開始

public void testRunStarted (String name, 
                int numTests, 
                int attemptNumber)

參數
name String

numTests int

attemptNumber int

測試運行開始

public void testRunStarted (String name, 
                int numTests, 
                int attemptNumber, 
                long startTime)

參數
name String

numTests int

attemptNumber int

startTime long

測試開始

public void testStarted (TestDescription test, 
                long startTime)

參數
test TestDescription

startTime long