TestDescription
public
final
class
TestDescription
extends Object
java.lang.Object
|
↳ |
com.android.tradefed.result.TestDescription
|
Class representing information about a test case.
Summary
Public constructors |
TestDescription(String className, String testName)
Constructor
|
TestDescription(String className, String testName, Annotation... annotations)
Constructor
|
TestDescription(String className, String testName, annotations)
Constructor
|
Fields
PARAMETERIZED_TEST_REGEX
public static final Pattern PARAMETERIZED_TEST_REGEX
Regex for method parameterized. For example: testName[0]
Public constructors
TestDescription
public TestDescription (String className,
String testName)
Constructor
Parameters |
className |
String : The name of the class holding the test. |
testName |
String : The test (method) name. |
TestDescription
public TestDescription (String className,
String testName,
Annotation... annotations)
Constructor
Parameters |
className |
String : The name of the class holding the test. |
testName |
String : The test (method) name. |
annotations |
Annotation : List of ERROR(/Annotation) associated with the test case. |
TestDescription
public TestDescription (String className,
String testName,
annotations)
Constructor
Parameters |
className |
String : The name of the class holding the test. |
testName |
String : The test (method) name. |
annotations |
: Collection of ERROR(/Annotation) associated with the test case. |
Public methods
compareTo
public int compareTo (TestDescription o)
Parameters |
o |
TestDescription |
equals
public boolean equals (Object obj)
fromString
public static TestDescription fromString (String data)
Create a TestDescription
from its toString()
} representation.
Parameters |
data |
String : the String representation. Expected format: classname#methodname |
Returns |
TestDescription |
the TestDescription or null if it could not be parsed |
getAnnotation
public T getAnnotation (Class<T> annotationType)
Parameters |
annotationType |
Class |
Returns |
T |
the annotation of type annotationType that is attached to this description node, or
null if none exists |
getAnnotations
public getAnnotations ()
Returns |
|
all of the annotations attached to this description node |
getClassName
public String getClassName ()
Returns the fully qualified class name of the test.
getTestName
public String getTestName ()
Returns the name of the test with the parameters, if it's parameterized test. Returns the
regular test name if not a parameterized test.
getTestNameWithoutParams
public String getTestNameWithoutParams ()
Returns the name of the test without any parameters (if it's a parameterized method).
hashCode
public int hashCode ()
toString
public String toString ()