Skip to content

Commit c48c7f0

Browse files
committed
Docs
1 parent f66930b commit c48c7f0

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## What is sedr?
66

7-
An experimental validator for OGC EDR APIs using schemathesis. Main focus will be on the Rodeo Profile, which is a subset of the OGC EDR API.
7+
An experimental validator for OGC EDR APIs. Main focus will be on the Rodeo Profile, which is a subset of the OGC EDR API.
88

99
## Who is responsible?
1010

@@ -40,6 +40,10 @@ Run manually as noted in [Test it out](#test-it-out), or add it to your CI using
4040

4141
## Overview of architecture
4242

43+
- __init__ includes tests from ogcapi, edrreq and rodeoprofile at startup. Tests are categorized as landing, conformance and collection.
44+
- Landing and conformance tests are run first, in the preflight phase.
45+
- Then schemathesis will validate the OpenAPI spec and run lots of automatic tests, including fuzzing of query parameters. Collection tests are run during this phase.
46+
4347
## Documentation
4448

4549
### Limitations
@@ -48,9 +52,13 @@ Run manually as noted in [Test it out](#test-it-out), or add it to your CI using
4852
- Assuming OGC EDR API version 1.2 (draft)
4953
- Few, basic tests for now
5054
- Will focus more on profiles (limitations within the EDR spec) like <https://github.com/EURODEO/rodeo-edr-profile> than the full EDR spec.
51-
- Use --rodeo-profile to force a test against the profile (will happen automatically if conformance includes the profile)
55+
- Use --rodeo-profile to force a test against the profile
56+
57+
### Testing the sedr code to look for regressions
58+
59+
For development, source a venv and run `tox p` to run all tests.
5260

53-
### Understanding errors
61+
### Understanding errors from schemathesis
5462

5563
For each "FAILED" line, you can scroll back to see the full error and, if relevant, with a curl-example to reproduce it.
5664

@@ -96,7 +104,7 @@ ERROR sedr/schemat.py - schemathesis.exceptions.SchemaError: Failed to load sche
96104
97105
#### Wrong API version / missing conformance link
98106
99-
Sedr supports EDR 1.1, but the API is EDR 1.0.
107+
Sedr wants EDR 1.1, but the API is EDR 1.0.
100108
101109
```python
102110
if not requirementA2_2_A5:

sedr/schemat.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,6 @@ def test_edr_collections(case):
115115
"test_collections found collection id %s", collection_json["id"]
116116
)
117117

118-
# Validation done in requrementA5_2
119-
extent = util.parse_spatial_bbox(collection_json)
120-
extents[collection_url] = tuple(extent[0])
121-
122118
# Run edr, ogc, profile tests
123119
for f in util.test_functions["collection"]:
124120
status, msg = f(collection_json)
@@ -127,6 +123,10 @@ def test_edr_collections(case):
127123
raise AssertionError(f"Test {f.__name__} failed with message: {msg}")
128124
util.logger.info("Test %s passed. (%s)", f.__name__, msg)
129125

126+
# Validation of spatial_bbox done above
127+
extent = util.parse_spatial_bbox(collection_json)
128+
extents[collection_url] = tuple(extent[0])
129+
130130

131131
for p in schema.raw_schema["paths"].keys():
132132
# Optionally include endpoints if they exist, otherwise schemathesis will refuse to run

0 commit comments

Comments
 (0)