IShardable測試

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。

退貨
要單獨執行的子測試集合,如果測試目前不可分片,則為null

分裂

public  split (int shardCountHint)

split()的替代版本還提供嘗試運行的 shardCount。這對於某些有時無法隨意決定的測試運行者很有用。

參數
shardCountHint int :嘗試的分片計數。

退貨
要單獨執行的子測試集合,如果測試目前不可分片,則為null