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()
      
      
        返回测试的分片编号,如果未指定,则返回 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。 | 
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 ()
返回此过滤器的字符串表示法。此函数是 createFrom(String) 的反函数。
 
对于有效的过滤器 f;
new TestFilter(f).toString().equals(f)
 | 返回 | |
|---|---|
String | 
        |