Skip to main content

OGC API Test Client

A black box verifier for OGC API specifications

Installation

This package is available on PyPi and can be installed with pip

$ python -m pip install ogctests

Usage

Command Line Interface

The test suite is designed to be run from the command line. At least one scope and an instance URL must be provided.

$ python -m ogctests <scope_1> [<scope_2>] -i <instance_url>

Python callable

The test suite can also be called from within your python code by importing the run_ogctests function from the main module

from ogctests.main import run_ogctests

scope = "features/core"
run_ogctests(scope)

You can optionally override the HTTP client used by the ogc test suite by passing a value to the test_client argument. This is especially useful if you want to integrate the ogctests into your own test suite, and have it use your own test client.

from fastapi import FastAPI
from fastapi.testing import TestClient

from ogctests.main import run_ogctests
app = FastAPI()
client = TestClient(app)

scope = "features/core"
run_ogctests(scope, client)

Thus, all requests made by the ogctests test suite will be done using the fastapi.testing.TestClient instead of the default httpx.Client declared in the ogc test suite.

Scoping

For instructions on how to scope the tests, call the package with the -h flag.

$ python -m ogctests -h

Reporting

Reporting to stdout is as per normal pytest output. To increase the verbosity of the output set the -v flag to True. To create a detailed report of the test run, set the -r flag to True. This will create a junitxml report in the users home folder under ogctestsReporting/<date>.xml

What it Does

In line with the Official OGC test suite (written in Java), this Python-based test suite will verify the compliance of a given endpoint with the OGC API - Features - Part 1: Core specification.

The test suite only tests against the OGC API - Features - Part 1: Core specification, But may be expanded in the future.

See also

An introduction to the OGC API specification

OGC API — Features — Part 1: Core

Official OGC test suite

Implementors

https://github.com/opengeospatial/ogcapi-features/tree/master/implementations/servers

Release files for ogctests 0.1.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ogctests 0.1.15
File Size Uploaded
ogctests-0.1.15.tar.gz 23.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ogctests 0.1.15
File Interpreter ABI Platform
ogctests-0.1.15-py3-none-any.whl Python 3 none any Details

Total release size: 63.1 kB

Release files / ogctests-0.1.15.tar.gz

Download URL ogctests-0.1.15.tar.gz
Size 23.8 kB
Tags Source
SHA-256 checksum
How to use checksums
02d79006b2a1a08e409a8701565a4a7c8429f0753259d845d6f7111edfeba7ca
BLAKE2b-256 checksum
How to use checksums
b5e64fffd616fc8bd06939fa0022e39de209f236bb248572cc182a5c00d80f4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.4 Linux/6.10.4-arch2-1

Release files / ogctests-0.1.15-py3-none-any.whl

Download URL ogctests-0.1.15-py3-none-any.whl
Size 39.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d70dba0722300ce20c153b5de1e8a4683c0a9c826a9a6c779cec17d2b5879214
BLAKE2b-256 checksum
How to use checksums
ddd717b5a3b5b11d7f2df9af454c19900d3c7a8f9a79b6ca9ec4b0ca23fe27c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.4 Linux/6.10.4-arch2-1

Release history Release notifications | RSS feed

This release

0.1.15 This release

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page