IShardable测试
public interface IShardableTest
implements IRemoteTest
com.android.tradefed.testtype.IShardableTest |
可以拆分为单独可执行的子测试的IRemoteTest
。划分为子测试应该是确定性的,并且每个子测试应该是独立的,以便允许在不同主机上执行不同的分片。
概括
公共方法 | |
---|---|
default | split (Integer shardCountHint, TestInformation testInfo) |
default | split () 将测试分成单独可运行的块。 |
default | split (int shardCountHint) |
公共方法
分裂
publicsplit (Integer shardCountHint, TestInformation testInfo)
split(int)
的替代版本还提供TestInformation
,其中包含来自创建分片的父级的早期信息。如果在分片期间需要访问设备或构建信息等内容,那么它非常有用。
参数 | |
---|---|
shardCountHint | Integer :尝试的分片计数。 |
testInfo | TestInformation :父TestInformation |
退货 | |
---|---|
要单独执行的子测试的集合,如果测试当前不可分片,则为null |
分裂
publicsplit ()
将测试分成单独可运行的块。
这必须是确定性的,并且对于相同的输入始终返回相同的IRemoteTest
列表。
这将在测试执行之前调用,因此注入的依赖项(例如IDeviceTest
的ITestDevice
)可能为 null。
退货 | |
---|---|
要单独执行的子测试的集合,如果测试当前不可分片,则为null |
分裂
publicsplit (int shardCountHint)
split()
的替代版本还提供尝试运行的 shardCount。这对于某些有时无法随意决定的测试运行者很有用。
参数 | |
---|---|
shardCountHint | int :尝试的分片计数。 |
退货 | |
---|---|
要单独执行的子测试的集合,如果测试当前不可分片,则为null |