public class DefaultTestSuiteReport extends Object implements TestSuiteReport
TestReport
interface
for TestSuite
TestReport.Entry
Modifier and Type | Field and Description |
---|---|
protected TestReport.Entry[] |
description
Descriptions in addition to that coming from children.
|
static String |
ENTRY_KEY_FAILED_CHILD_TEST_REPORT
Entry for a failed child test report
|
static String |
ENTRY_KEY_PASSED_CHILD_TEST_REPORT
Entry for a passed child test report
|
static String |
ERROR_CHILD_TEST_FAILED
Error code for a failed TestSuite
|
protected TestSuiteReport |
parent
Parent report in case this report is part of a bigger one.
|
protected List |
reports
Set of
TestReport coming from the TestSuite |
protected TestSuite |
testSuite
TestSuite that created this report
|
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 and Description |
---|
DefaultTestSuiteReport(TestSuite testSuite) |
Modifier and Type | Method and Description |
---|---|
void |
addDescriptionEntry(String key,
Object value)
Appends
entry to the array of description entry. |
protected void |
addDescriptionEntry(TestReport.Entry entry) |
void |
addReport(TestReport report) |
TestReport[] |
getChildrenReports()
Returns an array of children
TestReports which
may be useful for reports generated by TestSuite
instances. |
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.
|
public static final String ERROR_CHILD_TEST_FAILED
public static final String ENTRY_KEY_FAILED_CHILD_TEST_REPORT
public static final String ENTRY_KEY_PASSED_CHILD_TEST_REPORT
protected List reports
TestReport
coming from the TestSuite
protected TestSuite testSuite
protected TestReport.Entry[] description
protected TestSuiteReport parent
public DefaultTestSuiteReport(TestSuite testSuite)
public Test getTest()
TestReport
Test
object that generated this
TestReport
getTest
in interface TestReport
public String getErrorCode()
TestReport
getErrorCode
in interface TestReport
public TestSuiteReport getParentReport()
TestReport
TestReport
is
part of a TestSuiteReport
. This may be null.getParentReport
in interface TestReport
public void setParentReport(TestSuiteReport parent)
TestReport
setParentReport
in interface TestReport
public boolean hasPassed()
TestReport
hasPassed
in interface TestReport
public void addDescriptionEntry(String key, Object value)
TestReport
entry
to the array of description entry.addDescriptionEntry
in interface TestReport
protected void addDescriptionEntry(TestReport.Entry entry)
public TestReport.Entry[] getDescription()
TestReport
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 filesgetDescription
in interface TestReport
public void addReport(TestReport report)
public TestReport[] getChildrenReports()
TestSuiteReport
TestReports
which
may be useful for reports generated by TestSuite
instances.getChildrenReports
in interface TestSuiteReport
Copyright © 2000–2023 Apache Software Foundation. All rights reserved.