OGC KML 2.x Conformance Test Suite

Scope

This test suite verifies that a KML 2.x resource conforms to the following OGC specifications:

The KML specification defines three conformance levels indicating the relative importance or priority of a particular set of constraints; each level successively increases the test coverage. The highest level (CL3) indicates full conformance, but a given application or user community may opt for a lower level of conformance. All three levels are implemented by the test suite:

CL1
Includes tests covering requirements that must be satisfied by every (minimally) conforming KML resource.
CL2
As for CL1, plus tests that address recommended constraints that should be satisfied; non-conformance at this level may hinder the utility, portability, or interoperability of the resource.
CL3
As for CL2, plus tests for optional constraints that are purely informative in nature.

Test suite structure

The test suite definition file (testng.xml) is located in the root package, org.opengis.cite.kml2. A conformance level is denoted by a <test> element; each test element includes a set of test classes that contain the actual test methods belonging to that conformance level. The general structure of the test suite is shown in Table 1. Note that the test classes are packaged by conformance level.

Table 1 - Test suite structure
Conformance level Test classes
CL1
  • org.opengis.cite.kml2.c1.*Tests
CL2
  • org.opengis.cite.kml2.c2.*Tests
CL3
  • org.opengis.cite.kml2.c3.*Tests

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

Test requirements

Each KML specification has a companion document that describes an abstract test suite (ATS) that explicitly identifies test cases for each conformance level. These ATS documents (see links in the site menu) stipulate requirements that must be satisfied by a conforming KML resource.

  • [OGC 14-068r2] OGC KML 2.3 - Abstract Test Suite
  • [OGC 07-134r2] OGC KML 2.2 - Abstract Test Suite

How to run the tests

The test suite may be run in any of the following environments:

  • Integrated development environment (IDE): The main Java class is TestNGController.
  • RESTful API: Submit a request to the test run controller (/rest/suites/kml2/0.5/run).
  • OGC test harness (TEAM-Engine): Run the CTL script located in the /src/main/ctl/ directory.

The test run arguments are 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
kml URI M An absolute URI that refers to a KML resource. If the URI contains any ampersand ('&') characters they must be percent-encoded as '%26'.
lvl Integer (1-3) O The level of conformance assessment (default value: 1).