ModuleListener

public class ModuleListener
extends CollectingTestListener

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


Trình nghe được đính kèm vào mỗi IRemoteTest của mỗi mô-đun để thu thập danh sách kết quả.

Tóm tắt

Hàm khởi tạo công khai

ModuleListener(ITestInvocationListener listener)

Hàm khởi tạo.

Phương thức công khai

boolean hasLastAttemptFailed()

Trả về kết quả phiên thử lại gần đây nhất của trình nghe có thành công hay không.

void logAssociation(String dataName, LogFile logFile)

void setAttemptIsolation(CurrentInvocation.IsolationGrade isolation)

Đặt xem có báo cáo lượt thử đó là riêng biệt hay không.

void setCollectTestsOnly(boolean collectTestsOnly)

Đặt xem chúng ta có chỉ thu thập các bài kiểm thử hay không.

void setMarkTestsSkipped(boolean skip)

Có đánh dấu tất cả các trường hợp kiểm thử đã bỏ qua hay không.

void testAssumptionFailure(TestDescription test, String trace)
void testAssumptionFailure(TestDescription test, FailureDescription failure)
void testEnded(TestDescription test, long endTime, testMetrics)

void 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)

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)

Hàm khởi tạo công khai

ModuleListener

public ModuleListener (ITestInvocationListener listener)

Hàm khởi tạo.

Tham số
listener ITestInvocationListener

Phương thức công khai

hasLastAttemptFailed

public boolean hasLastAttemptFailed ()

Trả về kết quả phiên thử lại gần đây nhất của trình nghe có thành công hay không.

Giá trị trả về
boolean

logAssociation

public void logAssociation (String dataName, 
                LogFile logFile)

Tham số
dataName String

logFile LogFile

setAttemptIsolation

public void setAttemptIsolation (CurrentInvocation.IsolationGrade isolation)

Đặt xem có báo cáo lượt thử đó là riêng biệt hay không.

Tham số
isolation CurrentInvocation.IsolationGrade

setCollectTestsOnly

public void setCollectTestsOnly (boolean collectTestsOnly)

Đặt xem chúng ta có chỉ thu thập các bài kiểm thử hay không.

Tham số
collectTestsOnly boolean

setMarkTestsSkipped

public void setMarkTestsSkipped (boolean skip)

Có đánh dấu tất cả các trường hợp kiểm thử đã bỏ qua hay không.

Tham số
skip boolean

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                String trace)

Tham số
test TestDescription

trace String

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

Tham số
test TestDescription

failure FailureDescription

testEnded

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

Tham số
test TestDescription

endTime long

testMetrics

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

Tham số
test TestDescription

testMetrics

testFailed

public void testFailed (TestDescription test, 
                FailureDescription failure)

Tham số
test TestDescription

failure FailureDescription

testFailed

public void testFailed (TestDescription test, 
                String trace)

Tham số
test TestDescription

trace String

testIgnored

public void testIgnored (TestDescription test)

Tham số
test TestDescription

testLog

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

Tham số
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogSaved

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

Tham số
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

Tham số
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (FailureDescription failure)

Tham số
failure FailureDescription

testRunFailed

public void testRunFailed (String errorMessage)

Tham số
errorMessage String

testRunStarted

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

Tham số
name String

numTests int

attemptNumber int

testRunStarted

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

Tham số
name String

numTests int

attemptNumber int

startTime long

testStarted

public void testStarted (TestDescription test, 
                long startTime)

Tham số
test TestDescription

startTime long