Skip to content

Commit

Permalink
Merge pull request #842 from GIScience/Make-regression-test-suite-les…
Browse files Browse the repository at this point in the history
…s-brittle-#837

Make regression test suite less brittle #837
  • Loading branch information
mmerdes authored Nov 12, 2024
2 parents 62ed89b + 99a806b commit 5ac666d
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ 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.description" matches /^The completeness of OSM buildings in your area-of-interest is high. The completeness in comparison to EUBUCCO is 104.\d{2}%. The completeness in comparison to Microsoft Building Footprints is 96.\d{2}%.$/
jsonpath "$.result[0].result.label" == "green"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bytes count > 1700

jsonpath "$.result[0].metadata.name" == "Attribute Completeness"
jsonpath "$.result[0].topic.name" == "Building Count"
jsonpath "$.result[0].result.description" contains "The ratio of the features (all: 67.0) compared to features with expected tags (matched: 57.0) is 0.85."
jsonpath "$.result[0].result.description" matches /^85\.\d{1}% of all "building count" features \(all: 6\d{1} elements\) in your area of interest have the selected additional attribute house number address \(matched: 5\d{1} elements\)\. The attribute completeness is high \(>75%\)\.$/
jsonpath "$.result[0].result.figure.data[0].gauge.steps[0].color" == "tomato"
jsonpath "$.result[0].result.label" == "green"

Expand Down
3 changes: 2 additions & 1 deletion regression-tests/buildingcount_bbox_currentness.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ status == 200
bytes count > 20000

jsonpath "$.result[0].topic.name" == "Building Count"
jsonpath "$.result[0].result.description" contains "In the area of interest 16% of the 67 features were edited"
jsonpath "$.result[0].result.description" matches /^In the area of interest 1\d{1}% of the 6\d{1} features were edited \(created or modified\) for the last time in the period between .. ... 20.. and .. ... 20...
|Many features are out-of-date.$/
jsonpath "$.result[0].result.figure.data[1].marker.color" == "#21BA45"
jsonpath "$.result[0].result.label" == "red"

Expand Down
2 changes: 1 addition & 1 deletion regression-tests/buildingcount_bbox_housenumber.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"topic": "building-count",
"attribute": "address-housenumber",
"attributes": ["address-housenumber"],
"bpolys": {
"type": "FeatureCollection",
"features": [
Expand Down
1 change: 0 additions & 1 deletion regression-tests/roads_adminarea_roadcomparison.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ status == 200
bytes count > 2200

jsonpath "$.result[0].topic.name" == "Roads"
jsonpath "$.result[0].result.description" contains "Microsoft Roads has a road length of 31.94 km, of which 31.82 km are covered by roads in OSM. The completeness of OSM roads in your area-of-interest is high."
jsonpath "$.result[0].result.description" matches /^Microsoft Roads has a road length of 31.\d{2} km, of which 31.\d{2} km are covered by roads in OSM. The completeness of OSM roads in your area-of-interest is high.$/
jsonpath "$.result[0].result.label" == "green"

Expand Down
2 changes: 1 addition & 1 deletion regression-tests/roads_polygon_attributecompleteness.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bytes count > 1900

jsonpath "$.result[0].metadata.name" == "Attribute Completeness"
jsonpath "$.result[0].topic.name" == "Roads"
jsonpath "$.result[0].result.description" contains "The ratio of the features (all: 1034408.4) compared to features with expected tags (matched: 278118.2) is 0.27. Around 25-75% of the features match the expected tags."
jsonpath "$.result[0].result.description" matches /^26\.\d{1}% of all "roads" features \(all: 103\d{4}\.\d{2} m\) in your area of interest have the selected additional attribute maxspeed \(matched: 278\d{3}\.\d{2} m\)\. The attribute completeness is medium \(25%-75%\)\.$/
jsonpath "$.result[0].result.figure.data[0].gauge.steps[0].color" == "tomato"
jsonpath "$.result[0].result.label" == "yellow"

Expand Down
2 changes: 1 addition & 1 deletion regression-tests/roads_polygon_mappingsaturation.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ status == 200
bytes count > 24000

jsonpath "$.result[0].topic.name" == "Roads"
jsonpath "$.result[0].result.description" contains "The saturation of the last 3 years is 98.46%.High saturation has been reached (97% < Saturation ≤ 100%)."
jsonpath "$.result[0].result.description" matches /^The saturation of the last 3 years is 98.\d{2}%.High saturation has been reached \(97% < Saturation ≤ 100%\).$/
jsonpath "$.result[0].result.figure.data[0].line.color" == "#2185D0"
jsonpath "$.result[0].result.label" == "green"

Expand Down
2 changes: 1 addition & 1 deletion regression-tests/roads_polygon_maxspeed.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"topic": "roads",
"attribute": "maxspeed",
"attributes": ["maxspeed"],
"bpolys": {
"type": "FeatureCollection",
"features": [
Expand Down

0 comments on commit 5ac666d

Please sign in to comment.