EO GeoJSON 1.0 Conformance Test Suite

Scope

This executable test suite (ETS) verifies the conformance of the implementation under test (IUT) with respect to the OGC EO GeoJSON 1.0 standard. Conformance testing is a kind of "black box" testing that examines the externally visible characteristics or behaviors of the IUT while disregarding any implementation details.

Several conformance classes are defined in the principal specification; the ones listed below are covered by this test suite:

  • /conf/core, Sections 7.1 and Section 7.8

  • /conf/earthobservation, Section 7.1

  • /conf/properties, Section 7.1.1

  • /conf/links, Section 7.1.2

  • /conf/offering, Section 7.1.4

  • /conf/metadata-information, Section 7.2

  • /conf/data-identification, Section 7.3

  • /conf/geometry, Section 7.4

  • /conf/acquisition-information, Section 7.6

  • /conf/acquisition-parameters, Section 7.6

  • /conf/product-information, Section 7.7

  • /conf/earthobservation-collection, Section 7.8

Test requirements

The documents listed below stipulate requirements that must be satisfied by a conforming implementation.

Test suite structure

The test suite definition file (testng.xml) is located in the root package, org.opengis.cite.eogeojson10. 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.

Table 1. Test suite structure
Conformance class Test classes

/conf/core

org.opengis.cite.eogeojson10.core.*

/conf/earthobservation

org.opengis.cite.eogeojson10.earthobservation.*

/conf/properties

org.opengis.cite.eogeojson10.properties.*

/conf/links

org.opengis.cite.eogeojson10.links.*

/conf/offering

org.opengis.cite.eogeojson10.offering.*

/conf/metadata-information

org.opengis.cite.eogeojson10.metadatainformation.*

/conf/data-identification

org.opengis.cite.eogeojson10.dataidentification.*

/conf/geometry

org.opengis.cite.eogeojson10.geometry.*

/conf/acquisition-information

org.opengis.cite.eogeojson10.acquisitioninformation.*

/conf/acquisition-parameters

org.opengis.cite.eogeojson10.acquisitionparameters.*

/conf/product-information

org.opengis.cite.eogeojson10.productinformation.*

/conf/earthobservation-collection

org.opengis.cite.eogeojson10.earthobservationcollection.*

The Javadoc documentation provides more detailed information about the test methods that constitute the suite.

How to run the tests

The options for running the test suite are summarized below.

As entry point the Landing Page of the EO GeoJSON 1.0 is expected.

1. Integrated development environment (IDE)

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.eogeojson10.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>Test run arguments</comment>
  <entry key="iut">https://host/singleFeature.json</entry>
  <entry key="col">https://host/featureCollection.json</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.

To build the project, run the following maven command.

mvn clean package -Dsource=8

2. Command shell (console)

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-eo-geojson10-0.1-SNAPSHOT-aio.jar [-o|--outputDir $TMPDIR] [test-run-props.xml]

3. Docker

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.

For example, to build:

cd ./target/docker/ogccite/ets-eo-geojson10/build

docker build -t eogeojson10:local .

Then, to run:

docker run -p 8081:8080 eogeojson10:local

4. OGC test harness

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.

5. Integration Tests

To check whether the ETS could be integrated into TEAM Engine, run the following command:

mvn clean install -Dsource=8 -Pintegration-tests

Using the REST API

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).

Table 2. Test run arguments
Name Value domain Obligation Description

iut

URI

M

JSON file containing a single GeoJSON Feature representing a single EarthObservation object.

col

URI

M

JSON file containing a single GeoJSON FeatureCollection representing a single EarthObservationCollection object.