Package org.apache.batik.test
Interface TestReport
-
- All Known Subinterfaces:
TestSuiteReport
- All Known Implementing Classes:
DefaultTestReport
,DefaultTestSuiteReport
public interface TestReport
Defines the interface of aTestReport
produced by aTest
case.- Version:
- $Id: TestReport.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TestReport.Entry
Inner class for describing an information element in aTestReport
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ENTRY_KEY_ERROR_CONDITION_STACK_TRACE
Entry with the stack trace for a specific test error condition.static java.lang.String
ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_CLASS
Entry describing the class of the internal exception that caused the test's internal failurestatic java.lang.String
ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_MESSAGE
Entry describing the messages of the internal exception that caused the test's internal failurestatic java.lang.String
ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_STACK_TRACE
Entry with the stack trace for the internal exception that caused the test's internal failurestatic java.lang.String
ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_CLASS
Entry with the class of the exception that caused the test to fail.static java.lang.String
ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_MESSAGE
Entry with the message of the exception that caused the test to fail.static java.lang.String
ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_STACK_TRACE
Entry with the stack trace that caused the test to fail.static java.lang.String
ERROR_ASSERTION_FAILED
Generic error code to report test assertion failures.static java.lang.String
ERROR_INTERNAL_TEST_FAILURE
Error code to be used when aTest
fails in its own operation (i.e., theTest
itself fails, not what it is testing.static java.lang.String
ERROR_TEST_FAILED
Very generic error code which can be used to report that the test failed.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addDescriptionEntry(java.lang.String key, java.lang.Object value)
Appendsentry
to the array of description entry.TestReport.Entry[]
getDescription()
Returns an array ofEntry
objects describing the test result.java.lang.String
getErrorCode()
Returns the error code.TestSuiteReport
getParentReport()
Returns the parent report in case thisTestReport
is part of aTestSuiteReport
.Test
getTest()
Returns theTest
object that generated thisTestReport
boolean
hasPassed()
Returns the overall test resultvoid
setParentReport(TestSuiteReport parent)
Set this report's parent.
-
-
-
Field Detail
-
ERROR_INTERNAL_TEST_FAILURE
static final java.lang.String ERROR_INTERNAL_TEST_FAILURE
Error code to be used when aTest
fails in its own operation (i.e., theTest
itself fails, not what it is testing. An internal failure is reported when any type of exception occurs while running the test.- See Also:
- Constant Field Values
-
ERROR_TEST_FAILED
static final java.lang.String ERROR_TEST_FAILED
Very generic error code which can be used to report that the test failed.- See Also:
- Constant Field Values
-
ERROR_ASSERTION_FAILED
static final java.lang.String ERROR_ASSERTION_FAILED
Generic error code to report test assertion failures.- See Also:
- Constant Field Values
-
ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_CLASS
static final java.lang.String ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_CLASS
Entry describing the class of the internal exception that caused the test's internal failure- See Also:
- Constant Field Values
-
ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_MESSAGE
static final java.lang.String ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_MESSAGE
Entry describing the messages of the internal exception that caused the test's internal failure- See Also:
- Constant Field Values
-
ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_STACK_TRACE
static final java.lang.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- See Also:
- Constant Field Values
-
ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_CLASS
static final java.lang.String ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_CLASS
Entry with the class of the exception that caused the test to fail. Note that this is different from ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_CLASS, in which case, the test itself failed unexpectedly. In this case, the entry is used to describe an expected exception for which theTest
author probably created a specific error code.- See Also:
- Constant Field Values
-
ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_MESSAGE
static final java.lang.String ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_MESSAGE
Entry with the message of the exception that caused the test to fail. Note that this is different from ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_MESSAGE, in which case, the test itself failed unexpectedly. In this case, the entry is used to describe an expected exception for which theTest
author probably created a specific error code.- See Also:
- Constant Field Values
-
ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_STACK_TRACE
static final java.lang.String ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_STACK_TRACE
Entry with the stack trace that caused the test to fail. Note that this is different from ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_STACK_TRACE, in which case, the test itself failed unexpectedly. In this case, the entry is used to describe an expected exception for which theTest
author probably created a specific error code.- See Also:
- Constant Field Values
-
ENTRY_KEY_ERROR_CONDITION_STACK_TRACE
static final java.lang.String ENTRY_KEY_ERROR_CONDITION_STACK_TRACE
Entry with the stack trace for a specific test error condition.- See Also:
- Constant Field Values
-
-
Method Detail
-
hasPassed
boolean hasPassed()
Returns the overall test result
-
getErrorCode
java.lang.String getErrorCode()
Returns the error code. This should never be null if the test failed (i.e., if hasPassed returns false).
-
getDescription
TestReport.Entry[] getDescription()
Returns an array ofEntry
objects describing the test result. Accepted value types areString
objects,URL
objects,File
objects andTestReport
objects.File
objects should be considered as temporary files
-
addDescriptionEntry
void addDescriptionEntry(java.lang.String key, java.lang.Object value)
Appendsentry
to the array of description entry.
-
getTest
Test getTest()
Returns theTest
object that generated thisTestReport
-
getParentReport
TestSuiteReport getParentReport()
Returns the parent report in case thisTestReport
is part of aTestSuiteReport
. This may be null.
-
setParentReport
void setParentReport(TestSuiteReport parent)
Set this report's parent.
-
-