org.opengis.cite.cat20.dgiwg10.SuitePreconditions
This executable test suite (ETS) verifies that a DGIWG Catalogue Service for the Web 2.0 implementation conforms to DGIWG Catalogue Service for the Web 2.0 and related standards. Conformance testing is a kind of "black box" testing that examines externally visible characteristics or behaviors of the SUT and is independent of any implementation details.
Several conformance classes are defined in the principal specifications; the ones listed below are covered by this test suite:
DGIWG_Basic_CSW
The DGIWG_Basic_CSW specifies requirements that all DGIWG Catalogue Service for the Web 2.0 have to implement.
DGIWG_CSWT
The DGIWG_CSWT specifies requirements that transactional DGIWG Catalogue Service for the Web 2.0 have to implement.
The documents listed below stipulate requirements that must be satisfied by a conforming implementation.
OGC Catalogue Services Specification - 2.0.2 OGC 07-006r1
ISO Metadata Application Profile CSW ISO - 1.0.1 OGC 07-045r1
The test suite definition file (testng.xml) is located in the root package,
org.opengis.cite.cat20.dgiwg10
. A conformance class corresponds to a <test> element, each
of which includes a set of test classes that contain the actual test methods.
The general structure of the test suite is shown in Table 1.
Conformance class | Test classes |
---|---|
Preconditions |
org.opengis.cite.cat20.dgiwg10.SuitePreconditions |
DGIWG_Basic_CSW |
|
DGIWG_CSWT |
org.opengis.cite.cat20.dgiwg10.transaction.* |
The Javadoc documentation provides more detailed information about the test methods that constitute the suite.
The options for running the test suite are summarized below.
As entry point the Capabilities document of the service is expected (as reference or file).
If the service supports basic authentication for the Transaction and Harvest operation, the user name and password can be passed via system properties:
trn.user=[USERNAME] trn.pw=[PASSWORD]
Use a Java IDE such as Eclipse, NetBeans, or IntelliJ. Clone the repository and build the project.
Set the main class to run: org.opengis.cite.cat20.dgiwg10.TestNGController
Arguments: The first argument must refer to an XML properties file containing the
required test run arguments. If not specified, the default location at
${user.home}/test-run-props.xml
will be used.
You can modify the sample file in src/main/config/test-run-props.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties version="1.0">
<comment>Sample test run arguments (ets-cat20-dgiwg)</comment>
<entry key="iut">http://localhost:8080/cat</entry>
</properties>
The TestNG results file (testng-results.xml
) will be written to a subdirectory
in ${user.home}/testng/
having a UUID value as its name.
One of the build artifacts is an "all-in-one" JAR file that includes the test suite and all of its dependencies; this makes it very easy to execute the test suite in a command shell:
java -jar ets-cat20-dgiwg10-${version}-aio.jar [-o|--outputDir $TMPDIR] [test-run-props.xml]
This test suite comes with a Dockerfile which can be used to easily setup the OGC test harness with the test suite. Details can be found on Create Docker Image and create and start Docker Container.
Use TEAM Engine, the official OGC test harness. The latest test suite release are usually available at the beta testing facility. You can also build and deploy the test harness yourself and use a local installation.
Using the REST API of the TEAM Engine requires some run arguments. These ate summarized in Table 2. The Obligation descriptor can have the following values: M (mandatory), O (optional), or C (conditional).
Name | Value domain | Obligation | Description |
---|---|---|---|
iut |
URI |
M |
A URI that refers to the implementation under test or metadata about it. Ampersand ('&') characters must be percent-encoded as '%26'. |
The following record is required for the test issueHarvestRequest triggers a request harvesting this metadata record.