自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
ProtoResultReporter
public
abstract
class
ProtoResultReporter
extends Object
implements
ITestInvocationListener,
ILogSaverListener,
ISupportGranularResults
java.lang.Object
|
↳ |
com.android.tradefed.result.proto.ProtoResultReporter
|
結果回報器會建構 TestRecord
protobuf,其中包含所有結果。應擴充以處理如何處理 processFinalProto(com.android.tradefed.result.proto.TestRecordProto.TestRecord)
中的最終 Proto。
摘要
公用方法 |
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)
處理含有所有結果的最終 Proto。
|
void
|
processStartInvocation(TestRecordProto.TestRecord invocationStartRecord, IInvocationContext invocationContext)
在發生 invocationStarted(com.android.tradefed.invoker.IInvocationContext) 後,處理部分叫用測試記錄的 proto。
|
void
|
processTestCaseEnded(TestRecordProto.TestRecord testCaseRecord)
在發生 ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, long, HashMap) 後,處理已定案的測試案例記錄 proto。
|
void
|
processTestCaseStarted(TestRecordProto.TestRecord testCaseStartedRecord)
在發生 testStarted(com.android.tradefed.result.TestDescription, long) 後,處理部分測試案例記錄的 proto。
|
void
|
processTestModuleEnd(TestRecordProto.TestRecord moduleRecord)
在發生 testModuleEnded() 後,處理已定義的模組記錄 proto。
|
void
|
processTestModuleStarted(TestRecordProto.TestRecord moduleStartRecord)
在發生 testModuleStarted(com.android.tradefed.invoker.IInvocationContext) 後,處理部分模組記錄 proto。
|
void
|
processTestRunEnded(TestRecordProto.TestRecord runRecord, boolean moduleInProgress)
在 ITestLifeCycleReceiver.testRunEnded(long, HashMap) 發生後,處理已定案的執行記錄 proto。
|
void
|
processTestRunStarted(TestRecordProto.TestRecord runStartedRecord)
在 testRunStarted(String, int) 發生後,處理部分測試執行記錄的 proto。
|
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)
|
公用建構函式
ProtoResultReporter
public ProtoResultReporter ()
公用方法
invocationEnded
public final void invocationEnded (long elapsedTime)
invocationFailed
public void invocationFailed (FailureDescription failure)
參數 |
failure |
FailureDescription |
invocationFailed
public void invocationFailed (Throwable cause)
invocationStarted
public final void invocationStarted (IInvocationContext context)
參數 |
context |
IInvocationContext |
logAssociation
public final void logAssociation (String dataName,
LogFile logFile)
參數 |
dataName |
String |
logFile |
LogFile |
processFinalProto
public void processFinalProto (TestRecordProto.TestRecord finalRecord)
處理含有所有結果的最終 Proto。
參數 |
finalRecord |
TestRecordProto.TestRecord :包含所有叫用結果的最終版 proto。 |
processTestModuleEnd
public void processTestModuleEnd (TestRecordProto.TestRecord moduleRecord)
在發生 testModuleEnded()
後,處理已定義的模組記錄 proto。
參數 |
moduleRecord |
TestRecordProto.TestRecord :代表模組的最終版 proto。 |
processTestRunEnded
public void processTestRunEnded (TestRecordProto.TestRecord runRecord,
boolean moduleInProgress)
在 ITestLifeCycleReceiver.testRunEnded(long, HashMap)
發生後,處理已定案的執行記錄 proto。
參數 |
runRecord |
TestRecordProto.TestRecord :代表執行作業的最終版 proto。 |
moduleInProgress |
boolean :模組是否正在執行。 |
processTestRunStarted
public void processTestRunStarted (TestRecordProto.TestRecord runStartedRecord)
在 testRunStarted(String, int)
發生後,處理部分測試執行記錄的 proto。
參數 |
runStartedRecord |
TestRecordProto.TestRecord :代表執行作業的部分 Proto。 |
supportGranularResults
public boolean supportGranularResults ()
testAssumptionFailure
public final void testAssumptionFailure (TestDescription test,
String trace)
參數 |
test |
TestDescription |
trace |
String |
testAssumptionFailure
public final void testAssumptionFailure (TestDescription test,
FailureDescription failure)
參數 |
test |
TestDescription |
failure |
FailureDescription |
testEnded
public final void testEnded (TestDescription test,
long endTime,
testMetrics)
參數 |
test |
TestDescription |
endTime |
long |
testMetrics |
|
testEnded
public void testEnded (TestDescription test,
testMetrics)
參數 |
test |
TestDescription |
testMetrics |
|
testFailed
public final void testFailed (TestDescription test,
FailureDescription failure)
參數 |
test |
TestDescription |
failure |
FailureDescription |
testFailed
public final void testFailed (TestDescription test,
String trace)
參數 |
test |
TestDescription |
trace |
String |
testIgnored
public final void testIgnored (TestDescription test)
testModuleEnded
public final void testModuleEnded ()
testModuleStarted
public final void testModuleStarted (IInvocationContext moduleContext)
參數 |
moduleContext |
IInvocationContext |
testRunEnded
public final void testRunEnded (long elapsedTimeMillis,
runMetrics)
參數 |
elapsedTimeMillis |
long |
runMetrics |
|
testRunFailed
public final void testRunFailed (FailureDescription failure)
參數 |
failure |
FailureDescription |
testRunFailed
public final void testRunFailed (String errorMessage)
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber)
參數 |
runName |
String |
testCount |
int |
attemptNumber |
int |
testRunStarted
public final void testRunStarted (String runName,
int testCount)
參數 |
runName |
String |
testCount |
int |
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber,
long startTime)
參數 |
runName |
String |
testCount |
int |
attemptNumber |
int |
startTime |
long |
testStarted
public final void testStarted (TestDescription test,
long startTime)
參數 |
test |
TestDescription |
startTime |
long |
testStarted
public final void testStarted (TestDescription test)
受保護的方法
createModuleChildReference
protected TestRecordProto.ChildReference createModuleChildReference (TestRecordProto.TestRecord record)
為模組建立子項參照。
參數 |
record |
TestRecordProto.TestRecord |
傳回 |
TestRecordProto.ChildReference |
|
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-03-26 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-03-26 (世界標準時間)。"],[],[]]