Stay organized with collections
Save and categorize content based on your preferences.
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 ()
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-04-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-04-28 UTC."],[],[]]