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

NameMangleListener

public abstract class NameMangleListener
extends Object implements ITestInvocationListener

java.lang.Object
com.android.tradefed.result.NameMangleListener


报告结果时,将转换测试方法,类和包名称的代理侦听器。

摘要

公共建设者

NameMangleListener (ITestInvocationListener listener)

公开方法

TestSummary getSummary ()

void invocationEnded (long elapsedTime)

void invocationFailed (Throwable cause)

void invocationStarted (IInvocationContext context)

void testAssumptionFailure (TestDescription test, String trace)

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

void testFailed (TestDescription test, String trace)

void testIgnored (TestDescription test)

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

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

void testRunFailed (String errorMessage)

void testRunStarted (String runName, int testCount)

void testRunStopped (long elapsedTime)

void testStarted (TestDescription test)

受保护的方法

TestDescription mangleTestId (TestDescription test)

在传递给testStarted(com.android.tradefed.result.TestDescription)testFailed(com.android.tradefed.result.TestDescription, String)ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap) testFailed(com.android.tradefed.result.TestDescription, String)所有TestDescription上运行此方法ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap)回调。

String mangleTestRunName (String name)

在传递给testRunStarted(String, int)回调的所有测试运行名称上运行此方法。

公共建设者

NameMangleListener

public NameMangleListener (ITestInvocationListener listener)

参量
listener ITestInvocationListener

公开方法

getSummary

public TestSummary getSummary ()

退货
TestSummary

调用结束

public void invocationEnded (long elapsedTime)

参量
elapsedTime long

调用失败

public void invocationFailed (Throwable cause)

参量
cause Throwable

调用开始

public void invocationStarted (IInvocationContext context)

参量
context IInvocationContext

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                String trace)

参量
test TestDescription

trace String

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

参量
test TestDescription

testMetrics

测试失败

public void testFailed (TestDescription test, 
                String trace)

参量
test TestDescription

trace String

testIgnored

15

参量
test TestDescription

测试日志

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

参量
dataName String

dataType LogDataType

dataStream InputStreamSource

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

参量
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (String errorMessage)

参量
errorMessage String

testRunStarted

public void testRunStarted (String runName, 
                int testCount)

参量
runName String

testCount int

testRunStopped

public void testRunStopped (long elapsedTime)

参量
elapsedTime long

testStarted

public void testStarted (TestDescription test)

参量
test TestDescription

受保护的方法

mangleTestId

protected TestDescription mangleTestId (TestDescription test)

在传递给testStarted(com.android.tradefed.result.TestDescription)testFailed(com.android.tradefed.result.TestDescription, String)ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap) testFailed(com.android.tradefed.result.TestDescription, String)所有TestDescription上运行此方法ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap)回调。该方法应该返回一个可能不同的TestDescription ,该TestDescription将传递给构造期间指定的下游ITestInvocationListener

实现应注意不要修改原始的TestDescription

默认实现通过未修改的方式传递传入的标识符。

参量
test TestDescription

退货
TestDescription

mangleTestRunName

protected String mangleTestRunName (String name)

在传递给testRunStarted(String, int)回调的所有测试运行名称上运行此方法。该方法应返回一个可能不同的测试运行名称,该名称将传递给在构造期间指定的下游ITestInvocationListener

该实现应注意不要修改原始运行名称。

默认实现通过未修改的方式传入的测试运行名称。

参量
name String

退货
String