public interface TestReport
TestReport
produced
by a Test
case.Modifier and Type | Interface and Description |
---|---|
static class |
TestReport.Entry
Inner class for describing an information element in a
TestReport |
Modifier and Type | Field and Description |
---|---|
static String |
ENTRY_KEY_ERROR_CONDITION_STACK_TRACE
Entry with the stack trace for a specific test error
condition.
|
static String |
ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_CLASS
Entry describing the class of the internal exception
that caused the test's internal failure
|
static String |
ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_MESSAGE
Entry describing the messages of the internal exception
that caused the test's internal failure
|
static String |
ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_STACK_TRACE
Entry with the stack trace for the internal exception
that caused the test's internal failure
|
static String |
ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_CLASS
Entry with the class of the exception that caused the test to fail.
|
static String |
ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_MESSAGE
Entry with the message of the exception that caused the test to fail.
|
static String |
ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_STACK_TRACE
Entry with the stack trace that caused the test to fail.
|
static String |
ERROR_ASSERTION_FAILED
Generic error code to report test assertion failures.
|
static String |
ERROR_INTERNAL_TEST_FAILURE
Error code to be used when a
Test fails in
its own operation (i.e., the Test itself
fails, not what it is testing. |
static String |
ERROR_TEST_FAILED
Very generic error code which can be used to report
that the test failed.
|
Modifier and Type | Method and Description |
---|---|
void |
addDescriptionEntry(String key,
Object value)
Appends
entry to the array of description entry. |
TestReport.Entry[] |
getDescription()
Returns an array of
Entry objects describing the
test result. |
String |
getErrorCode()
Returns the error code.
|
TestSuiteReport |
getParentReport()
Returns the parent report in case this
TestReport is
part of a TestSuiteReport . |
Test |
getTest()
Returns the
Test object that generated this
TestReport |
boolean |
hasPassed()
Returns the overall test result
|
void |
setParentReport(TestSuiteReport parent)
Set this report's parent.
|
static final String ERROR_INTERNAL_TEST_FAILURE
Test
fails in
its own operation (i.e., the Test
itself
fails, not what it is testing. An internal failure
is reported when any type of exception occurs while
running the test.static final String ERROR_TEST_FAILED
static final String ERROR_ASSERTION_FAILED
static final String ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_CLASS
static final String ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_MESSAGE
static final String ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_STACK_TRACE
static final String ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_CLASS
Test
author probably created a
specific error code.static final String ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_MESSAGE
Test
author probably created a
specific error code.static final String ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_STACK_TRACE
Test
author probably created a
specific error code.static final String ENTRY_KEY_ERROR_CONDITION_STACK_TRACE
boolean hasPassed()
String getErrorCode()
TestReport.Entry[] getDescription()
Entry
objects describing the
test result.
Accepted value types are String
objects, URL
objects, File
objects and TestReport
objects.
File
objects should be considered as temporary filesvoid addDescriptionEntry(String key, Object value)
entry
to the array of description entry.Test getTest()
Test
object that generated this
TestReport
TestSuiteReport getParentReport()
TestReport
is
part of a TestSuiteReport
. This may be null.void setParentReport(TestSuiteReport parent)
Copyright © 2000–2023 Apache Software Foundation. All rights reserved.