|
|
|
Artima SuiteRunner |
Why |
Getting Started |
Tutorial |
Get Help |
Discuss |
Print |
Email |
First Page |
Previous |
Next
|
|
Advertisement
|
Reporter Configuration and Disposal
In addition to the 11 event handler methods, interface Reporter declares two other methods, setConfiguration
and dispose, shown in Figure 2. You must of course also implement these two methods in your custom Reporter.
Figure 2. Reporter's Configuration and Disposal Methods
org.suiterunnerReporter
|
public interface Reporter Interface implemented by classes whose instances collect the results of a running suite of tests and presents those results in some way to the user. |
| Methods |
public void dispose()Release any non-memory finite resources, such as file handles, held by this Reporter.
|
public void setConfiguration(java.util.Set configs)Configures this Reporter with a specified Set of
configuration Characters.
|
The dispose method is called at the end of the Reporter's life, before it is discarded for garbage
collection. If your custom reporter holds finite non-memory resources, such as file handles, database connections, or sockets,
you should release these in your dispose method.
The
Figure 3. setConfiguration method takes a Set of configuration constants that indicate which of the
11 possible events should actually be reported to the user. For example, a Reporter can be configured to
report test failure events, but not test starting or test succeeded events. The valid contents of the Set
passed to setConfiguration
are defined as configuration Character constants in interface Reporter, as shown in Figure 3.
Reporter's Configuration Character Constants
org.suiterunnerReporter
|
public interface Reporter Interface implemented by classes whose instances collect the results of a running suite of tests and presents those results in some way to the user. |
| Fields |
public static final Character PRESENT_INFO_PROVIDEDConfiguration Character that indicates infoProvided method invocations should
be presented to the user.
|
public static final Character PRESENT_RUN_ABORTEDConfiguration Character that indicates runAborted method invocations should
be presented to the user.
|
public static final Character PRESENT_RUN_COMPLETEDConfiguration Character that indicates runCompleted method invocations should
be presented to the user.
|
public static final Character PRESENT_RUN_STARTINGConfiguration Character that indicates runStarting method invocations should
be presented to the user.
|
public static final Character PRESENT_RUN_STOPPEDConfiguration Character that indicates runComleted method invocations should
be presented to the user.
|
public static final Character PRESENT_SUITE_ABORTEDConfiguration Character that indicates suiteAborted method invocations should
be presented to the user.
|
public static final Character PRESENT_SUITE_COMPLETEDConfiguration Character that indicates suiteCompleted method invocations should
be presented to the user.
|
public static final Character PRESENT_SUITE_STARTINGConfiguration Character that indicates suiteStarting method invocations should
be presented to the user.
|
public static final Character PRESENT_TEST_FAILEDConfiguration Character that indicates testFailed method invocations should
be presented to the user.
|
public static final Character PRESENT_TEST_STARTINGConfiguration Character that indicates testStarting method invocations should
be presented to the user.
|
public static final Character PRESENT_TEST_SUCCEEDEDConfiguration Character that indicates testSucceeded method invocations should
be presented to the user.
|
|
Sponsored Links
|