呼叫JUnitResultForwarder

public class InvocationToJUnitResultForwarder
extends Object implements ITestInvocationListener

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


偵聽ITestInvocationListener事件並將其轉送到TestListener類別。

概括

公共構造函數

InvocationToJUnitResultForwarder (TestListener junitListener)

公共方法

TestSummary getSummary ()

void invocationEnded (long elapsedTime)

void invocationFailed (Throwable cause)

void invocationStarted (IInvocationContext context)

void testAssumptionFailure (TestDescription testId, String trace)
void testEnded (TestDescription test, testMetrics) testEnded (TestDescription test, testMetrics)

void testFailed (TestDescription testId, String trace)

void testIgnored (TestDescription test)
void testLog (String dataName, LogDataType logData, 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)

受保護的方法

TestListener getJUnitListener ()

公共構造函數

呼叫JUnitResultForwarder

public InvocationToJUnitResultForwarder (TestListener junitListener)

參數
junitListener TestListener

公共方法

取得摘要

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

測試假設失敗

public void testAssumptionFailure (TestDescription testId, 
                String trace)

參數
testId TestDescription

trace String

測試結束

public void testEnded (TestDescription test, 
                 testMetrics)

參數
test TestDescription

testMetrics

測試失敗

public void testFailed (TestDescription testId, 
                String trace)

參數
testId TestDescription

trace String

測試被忽略

public void testIgnored (TestDescription test)

參數
test TestDescription

測試日誌

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

參數
dataName String

logData LogDataType

dataStream InputStreamSource

測試運行結束

public void testRunEnded (long elapsedTime, 
                 runMetrics)

參數
elapsedTime long

runMetrics

測試運行失敗

public void testRunFailed (String errorMessage)

參數
errorMessage String

測試運行開始

public void testRunStarted (String runName, 
                int testCount)

參數
runName String

testCount int

測試運行停止

public void testRunStopped (long elapsedTime)

參數
elapsedTime long

測試開始

public void testStarted (TestDescription test)

參數
test TestDescription

受保護的方法

獲取JUnitListener

protected TestListener getJUnitListener ()

退貨
TestListener