套件测试过滤器
public class SuiteTestFilter
extends Object
java.lang.Object | |
↳ | com.android.tradefed.testtype.suite.SuiteTestFilter |
表示用于包含和排除测试的过滤器。
概括
公共构造函数 | |
---|---|
SuiteTestFilter (String abi, String name, String test) 从给定的部分创建一个新的 | |
SuiteTestFilter (Integer shardIndex, String abi, String name, String test) 从给定的部分创建一个新的 |
公共方法 | |
---|---|
static SuiteTestFilter | createFrom (String filter) 从给定的字符串构建一个新的 |
boolean | equals (Object obj) |
String | getAbi () |
String | getBaseName () 返回没有任何参数化的模块的基本名称。 |
String | getName () |
String | getParameterName () 如果模块被参数化,则返回参数值。 |
Integer | getShardIndex () 返回测试的分片索引,如果未指定则返回 null。 |
String | getTest () |
int | hashCode () |
String | toString () 返回此过滤器的字符串表示形式。 |
公共构造函数
套件测试过滤器
public SuiteTestFilter (String abi, String name, String test)
从给定的部分创建一个新的SuiteTestFilter
。
参数 | |
---|---|
abi | String :必须支持 ABI AbiUtils#isAbiSupportedByCompatibility(String) |
name | String :模块的名称 |
test | String : 测试的标识符,例如 |
套件测试过滤器
public SuiteTestFilter (Integer shardIndex, String abi, String name, String test)
从给定的部分创建一个新的SuiteTestFilter
。
参数 | |
---|---|
shardIndex | Integer |
abi | String :必须支持 ABI AbiUtils#isAbiSupportedByCompatibility(String) |
name | String :模块的名称 |
test | String : 测试的标识符,例如 |
公共方法
创建自
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",测试=“测试...”
测试标识符可以包含多个部分,例如参数化测试。
参数 | |
---|---|
filter | String : 要解析的过滤器 |
退货 | |
---|---|
SuiteTestFilter | SuiteTestFilter |
等于
public boolean equals (Object obj)
参数 | |
---|---|
obj | Object |
退货 | |
---|---|
boolean |
得到阿比
public String getAbi ()
退货 | |
---|---|
String | 此过滤器的 abi,如果未指定则为 null。 |
获取名称
public String getName ()
退货 | |
---|---|
String | 此过滤器的模块名称,如果未指定,则为 null。 |
获取参数名称
public String getParameterName ()
如果模块被参数化,则返回参数值。如果未参数化则为空。
退货 | |
---|---|
String |
获取ShardIndex
public Integer getShardIndex ()
返回测试的分片索引,如果未指定则返回 null。
退货 | |
---|---|
Integer |
得到测试
public String getTest ()
退货 | |
---|---|
String | 此过滤器的测试标识符,如果未指定则为 null。 |
哈希码
public int hashCode ()
退货 | |
---|---|
int |
到字符串
public String toString ()
返回此过滤器的字符串表示形式。这个函数是createFrom(String)
的逆函数。
对于有效的过滤器 f;
new TestFilter(f).toString().equals(f)
退货 | |
---|---|
String |