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