Google 致力于为黑人社区推动种族平等。查看具体举措
此页面由 Cloud Translation API 翻译。
Switch to English

模块监听器

public class ModuleListener
extends CollectingTestListener

java.lang.Object
com.android.tradefed.result.CollectingTestListener
com.android.tradefed.testtype.suite.ModuleListener


侦听器附加到每个模块的每个IRemoteTest以便收集结果列表。

摘要

公共建设者

ModuleListener (ITestInvocationListener listener)

构造函数。

公开方法

boolean hasLastAttemptFailed ()

返回侦听器的最后重试会话是否失败。

void logAssociation (String dataName, LogFile logFile)

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

公开方法

hasLastAttemptFailed

public boolean hasLastAttemptFailed ()

返回侦听器的上一次重试会话是否失败。

退货
boolean

logAssociation

public void logAssociation (String dataName, 
                LogFile logFile)

参量
dataName String

logFile LogFile

setCollectTestsOnly

public void setCollectTestsOnly (boolean collectTestsOnly)

设置是否仅收集测试。

参量
collectTestsOnly boolean

setMarkTestsSkipped

public void setMarkTestsSkipped (boolean skip)

是否标记所有已跳过的测试用例。

参量
skip boolean

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                String trace)

参量
test TestDescription

trace String

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

参量
test TestDescription

failure FailureDescription

testEnded

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

参量
test TestDescription

endTime long

testMetrics

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

参量
test TestDescription

testMetrics

测试失败

第473章

参量
test TestDescription

failure FailureDescription

测试失败

public void testFailed (TestDescription test, 
                String trace)

参量
test TestDescription

trace String

testIgnored

public void testIgnored (TestDescription test)

参量
test TestDescription

测试日志

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

参量
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogSaved

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

参量
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

参量
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (FailureDescription failure)

参量
failure FailureDescription

testRunFailed

public void testRunFailed (String errorMessage)

参量
errorMessage String

testRunStarted

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

参量
name String

numTests int

attemptNumber int

testRunStarted

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

参量
name String

numTests int

attemptNumber int

startTime long

testStarted

public void testStarted (TestDescription test, 
                long startTime)

参量
test TestDescription

startTime long