SuiteTestFilter

public class SuiteTestFilter
extends Object

java.lang.Object
   ↳ com.android.tradefed.testtype.suite.SuiteTestFilter


Represents a filter for including and excluding tests.

Summary

Public constructors

SuiteTestFilter(String abi, String name, String test)

Creates a new SuiteTestFilter from the given parts.

Public methods

static SuiteTestFilter createFrom(String filter)

Builds a new SuiteTestFilter from the given string.

String getAbi()
String getName()
String getTest()
String toString()

Returns a String representation of this filter.

Public constructors

SuiteTestFilter

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

Creates a new SuiteTestFilter from the given parts.

Parameters
abi String: The ABI must be supported AbiUtils.isAbiSupportedByCompatibility(String)

name String: The module's name

test String: The test's identifier eg .#

Public methods

createFrom

public static SuiteTestFilter createFrom (String filter)

Builds a new SuiteTestFilter from the given string. Filters can be in one of four forms, the instance will be initialized as; -"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..."

Test identifier can contain multiple parts, eg parameterized tests.

Parameters
filter String: the filter to parse

Returns
SuiteTestFilter the SuiteTestFilter

getAbi

public String getAbi ()

Returns
String the abi of this filter, or null if not specified.

getName

public String getName ()

Returns
String the module name of this filter, or null if not specified.

getTest

public String getTest ()

Returns
String the test identifier of this filter, or null if not specified.

toString

public String toString ()

Returns a String representation of this filter. This function is the inverse of createFrom(String).

For a valid filter f;

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

Returns
String