-
Notifications
You must be signed in to change notification settings - Fork 7
#820: create simple regression test suite #823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 23 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
e649155
test: add first hurl tests for currentness and mapping saturation ind…
mmerdes 3d1ccf6
test: fix naming for currentness test and its payload # 820
mmerdes b6de411
test: fix naming for mapping saturation test and its payload # 820
mmerdes 13e1ecf
test: simplify naming #820
mmerdes ba0c202
test: add test for metadata endpoint and run-script #820
mmerdes f4cefc3
test: add test with topic and area such that indicator cannot be crea…
mmerdes facf38f
test: add test for road comparison #820
mmerdes 858daf8
test: add test for building comparison #820
mmerdes bc7e80e
test: adjust volatile test #820
mmerdes a647f01
test: add longer-running test for road currentnes #820
mmerdes ec259ab
test: improve check for content length #820
mmerdes f0f1386
test: add regexp matching alternative for description check #820
mmerdes d24cfba
test: add test for completeness of attribute 'address_housenumber' fo…
mmerdes 8ec9837
refactor: fix naming issue #820
mmerdes f890d0b
test: add test for completeness of attribute 'maxspeed' for roads #820
mmerdes d62537b
refactor: improve naming #820
mmerdes b9cee01
refactor: extract base_url variable from all test to env variable #820
mmerdes d17844b
feat: add per-stage run scripts: TEST #820
mmerdes e4b8d9c
feat: add per-stage run scripts: PROD #820
mmerdes be37f81
feat: add per-stage run scripts: DEV #820
mmerdes 63e5553
doc: add README with intro to hurl testing #820
mmerdes ceb4458
doc: describe regression tests in development docs #820
mmerdes 1acc239
doc: document new regression tests in change log #820
mmerdes ee78ede
Incorporate review feedback # 820
mmerdes f42714a
Incorporate review feedback # 820
mmerdes a16d040
Incorporate review feedback # 820
mmerdes 59fb901
Incorporate review feedback # 820
mmerdes 1849686
Incorporate review feedback # 820
mmerdes 0116cf8
Update regression-tests/__run_hurl_tests_for_stage.sh
mmerdes 74ea4be
Incorporate review feedback # 820
mmerdes 3646b8c
Incorporate review feedback # 820
mmerdes 0068fc4
Incorporate review feedback # 820
mmerdes 1194048
Incorporate review feedback # 820
mmerdes e6e76de
Incorporate review feedback (batched suggestions) # 820
mmerdes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Regression tests with hurl | ||
|
||
Hurl is an HTTP command line client and HTTP test tool: | ||
|
||
https://hurl.dev | ||
|
||
In order to run the HTTP tests in this directory, `hurl` must be installed. | ||
The tests can be run against the different stages using the following scripts: | ||
|
||
* [run_hurl_tests_DEV.sh](./run_hurl_tests_DEV.sh) | ||
* [run_hurl_tests_TEST.sh](./run_hurl_tests_TEST.sh) | ||
* [run_hurl_tests_PROD.sh](./run_hurl_tests_PROD.sh) | ||
|
||
Please note that you may get different results depending on the supported endpoints and connected spatial database of the system running on a given stage. | ||
|
||
An HTML-report with the results is generated here: | ||
|
||
[report/index.html](./report/index.html) | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# requires the env variable $HURL_base_url | ||
mmerdes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
rm -rf report | ||
mkdir report | ||
|
||
hurl *.hurl --report-html report | ||
|
||
mmerdes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
echo "\n\nhurl report: file://$PWD/report/index.html" | ||
|
||
# mac only: | ||
# open report/index.html | ||
mmerdes marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,264 @@ | ||
{ | ||
"topic": "building-area", | ||
"bpolys": { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"id": "admin_world_water.-1392136-_-Mechtersen", | ||
"geometry": { | ||
"type": "MultiPolygon", | ||
"coordinates": [ | ||
[ | ||
[ | ||
[ | ||
10.265479, | ||
53.292841 | ||
], | ||
[ | ||
10.268466, | ||
53.289283 | ||
], | ||
[ | ||
10.269601, | ||
53.287949 | ||
], | ||
[ | ||
10.273601, | ||
53.285098 | ||
], | ||
[ | ||
10.282639, | ||
53.278703 | ||
], | ||
[ | ||
10.276988, | ||
53.275121 | ||
], | ||
[ | ||
10.277516, | ||
53.273322 | ||
], | ||
[ | ||
10.275928, | ||
53.273074 | ||
], | ||
[ | ||
10.269857, | ||
53.273559 | ||
], | ||
[ | ||
10.269889, | ||
53.272413 | ||
], | ||
[ | ||
10.269892, | ||
53.272318 | ||
], | ||
[ | ||
10.268551, | ||
53.26638 | ||
], | ||
[ | ||
10.267856, | ||
53.2634 | ||
], | ||
[ | ||
10.267252, | ||
53.260808 | ||
], | ||
[ | ||
10.268023, | ||
53.259773 | ||
], | ||
[ | ||
10.273413, | ||
53.25984 | ||
], | ||
[ | ||
10.278369, | ||
53.259919 | ||
], | ||
[ | ||
10.282533, | ||
53.264359 | ||
], | ||
[ | ||
10.317224, | ||
53.263145 | ||
], | ||
[ | ||
10.320234, | ||
53.262952 | ||
], | ||
[ | ||
10.332321, | ||
53.273117 | ||
], | ||
[ | ||
10.332535, | ||
53.273305 | ||
], | ||
[ | ||
10.334421, | ||
53.279821 | ||
], | ||
[ | ||
10.333494, | ||
53.279896 | ||
], | ||
[ | ||
10.333618, | ||
53.281157 | ||
], | ||
[ | ||
10.333542, | ||
53.281765 | ||
], | ||
[ | ||
10.332881, | ||
53.283022 | ||
], | ||
[ | ||
10.332489, | ||
53.284407 | ||
], | ||
[ | ||
10.332515, | ||
53.284634 | ||
], | ||
[ | ||
10.332286, | ||
53.285151 | ||
], | ||
[ | ||
10.332067, | ||
53.28524 | ||
], | ||
[ | ||
10.331666, | ||
53.285226 | ||
], | ||
[ | ||
10.331364, | ||
53.285316 | ||
], | ||
[ | ||
10.329092, | ||
53.285174 | ||
], | ||
[ | ||
10.327606, | ||
53.2852 | ||
], | ||
[ | ||
10.317079, | ||
53.298367 | ||
], | ||
[ | ||
10.316994, | ||
53.298383 | ||
], | ||
[ | ||
10.305875, | ||
53.30052 | ||
], | ||
[ | ||
10.302164, | ||
53.301261 | ||
], | ||
[ | ||
10.301776, | ||
53.301339 | ||
], | ||
[ | ||
10.297672, | ||
53.29707 | ||
], | ||
[ | ||
10.29316, | ||
53.298999 | ||
], | ||
[ | ||
10.292739, | ||
53.298855 | ||
], | ||
[ | ||
10.287022, | ||
53.298217 | ||
], | ||
[ | ||
10.283959, | ||
53.296305 | ||
], | ||
[ | ||
10.281243, | ||
53.29531 | ||
], | ||
[ | ||
10.27852, | ||
53.294257 | ||
], | ||
[ | ||
10.277945, | ||
53.29438 | ||
], | ||
[ | ||
10.277808, | ||
53.294409 | ||
], | ||
[ | ||
10.275742, | ||
53.294849 | ||
], | ||
[ | ||
10.273617, | ||
53.295818 | ||
], | ||
[ | ||
10.272054, | ||
53.297669 | ||
], | ||
[ | ||
10.269823, | ||
53.294204 | ||
], | ||
[ | ||
10.267451, | ||
53.295826 | ||
], | ||
[ | ||
10.265479, | ||
53.292841 | ||
] | ||
] | ||
] | ||
] | ||
}, | ||
"geometry_name": "geom", | ||
"properties": { | ||
"id": -1392136, | ||
"iso": null, | ||
"name": "Mechtersen", | ||
"name_en": null, | ||
"local_name": "Mechtersen", | ||
"long_name": null, | ||
"boundary": "administrative", | ||
"admin_level": 8, | ||
"wikidata": "Q503766", | ||
"wikipedia": "de:Mechtersen", | ||
"parents": "[Ljava.lang.Integer;@4e286c37", | ||
"parent": -1969559, | ||
"min_scale": 1, | ||
"max_scale": 500000 | ||
}, | ||
"bbox": [ | ||
10.265478700000036, | ||
53.259772999999974, | ||
10.334420899999964, | ||
53.301338699999974 | ||
] | ||
} | ||
] | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
regression-tests/buildingarea_adminarea_buildingcomparison.hurl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
POST {{base_url}}/indicators/building-comparison | ||
mmerdes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
accept: application/json | ||
[Options] | ||
verbose: true | ||
file,buildingarea_adminarea.json; | ||
|
||
HTTP * | ||
|
||
[Asserts] | ||
duration < 20000 | ||
status == 200 | ||
bytes count > 2400 | ||
|
||
jsonpath "$.result[0].topic.name" == "Building Area" | ||
jsonpath "$.result[0].result.description" contains "The completeness of OSM buildings in your area-of-interest is high. The completeness in comparison to EUBUCCO is 104.27%. The completeness in comparison to Microsoft Building Footprints is 96.16%." | ||
jsonpath "$.result[0].result.label" == "green" | ||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.