自 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(实现 ITestFilterReceiver 的测试)可以接受测试用例的许可名单,并仅运行这些测试用例。此类利用了现有功能,并提供了一种更灵活的运行测试套件的方式。
- 单个测试用例可以重试多次(在同一 IRemoteTest 运行中),以降低非测试错误失败率。
- 重新尝试的测试用例是从之前的运行失败中动态收集的。
注意:
摘要
公共构造函数 |
GranularRetriableTestWrapper(IRemoteTest test, ITestInvocationListener mainListener, int maxRunLimit)
|
GranularRetriableTestWrapper(IRemoteTest test, ModuleDefinition module, ITestInvocationListener mainListener, int maxRunLimit)
|
GranularRetriableTestWrapper(IRemoteTest test, ModuleDefinition module, ITestInvocationListener mainListener, int maxRunLimit, boolean useModuleResultsForwarder, boolean removeModuleBuffering, int targetPreparerRetryCount)
|
公共构造函数
GranularRetriableTestWrapper
public GranularRetriableTestWrapper (IRemoteTest test,
ITestInvocationListener mainListener,
int maxRunLimit)
| 参数 |
test |
IRemoteTest |
mainListener |
ITestInvocationListener |
maxRunLimit |
int |
GranularRetriableTestWrapper
public GranularRetriableTestWrapper (IRemoteTest test,
ModuleDefinition module,
ITestInvocationListener mainListener,
int maxRunLimit)
| 参数 |
test |
IRemoteTest |
module |
ModuleDefinition |
mainListener |
ITestInvocationListener |
maxRunLimit |
int |
GranularRetriableTestWrapper
public GranularRetriableTestWrapper (IRemoteTest test,
ModuleDefinition module,
ITestInvocationListener mainListener,
int maxRunLimit,
boolean useModuleResultsForwarder,
boolean removeModuleBuffering,
int targetPreparerRetryCount)
| 参数 |
test |
IRemoteTest |
module |
ModuleDefinition |
mainListener |
ITestInvocationListener |
maxRunLimit |
int |
useModuleResultsForwarder |
boolean |
removeModuleBuffering |
boolean |
targetPreparerRetryCount |
int |
公共方法
getExpectedTestsCount
public final int getExpectedTestsCount ()
计算 IRemoteTest 中的测试用例数量。此值用于区分多次重新调度的相同测试用例。
getFinalTestRunResults
public final getFinalTestRunResults ()
从每次 IRemoteTest 运行中获取合并的 TestRunResults。
getPassedTests
public final getPassedTests ()
getResultListener
public ModuleListener getResultListener ()
返回包含所有结果的监听器。
getRetryCount
public int getRetryCount ()
setCollectTestsOnly
public void setCollectTestsOnly (boolean shouldCollectTest)
启用或停用测试收集模式
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-12-04。
[[["易于理解","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-12-04。"],[],[]]