IShardableTest

public interface IShardableTest
implements IRemoteTest

com.android.tradefed.testtype.IShardableTest


可以拆分为单独的可执行子测试的IRemoteTest 。分成子测试应该是确定性的,每个子测试应该是独立的,以便允许在不同的主机上执行不同的分片。

概括

公共方法

default split (Integer shardCountHint, TestInformation testInfo)

split(int)的替代版本,它还提供了一个TestInformation ,其中包含来自创建分片的父级的早期信息。

default split ()

将测试分成单独的可运行块。

default split (int shardCountHint)

split()的替代版本,它还提供尝试运行的 shardCount。

公共方法

分裂

public  split (Integer shardCountHint, 
                TestInformation testInfo)

split(int)的替代版本,它还提供了一个TestInformation ,其中包含来自创建分片的父级的早期信息。如果在分片期间需要访问诸如设备或构建信息之类的东西,这将很有用。

参数
shardCountHint Integer :尝试的分片数。

testInfo TestInformation :父TestInformation

退货
要单独执行的子测试的集合,如果测试当前不可分片则为null

分裂

public  split ()

将测试分成单独的可运行块。

这必须是确定性的,并且始终为相同的输入返回相同的IRemoteTest列表。

这将在测试执行之前调用,因此注入的依赖项(例如IDeviceTestITestDevice )可能为空。

退货
要单独执行的子测试的集合,如果测试当前不可分片则为null

分裂

public  split (int shardCountHint)

split()的替代版本,它还提供尝试运行的 shardCount。这对于一些有时不能随意决定的测试运行器很有用。

参数
shardCountHint int :尝试的分片数。

退货
要单独执行的子测试的集合,如果测试当前不可分片则为null