public class PlaintextTestReporter
extends java.lang.Object
BevoTest.TestLog
. Writes a
formatted plaintext test summary report and optionally the test log to the
given Appendable
. The report format can be varied by
supplying ReportOption
s.
This framework conforms to IEEE Std 829, IEEE Standard for Software Test Documentation.
Some operations of this class use actions that are considered
privileged under the Java security model. The permissions needed for
these actions are given by REQUESTED_PERMISSIONS
. If these
privileged actions fail with an AccessControlException
, the
framework recovers gracefully and proceeds with slightly less detailed
output. In other words, the current security policy can choose to grant
PlaintextTestReporter
its REQUESTED_PERMISSIONS
or
not, with no catastrophic consequences.
BevoTest
,
"IEEE Std 829, Software Test Documentation",
REQUESTED_PERMISSIONS
,
Appendable
Modifier and Type | Class and Description |
---|---|
static class |
PlaintextTestReporter.ReportOption
Option that affect the level of detail in test log reports.
|
Modifier and Type | Field and Description |
---|---|
static java.security.Permissions |
REQUESTED_PERMISSIONS
These permissions let the test framework output more detail, if the
security policy grants them to this class.
|
Constructor and Description |
---|
PlaintextTestReporter(BevoTest.TestLog log)
Constructs a TestLogReporter.
|
Modifier and Type | Method and Description |
---|---|
void |
report(java.lang.Appendable out)
Output a detailed report of this test execution.
|
void |
report(java.lang.Appendable out,
java.util.Set<PlaintextTestReporter.ReportOption> reportOpts)
Output a detailed report of this test execution.
|
void |
reportCase(BevoTest.TestCase<?,?> testCase,
java.lang.Appendable out,
java.util.Set<PlaintextTestReporter.ReportOption> reportOpts)
Output a detailed description of the given test case.
|
void |
reportEntry(BevoTest.TestExecutionResult<?,?> entry,
java.lang.Appendable out,
java.util.Set<PlaintextTestReporter.ReportOption> reportOpts)
Output a detailed report of the given test execution result.
|
void |
reportEntry(BevoTest.TestLogEntry entry,
java.lang.Appendable out,
java.util.Set<PlaintextTestReporter.ReportOption> reportOpts) |
void |
reportSummary(java.lang.Appendable out,
java.util.Set<PlaintextTestReporter.ReportOption> reportOpts)
Output a summary report of this test execution.
|
public static final java.security.Permissions REQUESTED_PERMISSIONS
public PlaintextTestReporter(BevoTest.TestLog log)
log
- the TestLog
to report uponpublic void report(java.lang.Appendable out) throws java.io.IOException
report(out, ReportOption.EMPTY_SET)
.out
- an Appendable
on which the description
should be written.java.io.IOException
- if the Appendable
's
append
operation throws an
IOException
public void report(java.lang.Appendable out, java.util.Set<PlaintextTestReporter.ReportOption> reportOpts) throws java.io.IOException
out
- an Appendable
on which the
description should be written.reportOpts
- an EnumSet<ReportOption>
java.io.IOException
- if the Appendable
's
append
operation throws an
IOException
public void reportSummary(java.lang.Appendable out, java.util.Set<PlaintextTestReporter.ReportOption> reportOpts) throws java.io.IOException
out
- an Appendable
on which the
description should be written.reportOpts
- an EnumSet<ReportOption>
java.io.IOException
- if the Appendable
's
append
operation throws an
IOException
public void reportCase(BevoTest.TestCase<?,?> testCase, java.lang.Appendable out, java.util.Set<PlaintextTestReporter.ReportOption> reportOpts) throws java.io.IOException
testCase
- the TestCase
to describeout
- an Appendable
on which the
description should be written.reportOpts
- an EnumSet<ReportOption>
java.io.IOException
- if the Appendable
's
append
operation throws an
IOException
public void reportEntry(BevoTest.TestLogEntry entry, java.lang.Appendable out, java.util.Set<PlaintextTestReporter.ReportOption> reportOpts) throws java.io.IOException
java.io.IOException
public void reportEntry(BevoTest.TestExecutionResult<?,?> entry, java.lang.Appendable out, java.util.Set<PlaintextTestReporter.ReportOption> reportOpts) throws java.io.IOException
entry
- the TestExecutionResult
to report uponout
- an Appendable
on which the
description should be written.reportOpts
- an EnumSet<ReportOption>
java.io.IOException
- if the Appendable
's
append
operation throws an
IOException