ShardListener
public class ShardListener
extends CollectingTestListener
implements ISupportGranularResults
ITestInvocationListener
thu thập kết quả từ phân đoạn lệnh gọi (còn gọi là phân tách lệnh gọi để chạy song song trên nhiều tài nguyên) và chuyển tiếp chúng đến một trình nghe khác.
Bản tóm tắt
Phương pháp công khai |
---|
void | invocationEnded (long elapsedTime) |
void | invocationFailed (FailureDescription failure) |
void | invocationFailed (Throwable cause) |
void | invocationStarted (IInvocationContext context) |
void | setSupportGranularResults (boolean enableGranularResults) |
boolean | supportGranularResults () |
void | testLog (String dataName, LogDataType dataType, InputStreamSource dataStream) |
void | testLogSaved (String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile) |
void | testModuleEnded () |
void | testModuleStarted (IInvocationContext moduleContext) |
void | testRunEnded (long elapsedTime, runMetrics) testRunEnded (long elapsedTime, runMetrics) |
void | testRunFailed (FailureDescription failure) |
void | testRunFailed (String failureMessage) |
void | testRunStarted (String name, int numTests, int attemptNumber, long startTime) |
Nhà thầu xây dựng công cộng
ShardListener
public ShardListener (ITestInvocationListener main)
Tạo ShardListener
.
Thông số |
---|
main | ITestInvocationListener : ITestInvocationListener kết quả sẽ được chuyển tiếp. Để tránh xung đột với các ShardListener khác, đối tượng này sẽ đồng bộ hóa trên main khi chuyển tiếp kết quả. Và kết quả sẽ chỉ được gửi sau khi phân đoạn lệnh gọi hoàn tất. |
Phương pháp công khai
lời mờiĐã kết thúc
public void invocationEnded (long elapsedTime)
Thông số |
---|
elapsedTime | long |
lời gọi không thành công
public void invocationFailed (FailureDescription failure)
Thông số |
---|
failure | FailureDescription |
lời gọi không thành công
public void invocationFailed (Throwable cause)
lời gọiBắt đầu
public void invocationStarted (IInvocationContext context)
Thông số |
---|
context | IInvocationContext |
setSupportGranularResults
public void setSupportGranularResults (boolean enableGranularResults)
Thông số |
---|
enableGranularResults | boolean |
hỗ trợGranularKết quả
public boolean supportGranularResults ()
public void testLog (String dataName,
LogDataType dataType,
InputStreamSource dataStream)
Thông số |
---|
dataName | String |
dataType | LogDataType |
dataStream | InputStreamSource |
public void testLogSaved (String dataName,
LogDataType dataType,
InputStreamSource dataStream,
LogFile logFile)
Thông số |
---|
dataName | String |
dataType | LogDataType |
dataStream | InputStreamSource |
logFile | LogFile |
testModuleĐã kết thúc
public void testModuleEnded ()
testModuleBắt đầu
public void testModuleStarted (IInvocationContext moduleContext)
Thông số |
---|
moduleContext | IInvocationContext |
thử nghiệmChạyĐã kết thúc
public void testRunEnded (long elapsedTime,
runMetrics)
Thông số |
---|
elapsedTime | long |
runMetrics | |
thử nghiệm Chạy không thành công
public void testRunFailed (FailureDescription failure)
Thông số |
---|
failure | FailureDescription |
thử nghiệm Chạy không thành công
public void testRunFailed (String failureMessage)
Thông số |
---|
failureMessage | String |
thử nghiệmChạyBắt đầu
public void testRunStarted (String name,
int numTests,
int attemptNumber,
long startTime)
Thông số |
---|
name | String |
numTests | int |
attemptNumber | int |
startTime | long |