IShardableTest
public
interface
IShardableTest
implements
IRemoteTest
| com.android.tradefed.testtype.IShardableTest |
可分割為可單獨執行的子測試的 IRemoteTest。分割成子測試的做法應為確定性的,且每個子測試都應獨立執行,以便在不同主機上執行不同的分割區。
摘要
公用方法 | |
|---|---|
default
|
split(Integer shardCountHint, TestInformation testInfo)
|
default
|
split()
將測試分割成可個別執行的區塊。 |
default
|
split(int shardCountHint)
|
公用方法
拆分
publicsplit (Integer shardCountHint, TestInformation testInfo)
split(int) 的替代版本,也提供 TestInformation,其中包含建立分片的父項的早期資訊。如果在分割期間需要存取裝置或版本資訊,這項功能就很實用。
| 參數 | |
|---|---|
shardCountHint |
Integer:嘗試的分割區數量。 |
testInfo |
TestInformation:父項 TestInformation |
| 傳回 | |
|---|---|
|
要個別執行的子測試集合,或如果測試目前無法分割,則為 null |
拆分
publicsplit ()
將測試分割成可個別執行的區塊。
這必須具有確定性,並且一律會針對相同的輸入內容傳回相同的 IRemoteTest 清單。
這個方法會在測試執行前呼叫,因此注入的依附元件 (例如 IDeviceTest 的 ITestDevice) 可能為空值。
| 傳回 | |
|---|---|
|
要個別執行的子測試集合,或如果測試目前無法分割,則為 null |
拆分
publicsplit (int shardCountHint)
split() 的替代版本,同時提供嘗試執行的區塊計數。這對某些無法隨意決定的測試執行程式相當實用。
| 參數 | |
|---|---|
shardCountHint |
int:嘗試的分割區數量。 |
| 傳回 | |
|---|---|
|
要個別執行的子測試集合,或如果測試目前無法分割,則為 null |