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
TestSuiteReport
public DefaultTestReport(Test test)
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 Test getTest()
TestReport
Test
object that generated this
TestReport
getTest
in interface TestReport
public String getErrorCode()
TestReport
getErrorCode
in interface TestReport
public void setErrorCode(String errorCode)
public boolean hasPassed()
TestReport
hasPassed
in interface TestReport
public void setPassed(boolean passed)
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 setDescription(TestReport.Entry[] description)
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)
Copyright © 2000–2023 Apache Software Foundation. All rights reserved.