Google 致力于为黑人社区推动种族平等。查看具体举措

模块监听器

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