Package org.apache.batik.test
Class DefaultTestSuiteReport
- java.lang.Object
-
- org.apache.batik.test.DefaultTestSuiteReport
-
- All Implemented Interfaces:
TestReport
,TestSuiteReport
public class DefaultTestSuiteReport extends java.lang.Object implements TestSuiteReport
Simple implementation of theTestReport
interface forTestSuite
- Version:
- $Id: DefaultTestSuiteReport.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.batik.test.TestReport
TestReport.Entry
-
-
Field Summary
Fields Modifier and Type Field Description protected TestReport.Entry[]
description
Descriptions in addition to that coming from children.static java.lang.String
ENTRY_KEY_FAILED_CHILD_TEST_REPORT
Entry for a failed child test reportstatic java.lang.String
ENTRY_KEY_PASSED_CHILD_TEST_REPORT
Entry for a passed child test reportstatic java.lang.String
ERROR_CHILD_TEST_FAILED
Error code for a failed TestSuiteprotected TestSuiteReport
parent
Parent report in case this report is part of a bigger one.protected java.util.List
reports
Set ofTestReport
coming from theTestSuite
protected TestSuite
testSuite
TestSuite that created this report-
Fields inherited from interface org.apache.batik.test.TestReport
ENTRY_KEY_ERROR_CONDITION_STACK_TRACE, ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_CLASS, ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_MESSAGE, ENTRY_KEY_INTERNAL_TEST_FAILURE_EXCEPTION_STACK_TRACE, ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_CLASS, ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_MESSAGE, ENTRY_KEY_REPORTED_TEST_FAILURE_EXCEPTION_STACK_TRACE, ERROR_ASSERTION_FAILED, ERROR_INTERNAL_TEST_FAILURE, ERROR_TEST_FAILED
-
-
Constructor Summary
Constructors Constructor Description DefaultTestSuiteReport(TestSuite testSuite)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDescriptionEntry(java.lang.String key, java.lang.Object value)
Appendsentry
to the array of description entry.protected void
addDescriptionEntry(TestReport.Entry entry)
void
addReport(TestReport report)
TestReport[]
getChildrenReports()
Returns an array of childrenTestReports
which may be useful for reports generated byTestSuite
instances.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_CHILD_TEST_FAILED
public static final java.lang.String ERROR_CHILD_TEST_FAILED
Error code for a failed TestSuite- See Also:
- Constant Field Values
-
ENTRY_KEY_FAILED_CHILD_TEST_REPORT
public static final java.lang.String ENTRY_KEY_FAILED_CHILD_TEST_REPORT
Entry for a failed child test report- See Also:
- Constant Field Values
-
ENTRY_KEY_PASSED_CHILD_TEST_REPORT
public static final java.lang.String ENTRY_KEY_PASSED_CHILD_TEST_REPORT
Entry for a passed child test report- See Also:
- Constant Field Values
-
reports
protected java.util.List reports
Set ofTestReport
coming from theTestSuite
-
testSuite
protected TestSuite testSuite
TestSuite that created this report
-
description
protected TestReport.Entry[] description
Descriptions in addition to that coming from children.
-
parent
protected TestSuiteReport parent
Parent report in case this report is part of a bigger one.
-
-
Constructor Detail
-
DefaultTestSuiteReport
public DefaultTestSuiteReport(TestSuite testSuite)
-
-
Method Detail
-
getTest
public Test getTest()
Description copied from interface:TestReport
Returns theTest
object that generated thisTestReport
- Specified by:
getTest
in interfaceTestReport
-
getErrorCode
public java.lang.String getErrorCode()
Description copied from interface:TestReport
Returns the error code. This should never be null if the test failed (i.e., if hasPassed returns false).- Specified by:
getErrorCode
in interfaceTestReport
-
getParentReport
public TestSuiteReport getParentReport()
Description copied from interface:TestReport
Returns the parent report in case thisTestReport
is part of aTestSuiteReport
. This may be null.- Specified by:
getParentReport
in interfaceTestReport
-
setParentReport
public void setParentReport(TestSuiteReport parent)
Description copied from interface:TestReport
Set this report's parent.- Specified by:
setParentReport
in interfaceTestReport
-
hasPassed
public boolean hasPassed()
Description copied from interface:TestReport
Returns the overall test result- Specified by:
hasPassed
in interfaceTestReport
-
addDescriptionEntry
public void addDescriptionEntry(java.lang.String key, java.lang.Object value)
Description copied from interface:TestReport
Appendsentry
to the array of description entry.- Specified by:
addDescriptionEntry
in interfaceTestReport
-
addDescriptionEntry
protected void addDescriptionEntry(TestReport.Entry entry)
-
getDescription
public TestReport.Entry[] getDescription()
Description copied from interface:TestReport
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- Specified by:
getDescription
in interfaceTestReport
-
addReport
public void addReport(TestReport report)
-
getChildrenReports
public TestReport[] getChildrenReports()
Description copied from interface:TestSuiteReport
Returns an array of childrenTestReports
which may be useful for reports generated byTestSuite
instances.- Specified by:
getChildrenReports
in interfaceTestSuiteReport
-
-