NameMangleListener
public
abstract
class
NameMangleListener
extends Object
implements
ITestInvocationListener
java.lang.Object | |
↳ | com.android.tradefed.result.NameMangleListener |
Trình nghe proxy để dịch tên phương thức, lớp và gói kiểm thử khi kết quả được báo cáo.
Tóm tắt
Hàm khởi tạo công khai | |
---|---|
NameMangleListener(ITestInvocationListener listener)
|
Phương thức công khai | |
---|---|
TestSummary
|
getSummary()
|
void
|
invocationEnded(long elapsedTime)
|
void
|
invocationFailed(Throwable cause)
|
void
|
invocationStarted(IInvocationContext context)
|
void
|
testAssumptionFailure(TestDescription test, String trace)
|
void
|
testEnded(TestDescription test,
|
void
|
testFailed(TestDescription test, String trace)
|
void
|
testIgnored(TestDescription test)
|
void
|
testLog(String dataName, LogDataType dataType, InputStreamSource dataStream)
|
void
|
testRunEnded(long elapsedTime,
|
void
|
testRunFailed(String errorMessage)
|
void
|
testRunStarted(String runName, int testCount)
|
void
|
testRunStopped(long elapsedTime)
|
void
|
testStarted(TestDescription test)
|
Phương thức được bảo vệ | |
---|---|
TestDescription
|
mangleTestId(TestDescription test)
Phương thức này được chạy trên tất cả |
String
|
mangleTestRunName(String name)
Phương thức này được chạy trên tất cả tên chạy kiểm thử được truyền đến lệnh gọi lại |
Hàm khởi tạo công khai
NameMangleListener
public NameMangleListener (ITestInvocationListener listener)
Tham số | |
---|---|
listener |
ITestInvocationListener |
Phương thức công khai
getSummary
public TestSummary getSummary ()
Giá trị trả về | |
---|---|
TestSummary |
invocationEnded
public void invocationEnded (long elapsedTime)
Tham số | |
---|---|
elapsedTime |
long |
invocationFailed
public void invocationFailed (Throwable cause)
Tham số | |
---|---|
cause |
Throwable |
invocationStarted
public void invocationStarted (IInvocationContext context)
Tham số | |
---|---|
context |
IInvocationContext |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, String trace)
Tham số | |
---|---|
test |
TestDescription |
trace |
String |
testEnded
public void testEnded (TestDescription test,testMetrics)
Tham số | |
---|---|
test |
TestDescription |
testMetrics |
|
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 |
testRunEnded
public void testRunEnded (long elapsedTime,runMetrics)
Tham số | |
---|---|
elapsedTime |
long |
runMetrics |
|
testRunFailed
public void testRunFailed (String errorMessage)
Tham số | |
---|---|
errorMessage |
String |
testRunStarted
public void testRunStarted (String runName, int testCount)
Tham số | |
---|---|
runName |
String |
testCount |
int |
testRunStopped
public void testRunStopped (long elapsedTime)
Tham số | |
---|---|
elapsedTime |
long |
testStarted
public void testStarted (TestDescription test)
Tham số | |
---|---|
test |
TestDescription |
Phương thức được bảo vệ
mangleTestId
protected TestDescription mangleTestId (TestDescription test)
Phương thức này được chạy trên tất cả TestDescription
được truyền đến lệnh gọi lại testStarted(com.android.tradefed.result.TestDescription)
, testFailed(com.android.tradefed.result.TestDescription, String)
và ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap)
. Phương thức này sẽ trả về một TestDescription
có thể khác sẽ được truyền đến ITestInvocationListener
hạ nguồn đã được chỉ định trong quá trình tạo.
Bạn cần cẩn thận khi triển khai để không sửa đổi TestDescription
ban đầu.
Cách triển khai mặc định sẽ chuyển giá trị nhận dạng đến mà không sửa đổi.
Tham số | |
---|---|
test |
TestDescription |
Giá trị trả về | |
---|---|
TestDescription |
mangleTestRunName
protected String mangleTestRunName (String name)
Phương thức này được chạy trên tất cả tên chạy kiểm thử được truyền đến lệnh gọi lại testRunStarted(String, int)
. Phương thức này sẽ trả về một tên chạy kiểm thử có thể khác sẽ được truyền đến ITestInvocationListener
hạ nguồn đã được chỉ định trong quá trình tạo.
Bạn cần cẩn thận khi triển khai để không sửa đổi tên chạy ban đầu.
Phương thức triển khai mặc định sẽ truyền tên lần chạy kiểm thử sắp tới mà không sửa đổi.
Tham số | |
---|---|
name |
String |
Trả về | |
---|---|
String |