Kể từ ngày 27 tháng 3 năm 2025, bạn nên sử dụng android-latest-release
thay vì aosp-main
để xây dựng và đóng góp cho AOSP. Để biết thêm thông tin, hãy xem phần Thay đổi đối với AOSP.
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
ProtoResultReporter
public
abstract
class
ProtoResultReporter
extends Object
implements
ITestInvocationListener,
ILogSaverListener,
ISupportGranularResults
java.lang.Object
|
↳ |
com.android.tradefed.result.proto.ProtoResultReporter
|
Các lớp con trực tiếp đã biết
|
Trình báo cáo kết quả tạo một protobuf TestRecord
với tất cả kết quả bên trong. Nên được mở rộng để xử lý việc cần làm với proto cuối cùng trong processFinalProto(com.android.tradefed.result.proto.TestRecordProto.TestRecord)
.
Tóm tắt
Phương thức công khai |
final
void
|
invocationEnded(long elapsedTime)
|
void
|
invocationFailed(FailureDescription failure)
|
void
|
invocationFailed(Throwable cause)
|
final
void
|
invocationStarted(IInvocationContext context)
|
final
void
|
logAssociation(String dataName, LogFile logFile)
|
void
|
processFinalProto(TestRecordProto.TestRecord finalRecord)
Xử lý proto cuối cùng với tất cả kết quả.
|
void
|
processStartInvocation(TestRecordProto.TestRecord invocationStartRecord, IInvocationContext invocationContext)
Xử lý proto bản ghi kiểm thử lệnh gọi một phần sau khi invocationStarted(com.android.tradefed.invoker.IInvocationContext) xảy ra.
|
void
|
processTestCaseEnded(TestRecordProto.TestRecord testCaseRecord)
Xử lý proto bản ghi trường hợp kiểm thử đã hoàn tất sau khi ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, long, HashMap) xảy ra.
|
void
|
processTestCaseStarted(TestRecordProto.TestRecord testCaseStartedRecord)
Xử lý proto bản ghi trường hợp kiểm thử một phần sau khi testStarted(com.android.tradefed.result.TestDescription, long) xảy ra.
|
void
|
processTestModuleEnd(TestRecordProto.TestRecord moduleRecord)
Xử lý proto bản ghi mô-đun đã hoàn tất sau khi testModuleEnded() xảy ra.
|
void
|
processTestModuleStarted(TestRecordProto.TestRecord moduleStartRecord)
Xử lý proto bản ghi mô-đun một phần sau khi testModuleStarted(com.android.tradefed.invoker.IInvocationContext) xảy ra.
|
void
|
processTestRunEnded(TestRecordProto.TestRecord runRecord, boolean moduleInProgress)
Xử lý proto bản ghi chạy đã hoàn tất sau khi ITestLifeCycleReceiver.testRunEnded(long, HashMap) xảy ra.
|
void
|
processTestRunStarted(TestRecordProto.TestRecord runStartedRecord)
Xử lý proto bản ghi chạy kiểm thử một phần sau khi testRunStarted(String, int) xảy ra.
|
boolean
|
supportGranularResults()
|
final
void
|
testAssumptionFailure(TestDescription test, String trace)
|
final
void
|
testAssumptionFailure(TestDescription test, FailureDescription failure)
|
final
void
|
testEnded(TestDescription test, long endTime, testMetrics)
|
void
|
testEnded(TestDescription test, testMetrics)
|
final
void
|
testFailed(TestDescription test, FailureDescription failure)
|
final
void
|
testFailed(TestDescription test, String trace)
|
final
void
|
testIgnored(TestDescription test)
|
final
void
|
testModuleEnded()
|
final
void
|
testModuleStarted(IInvocationContext moduleContext)
|
final
void
|
testRunEnded(long elapsedTimeMillis, runMetrics)
|
final
void
|
testRunFailed(FailureDescription failure)
|
final
void
|
testRunFailed(String errorMessage)
|
void
|
testRunStarted(String runName, int testCount, int attemptNumber)
|
final
void
|
testRunStarted(String runName, int testCount)
|
void
|
testRunStarted(String runName, int testCount, int attemptNumber, long startTime)
|
final
void
|
testStarted(TestDescription test, long startTime)
|
final
void
|
testStarted(TestDescription test)
|
Phương thức được bảo vệ |
TestRecordProto.ChildReference
|
createModuleChildReference(TestRecordProto.TestRecord record)
Tạo tệp đối chiếu con cho một mô-đun.
|
Hàm khởi tạo công khai
ProtoResultReporter
public ProtoResultReporter ()
Phương thức công khai
invocationEnded
public final void invocationEnded (long elapsedTime)
invocationFailed
public void invocationFailed (FailureDescription failure)
Tham số |
failure |
FailureDescription |
invocationFailed
public void invocationFailed (Throwable cause)
invocationStarted
public final void invocationStarted (IInvocationContext context)
Tham số |
context |
IInvocationContext |
logAssociation
public final void logAssociation (String dataName,
LogFile logFile)
Tham số |
dataName |
String |
logFile |
LogFile |
processFinalProto
public void processFinalProto (TestRecordProto.TestRecord finalRecord)
Xử lý proto cuối cùng với tất cả kết quả.
Tham số |
finalRecord |
TestRecordProto.TestRecord : Tệp proto đã hoàn tất với tất cả kết quả gọi.
|
processStartInvocation
public void processStartInvocation (TestRecordProto.TestRecord invocationStartRecord,
IInvocationContext invocationContext)
Xử lý proto bản ghi kiểm thử lệnh gọi một phần sau khi invocationStarted(com.android.tradefed.invoker.IInvocationContext)
xảy ra.
Tham số |
invocationStartRecord |
TestRecordProto.TestRecord : Một phần proto được điền sau khi invocationStart. |
invocationContext |
IInvocationContext : Lệnh gọi IInvocationContext .
|
processTestCaseStarted
public void processTestCaseStarted (TestRecordProto.TestRecord testCaseStartedRecord)
Xử lý proto bản ghi trường hợp kiểm thử một phần sau khi testStarted(com.android.tradefed.result.TestDescription, long)
xảy ra.
Tham số |
testCaseStartedRecord |
TestRecordProto.TestRecord : Một phần proto đại diện cho trường hợp kiểm thử.
|
processTestModuleEnd
public void processTestModuleEnd (TestRecordProto.TestRecord moduleRecord)
Xử lý proto bản ghi mô-đun đã hoàn tất sau khi testModuleEnded()
xảy ra.
Tham số |
moduleRecord |
TestRecordProto.TestRecord : Tệp proto đã hoàn thiện đại diện cho mô-đun.
|
processTestRunEnded
public void processTestRunEnded (TestRecordProto.TestRecord runRecord,
boolean moduleInProgress)
Xử lý proto bản ghi chạy đã hoàn tất sau khi ITestLifeCycleReceiver.testRunEnded(long, HashMap)
xảy ra.
Tham số |
runRecord |
TestRecordProto.TestRecord : Tệp proto đã hoàn tất đại diện cho lần chạy. |
moduleInProgress |
boolean : liệu một mô-đun có đang hoạt động hay không.
|
processTestRunStarted
public void processTestRunStarted (TestRecordProto.TestRecord runStartedRecord)
Xử lý proto bản ghi chạy kiểm thử một phần sau khi testRunStarted(String, int)
xảy ra.
Tham số |
runStartedRecord |
TestRecordProto.TestRecord : Một phần proto đại diện cho lần chạy.
|
supportGranularResults
public boolean supportGranularResults ()
testAssumptionFailure
public final void testAssumptionFailure (TestDescription test,
String trace)
Tham số |
test |
TestDescription |
trace |
String |
testAssumptionFailure
public final void testAssumptionFailure (TestDescription test,
FailureDescription failure)
Tham số |
test |
TestDescription |
failure |
FailureDescription |
testEnded
public final 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 final void testFailed (TestDescription test,
FailureDescription failure)
Tham số |
test |
TestDescription |
failure |
FailureDescription |
testFailed
public final void testFailed (TestDescription test,
String trace)
Tham số |
test |
TestDescription |
trace |
String |
testIgnored
public final void testIgnored (TestDescription test)
Tham số |
test |
TestDescription |
testModuleEnded
public final void testModuleEnded ()
testModuleStarted
public final void testModuleStarted (IInvocationContext moduleContext)
Tham số |
moduleContext |
IInvocationContext |
testRunEnded
public final void testRunEnded (long elapsedTimeMillis,
runMetrics)
Tham số |
elapsedTimeMillis |
long |
runMetrics |
|
testRunFailed
public final void testRunFailed (FailureDescription failure)
Tham số |
failure |
FailureDescription |
testRunFailed
public final void testRunFailed (String errorMessage)
Tham số |
errorMessage |
String |
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber)
Tham số |
runName |
String |
testCount |
int |
attemptNumber |
int |
testRunStarted
public final void testRunStarted (String runName,
int testCount)
Tham số |
runName |
String |
testCount |
int |
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber,
long startTime)
Tham số |
runName |
String |
testCount |
int |
attemptNumber |
int |
startTime |
long |
testStarted
public final void testStarted (TestDescription test,
long startTime)
Tham số |
test |
TestDescription |
startTime |
long |
testStarted
public final void testStarted (TestDescription test)
Tham số |
test |
TestDescription |
Phương thức được bảo vệ
createModuleChildReference
protected TestRecordProto.ChildReference createModuleChildReference (TestRecordProto.TestRecord record)
Tạo tệp đối chiếu con cho một mô-đun.
Tham số |
record |
TestRecordProto.TestRecord |
Trả về |
TestRecordProto.ChildReference |
|
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-03-26 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-03-26 UTC."],[],[]]