CityGML 2.0 Conformance Test Suite

Scope

This executable test suite (ETS) verifies the conformance of the implementation under test (IUT) with respect to the OGC City Geography Markup Language (CityGML) Encoding Standard, version 2.0. 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 specifications; the ones listed below are covered by this test suite:

  • B.1 Test cases for mandatory conformance requirements

    • B.1.1 Valid CityGML instance document

    • B.1.3 Conformance classes related to CityGML modules

    • B.1.4 Spatial geometry objects

    • B.1.5 Spatial topology relations

    • B.1.6 Address objects

  • B.2 Conformance classes related to CityGML modules

    • B.2.1 CityGML Core module

    • B.2.2 Appearance module

    • B.2.3 Bridge module

    • B.2.4 Building module

    • B.2.5 CityFurniture module

    • B.2.6 CityObjectGroup module

    • B.2.7 Generics module

    • B.2.8 LandUse module

    • B.2.9 Relief module

    • B.2.10 Transportation module

    • B.2.11 Tunnel module

    • B.2.12 Vegetation module

    • B.2.13 WaterBody module

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

Core

org.opengis.cite.citygml20.core.*

Core

org.opengis.cite.citygml20.citygmlmodule.*

Core

org.opengis.cite.citygml20.module.CoreModuleValidation

Appearance Module

org.opengis.cite.citygml20.module.AppearanceModuleValidation

BuildingModuleValidation

org.opengis.cite.citygml20.module.BuildingModuleValidation

BridgeModuleValidation

org.opengis.cite.citygml20.module.BridgeModuleValidation

CityFurnitureModuleValidation

org.opengis.cite.citygml20.module.CityFurnitureModuleValidation

CityObjectGroupModuleValidation

org.opengis.cite.citygml20.module.CityObjectGroupModuleValidation

GenericsModuleValidation

org.opengis.cite.citygml20.module.GenericsModuleValidation

LandUseModuleValidation

org.opengis.cite.citygml20.module.LandUseModuleValidation

ReliefModuleValidation

org.opengis.cite.citygml20.module.ReliefModuleValidation

TransportationModuleValidation

org.opengis.cite.citygml20.module.TransportationModuleValidation

TunnelModuleValidation

org.opengis.cite.citygml20.module.TunnelModuleValidation

VegetationModuleValidation

org.opengis.cite.citygml20.module.VegetationModuleValidation

WaterBodyModuleValidation

org.opengis.cite.citygml20.module.WaterBodyModuleValidation

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 CityGML 2.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.citygml20.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/capabilities</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.

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

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.

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

A URI that refers to the implementation under test or metadata about it. Ampersand ('&') characters must be percent-encoded as '%26'.