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() 的替代版本,还提供尝试运行的分片数量。

公共方法

分解

public  split (Integer shardCountHint, 
                TestInformation testInfo)

split(int) 的替代版本,还提供一个 TestInformation,其中包含创建分片的父级的早期信息。如果需要在分片期间访问设备或 build 信息等内容,此方法会很有用。

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

testInfo TestInformation:父级 TestInformation

返回
要单独执行的一组子测试,如果测试目前不可分片,则为 null

分解

public  split ()

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

此方法必须是确定性的,并且对于相同的输入,始终返回相同的 IRemoteTest 列表。

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

返回
要单独执行的一组子测试,如果测试目前不可分片,则为 null

分解

public  split (int shardCountHint)

split() 的替代版本,还提供尝试运行的分片数量。这对于有时无法任意做出决定的一些测试运行程序非常有用。

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

返回
要单独执行的一组子测试,如果测试目前不可分片,则为 null