IShardableTest
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
列表。
这将在测试执行之前被调用,因此注入的依赖项(例如ITestDevice
for IDeviceTest
)可能为null。
退货 | |
---|---|
要单独执行的子测试的集合;如果测试当前不可分割,则返回null |
分裂
publicsplit (int shardCountHint)
split()
替代版本,它也提供尝试运行的shardCount。这对于某些有时无法任意决定的测试跑步者很有用。
参量 | |
---|---|
shardCountHint | int :尝试的分片计数。 |
退货 | |
---|---|
要单独执行的子测试的集合;如果测试当前不可分割,则返回null |