Package org.opengis.cite.cat30
Class SuiteFixtureListener
java.lang.Object
org.opengis.cite.cat30.SuiteFixtureListener
- All Implemented Interfaces:
org.testng.ISuiteListener
,org.testng.ITestNGListener
A listener that performs various tasks before and after a test suite is run, usually
concerned with maintaining a shared test suite fixture. Since this listener is loaded
using the ServiceLoader mechanism, its methods will be called before those of other
suite listeners listed in the test suite definition and before any annotated
configuration methods.
Attributes set on an ISuite instance are not inherited by constituent test group
contexts (ITestContext). However, suite attributes are still accessible from lower
contexts.
- See Also:
-
ISuite interface
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
deleteTempFiles
(org.testng.ISuite suite) Deletes temporary files created during the test run if TestSuiteLogger is enabled at the INFO level or higher (they are left intact at the CONFIG level or lower).void
onFinish
(org.testng.ISuite suite) Performs various cleanup tasks when the test run is completed.void
onStart
(org.testng.ISuite suite) (package private) void
processSuiteParameters
(org.testng.ISuite suite) Processes test suite arguments and sets suite attributes accordingly.(package private) void
registerClientComponent
(org.testng.ISuite suite) A client component is added to the suite fixture as the value of theSuiteAttribute.CLIENT
attribute; it may be subsequently accessed via theITestContext.getSuite()
method.(package private) void
registerSchemas
(org.testng.ISuite suite) Builds immutableSchema
objects suitable for validating the content of CSW 3.0 response entities.
-
Constructor Details
-
SuiteFixtureListener
public SuiteFixtureListener()
-
-
Method Details
-
onStart
public void onStart(org.testng.ISuite suite) - Specified by:
onStart
in interfaceorg.testng.ISuiteListener
-
onFinish
public void onFinish(org.testng.ISuite suite) Performs various cleanup tasks when the test run is completed. Any temporary files created during the test run are deleted if TestSuiteLogger is enabled at the INFO level or higher.- Specified by:
onFinish
in interfaceorg.testng.ISuiteListener
-
processSuiteParameters
void processSuiteParameters(org.testng.ISuite suite) Processes test suite arguments and sets suite attributes accordingly. The entity referenced by theiut
argument--expected to be an OGC service capabilities document--is parsed and the resulting Document is set as the value of thetestSubject
attribute.- Parameters:
suite
- An ISuite object representing a TestNG test suite.
-
registerClientComponent
void registerClientComponent(org.testng.ISuite suite) A client component is added to the suite fixture as the value of theSuiteAttribute.CLIENT
attribute; it may be subsequently accessed via theITestContext.getSuite()
method.- Parameters:
suite
- The test suite instance.
-
registerSchemas
void registerSchemas(org.testng.ISuite suite) Builds immutableSchema
objects suitable for validating the content of CSW 3.0 response entities. The schemas are added to the suite fixture as the value of the attributes identified in the following table.Application schemas SuiteAttribute Schema SuiteAttribute.CSW_SCHEMA
OGC 12-176r6, 7.9(a): cswAll.xsd SuiteAttribute.ATOM_SCHEMA
RFC 4287, Appendix B: RELAX NG Compact Schema - Parameters:
suite
- The test suite to be run.
-
deleteTempFiles
void deleteTempFiles(org.testng.ISuite suite) Deletes temporary files created during the test run if TestSuiteLogger is enabled at the INFO level or higher (they are left intact at the CONFIG level or lower).- Parameters:
suite
- The test suite.
-