public class TestResults extends Object implements Serializable, Comparable<TestResults>
| Constructor and Description | 
|---|
TestResults(String className,
           String methodName,
           @Nullable Long durationMs)
Create a new test 
 | 
TestResults(String className,
           String methodName,
           String duration)
Deprecated. 
 
since 5.10 use $ 
TestResults(String, String, Long) | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addError(TestCaseResultError error)
Add an error to the test 
 | 
int | 
compareTo(TestResults o)  | 
boolean | 
equals(Object o)  | 
String | 
getActualMethodName()
Returns the actual method name without the pretty spaces 
 | 
@NotNull String | 
getClassName()
The name of the class 
 | 
long | 
getDurationMs()
How long did the test take to execute? 
 | 
List<TestCaseResultError> | 
getErrors()
How many errors does the test have. 
 | 
@Nullable String | 
getMethodName()
Returns a sentence describing the test, derived from the method name of the test. 
 | 
String | 
getPrettyDuration()
Deprecated. 
 
since 5.9 without replacement 
 | 
@NotNull String | 
getShortClassName()
The short name of the class 
 | 
TestState | 
getState()  | 
String | 
getSystemOut()  | 
long | 
getTestCaseId()  | 
boolean | 
hasErrors()  | 
int | 
hashCode()  | 
static @Nullable String | 
methodNameToDescription(String methodName)
Attempts to convert a test method name to a sentence describing the test. 
 | 
void | 
setState(TestState state)  | 
void | 
setSystemOut(String systemOut)  | 
void | 
setTestCaseId(long testCaseId)  | 
String | 
toString()  | 
@Deprecated public TestResults(String className, String methodName, String duration)
TestResults(String, String, Long)className - The name of the class containing the testmethodName - The name of the testduration - The time the test took to execute in secondspublic String getActualMethodName()
@Nullable public @Nullable String getMethodName()
Returns a sentence describing the test, derived from the method name of the test.
@Nullable public static @Nullable String methodNameToDescription(String methodName)
@NotNull public @NotNull String getClassName()
@NotNull public @NotNull String getShortClassName()
public long getDurationMs()
public void addError(TestCaseResultError error)
error - a new errorpublic List<TestCaseResultError> getErrors()
public void setSystemOut(String systemOut)
public String getSystemOut()
public boolean hasErrors()
@Deprecated public String getPrettyDuration()
public int compareTo(TestResults o)
compareTo in interface Comparable<TestResults>public TestState getState()
public void setState(TestState state)
public long getTestCaseId()
public void setTestCaseId(long testCaseId)
Copyright © 2024 Atlassian Software Systems Pty Ltd. All rights reserved.