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