Package org.apache.batik.test
Interface TestReport
-
- All Known Subinterfaces:
TestSuiteReport
- All Known Implementing Classes:
DefaultTestReport,DefaultTestSuiteReport
public interface TestReportDefines the interface of aTestReportproduced by aTestcase.- Version:
- $Id: TestReport.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTestReport.EntryInner class for describing an information element in aTestReport
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringENTRY_KEY_ERROR_CONDITION_STACK_TRACEEntry with the stack trace for a specific test error condition.static java.lang.StringENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_CLASSEntry describing the class of the internal exception that caused the test's internal failurestatic java.lang.StringENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_MESSAGEEntry describing the messages of the internal exception that caused the test's internal failurestatic java.lang.StringENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_STACK_TRACEEntry with the stack trace for the internal exception that caused the test's internal failurestatic java.lang.StringENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_CLASSEntry with the class of the exception that caused the test to fail.static java.lang.StringENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_MESSAGEEntry with the message of the exception that caused the test to fail.static java.lang.StringENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_STACK_TRACEEntry with the stack trace that caused the test to fail.static java.lang.StringERROR_ASSERTION_FAILEDGeneric error code to report test assertion failures.static java.lang.StringERROR_INTERNAL_TEST_FAILUREError code to be used when aTestfails in its own operation (i.e., theTestitself fails, not what it is testing.static java.lang.StringERROR_TEST_FAILEDVery 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 voidaddDescriptionEntry(java.lang.String key, java.lang.Object value)Appendsentryto the array of description entry.TestReport.Entry[]getDescription()Returns an array ofEntryobjects describing the test result.java.lang.StringgetErrorCode()Returns the error code.TestSuiteReportgetParentReport()Returns the parent report in case thisTestReportis part of aTestSuiteReport.TestgetTest()Returns theTestobject that generated thisTestReportbooleanhasPassed()Returns the overall test resultvoidsetParentReport(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 aTestfails in its own operation (i.e., theTestitself 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 theTestauthor 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 theTestauthor 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 theTestauthor 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 ofEntryobjects describing the test result. Accepted value types areStringobjects,URLobjects,Fileobjects andTestReportobjects.Fileobjects should be considered as temporary files
-
addDescriptionEntry
void addDescriptionEntry(java.lang.String key, java.lang.Object value)Appendsentryto the array of description entry.
-
getTest
Test getTest()
Returns theTestobject that generated thisTestReport
-
getParentReport
TestSuiteReport getParentReport()
Returns the parent report in case thisTestReportis part of aTestSuiteReport. This may be null.
-
setParentReport
void setParentReport(TestSuiteReport parent)
Set this report's parent.
-
-