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

SuiteTestFilter(String abi, String name, String test)

根据给定的部分创建新的 SuiteTestFilter

公共方法

static SuiteTestFilter createFrom(String filter)

根据给定的字符串构建新的 SuiteTestFilter

boolean equals(Object obj)
String getAbi()
String getBaseName()

返回模块的基本名称,不带任何参数化。

String getModuleId()
String getName()
String getParameterName()

如果模块已参数化,则返回参数值。

Integer getShardIndex()

返回测试的分片索引,如果未指定,则返回 null。

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:测试的标识符,例如 .#

SuiteTestFilter

public SuiteTestFilter (String abi, 
                String name, 
                String test)

根据给定的部分创建新的 SuiteTestFilter

参数
abi String:ABI 必须受支持 AbiUtils.isAbiSupportedByCompatibility(String)

name String:模块的名称

test String:测试的标识符,例如 .#

公共方法

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..."

测试标识符可以包含多个部分,例如参数化测试。

参数
filter String:要解析的过滤条件

返回
SuiteTestFilter SuiteTestFilter

equals

public boolean equals (Object obj)

参数
obj Object

返回
boolean

getAbi

public String getAbi ()

返回
String 此过滤条件的 ABI,如果未指定,则返回 null。

getBaseName

public String getBaseName ()

返回模块的基本名称,不带任何参数化。如果未参数化,它 将返回 getName()

返回
String

getModuleId

public String getModuleId ()

返回
String

getName

public String getName ()

返回
String 此过滤条件的模块名称,如果未指定,则返回 null。

getParameterName

public String getParameterName ()

如果模块已参数化,则返回参数值。如果未参数化,则返回 null。

返回
String

getShardIndex

public Integer getShardIndex ()

返回测试的分片索引,如果未指定,则返回 null。

返回
Integer

getTest

public String getTest ()

返回
String 此过滤条件的测试标识符,如果未指定,则返回 null。

hashCode

public int hashCode ()

返回
int

toString

public String toString ()

返回此过滤条件的字符串表示法。此函数是 SuiteTestFilter.createFrom(String) 的逆函数。

对于有效的过滤条件 f;

new TestFilter(f).toString().equals(f)
 

返回
String