|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Interface implemented by objects that collect test results as the tests execute and report those results.
The term test as used in the testStarting and testCompleted method names
is defined vaguely to enable a wide range of test implementations.
Class Suite invokes testStarting to indicate it is about to invoke one if its test methods.
Class Suite invokes testCompleted to indicate one of its test methods has completed.
Although the execution of a Suite's test methods will likely be a common event reported via the
testStarting and testCompleted methods, because of the vague definition of "test" used by this
interface, the testStarting and testCompleted methods are not limited to this use. Any conceptual test
can be reported via the testStarting and testCompleted methods.
| Method Summary | |
void |
close()
Release any non-memory finite resources, such as file handles, held by this Reporter. |
void |
infoProvided(Report report)
Provides information that is not appropriate to report via any other Reporter method. |
void |
runAborted(Report report)
Indicates a runner encountered an error while attempting to run a suite of tests. |
void |
runCompleted()
Indicates a runner has completed running a suite of tests. |
void |
runStarting(int testCount)
Indicates a runner is about run a suite of tests. |
void |
runStopped()
Indicates a runner has stopped running a suite of tests prior to completion, likely because of a stop request. |
void |
setConfiguration(java.util.Set configs)
Configures this Reporter. |
void |
suiteAborted(Report report)
Indicates the execution of a suite of tests has aborted, likely because of an error, prior to completion. |
void |
suiteCompleted(Report report)
Indicates a suite of tests has completed executing. |
void |
suiteStarting(Report report)
Indicates a suite of tests is about to start executing. |
void |
testFailed(Report report)
Indicates a suite (or other entity) has completed running a test that failed. |
void |
testStarting(Report report)
Indicates a suite (or other entity) is about to start a test. |
void |
testSucceeded(Report report)
Indicates a suite (or other entity) has completed running a test that succeeded. |
| Method Detail |
public void runStarting(int testCount)
Class Runner invokes runStarting to report
that the first execute method of a run's starting Suites
is about to be invoked.
testCount - the number of tests expected during this runjava.lang.IllegalArgumentException - if expectedTestsCount is less than zero.public void testStarting(Report report)
Class Suite uses testStarting to report
that a test method of a Suite is about to be invoked.
report - a Report that encapsulates the test starting event to report.NullPointerException - if report reference is nullpublic void testSucceeded(Report report)
Class Suite uses testSucceeded to report
that a test method of a Suite returned normally
(without throwing an Exception).
report - a Report that encapsulates the test succeeded event to report.NullPointerException - if report reference is nullpublic void testFailed(Report report)
Class Suite uses testFailed to report
that a test method of a Suite
completed abruptly with an Exception.
report - a Report that encapsulates the test failed event to report.NullPointerException - if report reference is nullpublic void suiteStarting(Report report)
Classes Suite and Runner use suiteStarting to report
that the execute method of a Suite
is about to be invoked.
report - a Report that encapsulates the suite starting event to report.NullPointerException - if report reference is nullpublic void suiteCompleted(Report report)
Classes Suite and Runner use suiteCompleted to report
that the execute method of a Suite
has returned normally (without throwing a RuntimeException).
report - a Report that encapsulates the suite completed event to report.NullPointerException - if report reference is nullpublic void suiteAborted(Report report)
Classes Suite and Runner use suiteAborted to report
that the execute method of a Suite
has completed abruptly with a RuntimeException.
report - a Report that encapsulates the suite aborted event to report.NullPointerException - if report reference is nullpublic void infoProvided(Report report)
Reporter method.report - a Report that encapsulates the event to report.NullPointerException - if report reference is nullpublic void runStopped()
Class Suite has a static method setStopRequested, which takes
a boolean parameter. If false is passed to
setStopRequested while a Suite of tests is running, the
execute method of all Suite's should promptly
return even if they haven't finished running all of their tests.
If a stop is requested via Suite's static setStopRequested
method, class Runner invokes runStopped
when the execute method of the run's starting Suite returns.
If a stop is not requested, class Runner invokes runCompleted
when the last execute method of the run's starting Suites returns.
public void runAborted(Report report)
Class Runner invokes runAborted if the
execute method of any of the run's starting Suites completes
abruptly with a Throwable.
report - a Report that encapsulates the run aborted event to report.NullPointerException - if report reference is nullpublic void runCompleted()
Class Suite has a static method setStopRequested, which takes
a boolean parameter. If false is passed to
setStopRequested while a Suite of tests is running, the
execute method of all Suite's should promptly
return even if they haven't finished running all of their tests.
Class Runner invokes runFinished
when the last execute method of the run's starting Suites returns,
unless a stop is requested. If a stop is requested
via Suite's static setStopRequested method, class Runner
invokes runStopped when the last execute method of the run's
starting Suites returns.
public void close()
Reporter. Clients should
call this method when they no longer need the Reporter, before releasing the last reference
to the Reporter. After this method is invoked, the Reporter may be defunct,
and therefore not usable anymore. If the Reporter holds no resources, it may do nothing when
this method is invoked.public void setConfiguration(java.util.Set configs)
Reporter. Classes that implement Reporter
are free to interpret the meaning of the passed Config objects in any
way, including ignoring some or all of them. If the specified configs
set is zero size, the Reporter will be configured to its
default configuration. (A default configuration is defined individually for each
individual Reporter implementation class.)configs - set of Config objects that indicate the new
configuration for this ReporterNullPointerException - if configs reference is nulljava.lang.IllegalArgumentException - if configs set contains any objects
whose class isn't com.artima.testkit.Config
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||