SuiteTestFilter
public
class
SuiteTestFilter
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.testtype.suite.SuiteTestFilter |
代表用於納入及排除測試的篩選器。
摘要
公用建構函式 | |
|---|---|
SuiteTestFilter(Integer shardIndex, String abi, String name, String test)
根據指定的部分建立新的 |
|
SuiteTestFilter(String abi, String name, String test)
根據指定的部分建立新的 |
|
公用方法 | |
|---|---|
static
SuiteTestFilter
|
createFrom(String filter)
使用指定字串建構新的 |
boolean
|
equals(Object obj)
|
String
|
getAbi()
|
String
|
getBaseName()
傳回模組的基本名稱,不含任何參數化。 |
String
|
getModuleId()
|
String
|
getName()
|
String
|
getParameterName()
如果模組已參數化,則會傳回參數值。 |
Integer
|
getShardIndex()
傳回測試的分片索引,如果未指定,則傳回空值。 |
String
|
getTest()
|
int
|
hashCode()
|
String
|
toString()
傳回此篩選器的字串表示法。 |
公用建構函式
SuiteTestFilter
public SuiteTestFilter (Integer shardIndex,
String abi,
String name,
String test)使用指定的部分建立新的 SuiteTestFilter。
| 參數 | |
|---|---|
shardIndex |
Integer |
abi |
String:ABI 必須支援 AbiUtils.isAbiSupportedByCompatibility(String) |
name |
String:模組名稱 |
test |
String:測試的 ID,例如 |
SuiteTestFilter
public SuiteTestFilter (String abi,
String name,
String test)使用指定的部分建立新的 SuiteTestFilter。
| 參數 | |
|---|---|
abi |
String:ABI 必須支援 AbiUtils.isAbiSupportedByCompatibility(String) |
name |
String:模組名稱 |
test |
String:測試的 ID,例如 |
公用方法
createFrom
public static SuiteTestFilter createFrom (String filter)
使用指定字串建立新的 SuiteTestFilter。篩選器可採用四種格式之一,執行個體會以以下格式初始化:-"name" -> abi = null, name = "name", test = null
-"name" "test..." -> abi = null, name = "name", test = "test..." -"abi" "name" -> abi =
"abi", name = "name", test = null -"abi" "name" "test..." -> abi = "abi", name = "name", test
= "test..."
測試 ID 可包含多個部分,例如參數化測試。
| 參數 | |
|---|---|
filter |
String:要剖析的篩選器 |
| 傳回 | |
|---|---|
SuiteTestFilter |
SuiteTestFilter |
等於
public boolean equals (Object obj)
| 參數 | |
|---|---|
obj |
Object |
| 傳回 | |
|---|---|
boolean |
|
getAbi
public String getAbi ()
| 傳回 | |
|---|---|
String |
這個篩選器的 ABI,如果未指定,則為 null。 |
getModuleId
public String getModuleId ()
| 傳回 | |
|---|---|
String |
|
getName
public String getName ()
| 傳回 | |
|---|---|
String |
這個篩選器的模組名稱,如果未指定,則為 null。 |
getParameterName
public String getParameterName ()
如果模組是參數化模組,則會傳回參數值。如果未指定參數,則為空值。
| 傳回 | |
|---|---|
String |
|
getShardIndex
public Integer getShardIndex ()
傳回測試的區塊索引,如果未指定,則傳回空值。
| 傳回 | |
|---|---|
Integer |
|
getTest
public String getTest ()
| 傳回 | |
|---|---|
String |
此篩選器的測試 ID,如果未指定,則為 null。 |
hashCode
public int hashCode ()
| 傳回 | |
|---|---|
int |
|
toString
public String toString ()
傳回此篩選器的字串表示法。這個函式是 createFrom(String) 的反函式。
針對有效的篩選器 f;
new TestFilter(f).toString().equals(f)
| 傳回 | |
|---|---|
String |
|