public class DefaultTestReport extends Object implements TestReport
TestReport
interface.TestReport.Entry| Modifier and Type | Field and Description |
|---|---|
protected TestReport.Entry[] |
description |
protected TestSuiteReport |
parent
Parent report, in case this report is part of a
TestSuiteReport |
protected Test |
test |
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 |
|---|
DefaultTestReport(Test test) |
| 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) |
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 |
setDescription(TestReport.Entry[] description) |
void |
setErrorCode(String errorCode) |
void |
setParentReport(TestSuiteReport parent)
Set this report's parent.
|
void |
setPassed(boolean passed) |
protected TestReport.Entry[] description
protected Test test
protected TestSuiteReport parent
TestSuiteReportpublic DefaultTestReport(Test test)
public TestSuiteReport getParentReport()
TestReportTestReport is
part of a TestSuiteReport. This may be null.getParentReport in interface TestReportpublic void setParentReport(TestSuiteReport parent)
TestReportsetParentReport in interface TestReportpublic Test getTest()
TestReportTest object that generated this
TestReportgetTest in interface TestReportpublic String getErrorCode()
TestReportgetErrorCode in interface TestReportpublic void setErrorCode(String errorCode)
public boolean hasPassed()
TestReporthasPassed in interface TestReportpublic void setPassed(boolean passed)
public TestReport.Entry[] getDescription()
TestReportEntry 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 TestReportpublic void setDescription(TestReport.Entry[] description)
public void addDescriptionEntry(String key, Object value)
TestReportentry to the array of description entry.addDescriptionEntry in interface TestReportprotected void addDescriptionEntry(TestReport.Entry entry)
Copyright © 2000–2020 Apache Software Foundation. All rights reserved.