Package org.sonar.plugins.python.xunit
Class TestCase
java.lang.Object
org.sonar.plugins.python.xunit.TestCase
Represents a unit test case. Has a couple of data items like name, status, time etc. associated. Reports testcase details in
sonar-conform XML
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns execution details as sonar-conform XMLgetFile()
int
getTime()
boolean
isError()
Returns true if this testcase is an error, false otherwiseboolean
Returns true if this testcase is a failure, false otherwiseboolean
Returns true if this testcase has been skipped, failure, false otherwise
-
Field Details
-
STATUS_OK
- See Also:
-
STATUS_ERROR
- See Also:
-
STATUS_FAILURE
- See Also:
-
STATUS_SKIPPED
- See Also:
-
-
Constructor Details
-
TestCase
public TestCase(String name, int time, String status, String stack, String msg, @Nullable String file, @Nullable String testClassname) Constructs a testcase instance out of following parameters- Parameters:
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.
-
-
Method Details
-
isError
public boolean isError()Returns true if this testcase is an error, false otherwise -
isFailure
public boolean isFailure()Returns true if this testcase is a failure, false otherwise -
isSkipped
public boolean isSkipped()Returns true if this testcase has been skipped, failure, false otherwise -
getTime
public int getTime() -
getFile
-
getTestClassname
-
getDetails
Returns execution details as sonar-conform XML
-