Google is committed to advancing racial equity for Black communities. See how.
本頁面由 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

public void testIgnored (TestDescription test)

參量
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