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:嘗試的 Shard 數量。

testInfo TestInformation:父項 TestInformation

傳回
要個別執行的子測試集合,或測試目前無法分片時的 null

拆分

public  split ()

將測試分成可獨立執行的區塊。

這項作業必須是確定性作業,且針對相同輸入內容一律會傳回相同的 IRemoteTest 清單。

這會在執行測試前呼叫,因此插入的依附元件 (例如 IDeviceTestITestDevice) 可能為空值。

傳回
要個別執行的子測試集合,或測試目前無法分片時的 null

拆分

public  split (int shardCountHint)

split() 的替代版本,也會提供嘗試執行的 shardCount。這項功能適用於有時無法任意決定的測試執行器。

參數
shardCountHint int:嘗試的 Shard 數量。

傳回
要個別執行的子測試集合,或 null 如果測試目前無法分片