public class TestCase extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
STATUS_ERROR |
static String |
STATUS_FAILURE |
static String |
STATUS_OK |
static String |
STATUS_SKIPPED |
| Constructor and Description |
|---|
TestCase(String name,
int time,
String status,
String stack,
String msg,
String file,
String testClassname)
Constructs a testcase instance out of following parameters
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDetails()
Returns execution details as sonar-conform XML
|
String |
getFile() |
String |
getTestClassname() |
int |
getTime() |
boolean |
isError()
Returns true if this testcase is an error, false otherwise
|
boolean |
isFailure()
Returns true if this testcase is a failure, false otherwise
|
boolean |
isSkipped()
Returns true if this testcase has been skipped, failure, false otherwise
|
public static final String STATUS_OK
public static final String STATUS_ERROR
public static final String STATUS_FAILURE
public static final String STATUS_SKIPPED
public TestCase(String name, int time, String status, String stack, String msg, @Nullable String file, @Nullable String testClassname)
name - The name of this testcasetime - The execution time in millisecondsstatus - The execution status of the testcasestack - The stack trace occurred while executing of this testcase; pass "" if the testcase passed/skipped.msg - The error message associated with this testcase of the execution was erroneous; pass "" if not.file - The optional file to which this test case applies.testClassname - The classname of the test.public boolean isError()
public boolean isFailure()
public boolean isSkipped()
public int getTime()
@CheckForNull public String getFile()
@CheckForNull public String getTestClassname()
public String getDetails()
Copyright © 2011–2019 SonarSource and Waleri Enns. All rights reserved.