自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
GranularRetriableTestWrapper
public
class
GranularRetriableTestWrapper
extends Object
implements
IRemoteTest,
ITestCollector
java.lang.Object
|
↳ |
com.android.tradefed.testtype.suite.GranularRetriableTestWrapper
|
封装容器类在 IRemoteTest
上运行,以便在测试用例级别细分 IRemoteTest。IRemoteTest 可以包含多个测试用例。以前,这些测试用例被视为一个整体:当 IRemoteTest 运行时,所有测试用例都会运行。某些 IRemoteTest(实现了 ITestFilterReceiver 的 IRemoteTest)可以接受测试用例的许可名单,并且仅运行这些测试用例。此类利用现有功能,并提供了更灵活的测试套件运行方式。
- 单个测试用例可重试多次(在同一 IRemoteTest 运行中),以降低非测试错误失败率。
- 系统会从之前运行失败的测试中动态收集要重试的测试用例。
注意:
摘要
公共构造函数
GranularRetriableTestWrapper
public GranularRetriableTestWrapper (IRemoteTest test,
ITestInvocationListener mainListener,
moduleLevelListeners,
int maxRunLimit)
参数 |
test |
IRemoteTest |
mainListener |
ITestInvocationListener |
moduleLevelListeners |
|
maxRunLimit |
int |
GranularRetriableTestWrapper
public GranularRetriableTestWrapper (IRemoteTest test,
ModuleDefinition module,
ITestInvocationListener mainListener,
moduleLevelListeners,
int maxRunLimit)
参数 |
test |
IRemoteTest |
module |
ModuleDefinition |
mainListener |
ITestInvocationListener |
moduleLevelListeners |
|
maxRunLimit |
int |
公共方法
getExpectedTestsCount
public final int getExpectedTestsCount ()
计算 IRemoteTest
中的测试用例数量。此值用于区分多次重新调度的同一测试用例。
getFinalTestRunResults
public final getFinalTestRunResults ()
从每次 IRemoteTest
运行中获取合并的 TestRunResult。
getPassedTests
public final getPassedTests ()
getResultListener
public ModuleListener getResultListener ()
返回包含所有结果的监听器。
getRetryCount
public int getRetryCount ()
setCollectTestsOnly
public void setCollectTestsOnly (boolean shouldCollectTest)
启用或停用测试集合模式
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):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"]],["最后更新时间 (UTC):2025-03-26。"],[],[]]