From e6491554368825605be1031f0404028fa9b06ff5 Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Tue, 3 Sep 2024 17:34:30 +0200 Subject: [PATCH 01/34] test: add first hurl tests for currentness and mapping saturation indicators # 820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- .../building_count_currentness_bbox.hurl | 21 ++++++++ ...ilding_count_currentness_bbox.payload.json | 48 +++++++++++++++++++ .../roads_mapping_saturation_polygon.hurl | 22 +++++++++ ...ds_mapping_saturation_polygon.payload.json | 46 ++++++++++++++++++ 4 files changed, 137 insertions(+) create mode 100644 regression-tests/building_count_currentness_bbox.hurl create mode 100644 regression-tests/building_count_currentness_bbox.payload.json create mode 100644 regression-tests/roads_mapping_saturation_polygon.hurl create mode 100644 regression-tests/roads_mapping_saturation_polygon.payload.json diff --git a/regression-tests/building_count_currentness_bbox.hurl b/regression-tests/building_count_currentness_bbox.hurl new file mode 100644 index 000000000..059b71bdd --- /dev/null +++ b/regression-tests/building_count_currentness_bbox.hurl @@ -0,0 +1,21 @@ +POST https://api.quality.ohsome.org/v1-test/indicators/currentness +accept: application/json +[Options] +verbose: true +file,building_count_currentness.payload.json; + +HTTP * + +[Asserts] +duration < 20000 +status == 200 +header "content-length" contains "20" + +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.figure.data[1].marker.color" == "#21BA45" +jsonpath "$.result[0].result.label" == "red" + + + + diff --git a/regression-tests/building_count_currentness_bbox.payload.json b/regression-tests/building_count_currentness_bbox.payload.json new file mode 100644 index 000000000..504c080b5 --- /dev/null +++ b/regression-tests/building_count_currentness_bbox.payload.json @@ -0,0 +1,48 @@ +{ + "topic": "building-count", + "bpolys": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": "box 1", + "bbox": [ + 8.748488, + 49.47397, + 8.7532061, + 49.4767595 + ], + "properties": { + "id": "box 1" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 8.748488, + 49.47397 + ], + [ + 8.7532061, + 49.47397 + ], + [ + 8.7532061, + 49.4767595 + ], + [ + 8.748488, + 49.4767595 + ], + [ + 8.748488, + 49.47397 + ] + ] + ] + } + } + ] + } +} \ No newline at end of file diff --git a/regression-tests/roads_mapping_saturation_polygon.hurl b/regression-tests/roads_mapping_saturation_polygon.hurl new file mode 100644 index 000000000..4d7f96d22 --- /dev/null +++ b/regression-tests/roads_mapping_saturation_polygon.hurl @@ -0,0 +1,22 @@ +POST https://api.quality.ohsome.org/v1-test/indicators/mapping-saturation +accept: application/json +[Options] +verbose: true +file,roads_mapping_saturation_polygon.payload.json; + +HTTP * + +[Asserts] +duration < 20000 +status == 200 +header "content-length" contains "24" + +jsonpath "$.result[0].topic.name" == "Roads" +jsonpath "$.result[0].result.description" contains "The saturation of the last 3 years is 98.3%.High saturation has been reached (97% < Saturation ≤ 100%)." +jsonpath "$.result[0].result.figure.data[0].line.color" == "#2185D0" +jsonpath "$.result[0].result.label" == "green" + + + + + diff --git a/regression-tests/roads_mapping_saturation_polygon.payload.json b/regression-tests/roads_mapping_saturation_polygon.payload.json new file mode 100644 index 000000000..5fe6ae928 --- /dev/null +++ b/regression-tests/roads_mapping_saturation_polygon.payload.json @@ -0,0 +1,46 @@ +{ + "topic": "roads", + "bpolys": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": "area 1", + "properties": { + "id": "area 1" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 100.4674621, + 5.1745498 + ], + [ + 100.4832462, + 5.1827608 + ], + [ + 100.4952558, + 5.1701022 + ], + [ + 100.4870207, + 5.1547062 + ], + [ + 100.4678053, + 5.1588118 + ], + [ + 100.4674621, + 5.1745498 + ] + ] + ] + } + } + ] + } +} \ No newline at end of file From 3d1ccf6c3586791916bd4330a5dc3709c6fec05e Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Tue, 3 Sep 2024 17:37:06 +0200 Subject: [PATCH 02/34] test: fix naming for currentness test and its payload # 820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- ...tness_bbox.payload.json => building_count_bbox.payload.json} | 0 ...rrentness_bbox.hurl => building_count_bbox_currentness.hurl} | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename regression-tests/{building_count_currentness_bbox.payload.json => building_count_bbox.payload.json} (100%) rename regression-tests/{building_count_currentness_bbox.hurl => building_count_bbox_currentness.hurl} (91%) diff --git a/regression-tests/building_count_currentness_bbox.payload.json b/regression-tests/building_count_bbox.payload.json similarity index 100% rename from regression-tests/building_count_currentness_bbox.payload.json rename to regression-tests/building_count_bbox.payload.json diff --git a/regression-tests/building_count_currentness_bbox.hurl b/regression-tests/building_count_bbox_currentness.hurl similarity index 91% rename from regression-tests/building_count_currentness_bbox.hurl rename to regression-tests/building_count_bbox_currentness.hurl index 059b71bdd..2a23a61b8 100644 --- a/regression-tests/building_count_currentness_bbox.hurl +++ b/regression-tests/building_count_bbox_currentness.hurl @@ -2,7 +2,7 @@ POST https://api.quality.ohsome.org/v1-test/indicators/currentness accept: application/json [Options] verbose: true -file,building_count_currentness.payload.json; +file,building_count_bbox.payload.json; HTTP * From b6de411d58c8a1d88ad800e3fb8a4ef99194fb34 Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Tue, 3 Sep 2024 17:38:37 +0200 Subject: [PATCH 03/34] test: fix naming for mapping saturation test and its payload # 820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- regression-tests/roads_mapping_saturation_polygon.hurl | 2 +- ...turation_polygon.payload.json => roads_polygon.payload.json} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename regression-tests/{roads_mapping_saturation_polygon.payload.json => roads_polygon.payload.json} (100%) diff --git a/regression-tests/roads_mapping_saturation_polygon.hurl b/regression-tests/roads_mapping_saturation_polygon.hurl index 4d7f96d22..0b675abad 100644 --- a/regression-tests/roads_mapping_saturation_polygon.hurl +++ b/regression-tests/roads_mapping_saturation_polygon.hurl @@ -2,7 +2,7 @@ POST https://api.quality.ohsome.org/v1-test/indicators/mapping-saturation accept: application/json [Options] verbose: true -file,roads_mapping_saturation_polygon.payload.json; +file,roads_polygon.payload.json; HTTP * diff --git a/regression-tests/roads_mapping_saturation_polygon.payload.json b/regression-tests/roads_polygon.payload.json similarity index 100% rename from regression-tests/roads_mapping_saturation_polygon.payload.json rename to regression-tests/roads_polygon.payload.json From 13e1ecf6b6f5bc021b154df5073dae705e2129b6 Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Fri, 6 Sep 2024 13:56:01 +0200 Subject: [PATCH 04/34] test: simplify naming #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- ...building_count_bbox.payload.json => buildingcount_bbox.json} | 0 ...box_currentness.hurl => buildingcount_bbox_currentness.hurl} | 2 +- .../{roads_polygon.payload.json => roads_polygon.json} | 0 ...ration_polygon.hurl => roads_polygon_mappingsaturation.hurl} | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename regression-tests/{building_count_bbox.payload.json => buildingcount_bbox.json} (100%) rename regression-tests/{building_count_bbox_currentness.hurl => buildingcount_bbox_currentness.hurl} (92%) rename regression-tests/{roads_polygon.payload.json => roads_polygon.json} (100%) rename regression-tests/{roads_mapping_saturation_polygon.hurl => roads_polygon_mappingsaturation.hurl} (94%) diff --git a/regression-tests/building_count_bbox.payload.json b/regression-tests/buildingcount_bbox.json similarity index 100% rename from regression-tests/building_count_bbox.payload.json rename to regression-tests/buildingcount_bbox.json diff --git a/regression-tests/building_count_bbox_currentness.hurl b/regression-tests/buildingcount_bbox_currentness.hurl similarity index 92% rename from regression-tests/building_count_bbox_currentness.hurl rename to regression-tests/buildingcount_bbox_currentness.hurl index 2a23a61b8..ff1b37109 100644 --- a/regression-tests/building_count_bbox_currentness.hurl +++ b/regression-tests/buildingcount_bbox_currentness.hurl @@ -2,7 +2,7 @@ POST https://api.quality.ohsome.org/v1-test/indicators/currentness accept: application/json [Options] verbose: true -file,building_count_bbox.payload.json; +file,buildingcount_bbox.json; HTTP * diff --git a/regression-tests/roads_polygon.payload.json b/regression-tests/roads_polygon.json similarity index 100% rename from regression-tests/roads_polygon.payload.json rename to regression-tests/roads_polygon.json diff --git a/regression-tests/roads_mapping_saturation_polygon.hurl b/regression-tests/roads_polygon_mappingsaturation.hurl similarity index 94% rename from regression-tests/roads_mapping_saturation_polygon.hurl rename to regression-tests/roads_polygon_mappingsaturation.hurl index 0b675abad..a1dffecac 100644 --- a/regression-tests/roads_mapping_saturation_polygon.hurl +++ b/regression-tests/roads_polygon_mappingsaturation.hurl @@ -2,7 +2,7 @@ POST https://api.quality.ohsome.org/v1-test/indicators/mapping-saturation accept: application/json [Options] verbose: true -file,roads_polygon.payload.json; +file,roads_polygon.json; HTTP * From ba0c202e92d285043ca72e67f18ce71af41328ad Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Fri, 6 Sep 2024 14:57:15 +0200 Subject: [PATCH 05/34] test: add test for metadata endpoint and run-script #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- regression-tests/metadata.hurl | 19 +++++++++++++++++++ regression-tests/run_all_hurl_tests.sh | 1 + 2 files changed, 20 insertions(+) create mode 100644 regression-tests/metadata.hurl create mode 100755 regression-tests/run_all_hurl_tests.sh diff --git a/regression-tests/metadata.hurl b/regression-tests/metadata.hurl new file mode 100644 index 000000000..8561ff584 --- /dev/null +++ b/regression-tests/metadata.hurl @@ -0,0 +1,19 @@ +GET https://api.quality.ohsome.org/v1-test/metadata?project=all +accept: application/json +[Options] +verbose: true + +HTTP * + +[Asserts] +duration < 2000 +status == 200 +header "content-length" contains "25" + + +jsonpath "$.result.indicators.mapping-saturation.description" contains "Calculate if mapping has saturated." +jsonpath "$.result.indicators.currentness.description" contains "Estimate currentness of features" +jsonpath "$.result.topics.building-count.aggregationType" == "count" +jsonpath "$.result.topics.roads.aggregationType" == "length" +jsonpath "$.result.qualityDimensions.minimal.name" == "Minimal" +jsonpath "$.result.projects.core.description" == "something that is still a TODO" diff --git a/regression-tests/run_all_hurl_tests.sh b/regression-tests/run_all_hurl_tests.sh new file mode 100755 index 000000000..4f7033dd1 --- /dev/null +++ b/regression-tests/run_all_hurl_tests.sh @@ -0,0 +1 @@ +hurl *.hurl --report-html report \ No newline at end of file From f4cefc3698cb6e1a7bd4db1a78d78537de9f281d Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Fri, 6 Sep 2024 15:20:16 +0200 Subject: [PATCH 06/34] test: add test with topic and area such that indicator cannot be created #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- regression-tests/hospitals_adminarea.json | 264 ++++++++++++++++++ ...inarea_mappingsaturation__no_features.hurl | 19 ++ regression-tests/run_all_hurl_tests.sh | 7 +- 3 files changed, 289 insertions(+), 1 deletion(-) create mode 100644 regression-tests/hospitals_adminarea.json create mode 100644 regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl diff --git a/regression-tests/hospitals_adminarea.json b/regression-tests/hospitals_adminarea.json new file mode 100644 index 000000000..1cf983729 --- /dev/null +++ b/regression-tests/hospitals_adminarea.json @@ -0,0 +1,264 @@ +{ + "topic": "hospitals", + "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 + ] + } + ] + } +} \ No newline at end of file diff --git a/regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl b/regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl new file mode 100644 index 000000000..a7b316f52 --- /dev/null +++ b/regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl @@ -0,0 +1,19 @@ +POST https://api.quality.ohsome.org/v1-test/indicators/mapping-saturation +accept: application/json +[Options] +verbose: true +file,hospitals_adminarea.json; + +HTTP * + +[Asserts] +duration < 20000 +status == 200 +header "content-length" contains "16" + + +jsonpath "$.result[0].topic.name" == "Hospitals" +jsonpath "$.result[0].result.description" == "No features were mapped in this region." +jsonpath "$.result[0].result.figure.data[0].labels[0]" == "The creation of the Indicator was unsuccessful." + + diff --git a/regression-tests/run_all_hurl_tests.sh b/regression-tests/run_all_hurl_tests.sh index 4f7033dd1..21e0375e8 100755 --- a/regression-tests/run_all_hurl_tests.sh +++ b/regression-tests/run_all_hurl_tests.sh @@ -1 +1,6 @@ -hurl *.hurl --report-html report \ No newline at end of file +rm -rf report +mkdir report + +hurl *.hurl --report-html report + +open report/index.html \ No newline at end of file From facf38ff7243782ee96e6c946a18cb2ece19dffb Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Fri, 6 Sep 2024 15:26:54 +0200 Subject: [PATCH 07/34] test: add test for road comparison #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- regression-tests/roads_adminarea.json | 264 ++++++++++++++++++ .../roads_adminarea_roadcomparison.hurl | 21 ++ 2 files changed, 285 insertions(+) create mode 100644 regression-tests/roads_adminarea.json create mode 100644 regression-tests/roads_adminarea_roadcomparison.hurl diff --git a/regression-tests/roads_adminarea.json b/regression-tests/roads_adminarea.json new file mode 100644 index 000000000..6af4b33f8 --- /dev/null +++ b/regression-tests/roads_adminarea.json @@ -0,0 +1,264 @@ +{ + "topic": "roads", + "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 + ] + } + ] + } +} \ No newline at end of file diff --git a/regression-tests/roads_adminarea_roadcomparison.hurl b/regression-tests/roads_adminarea_roadcomparison.hurl new file mode 100644 index 000000000..63cb0ab13 --- /dev/null +++ b/regression-tests/roads_adminarea_roadcomparison.hurl @@ -0,0 +1,21 @@ +POST https://api.quality.ohsome.org/v1-test/indicators/road-comparison +accept: application/json +[Options] +verbose: true +file,roads_adminarea.json; + +HTTP * + +[Asserts] +duration < 20000 +status == 200 +header "content-length" contains "22" + +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.label" == "green" + + + + + From 858daf811b4cba7449c621e3cb47634b15b85127 Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Fri, 6 Sep 2024 15:32:53 +0200 Subject: [PATCH 08/34] test: add test for building comparison #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- regression-tests/buildingarea_adminarea.json | 264 ++++++++++++++++++ ...dingarea_adminarea_buildingcomparison.hurl | 21 ++ 2 files changed, 285 insertions(+) create mode 100644 regression-tests/buildingarea_adminarea.json create mode 100644 regression-tests/buildingarea_adminarea_buildingcomparison.hurl diff --git a/regression-tests/buildingarea_adminarea.json b/regression-tests/buildingarea_adminarea.json new file mode 100644 index 000000000..f671639ca --- /dev/null +++ b/regression-tests/buildingarea_adminarea.json @@ -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 + ] + } + ] + } +} \ No newline at end of file diff --git a/regression-tests/buildingarea_adminarea_buildingcomparison.hurl b/regression-tests/buildingarea_adminarea_buildingcomparison.hurl new file mode 100644 index 000000000..bddd27228 --- /dev/null +++ b/regression-tests/buildingarea_adminarea_buildingcomparison.hurl @@ -0,0 +1,21 @@ +POST https://api.quality.ohsome.org/v1-test/indicators/building-comparison +accept: application/json +[Options] +verbose: true +file,buildingarea_adminarea.json; + +HTTP * + +[Asserts] +duration < 20000 +status == 200 +header "content-length" contains "24" + +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" + + + + + From bc7e80e1e6442d214a4a0dc588a75b4bf76f9f5b Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Fri, 6 Sep 2024 17:29:13 +0200 Subject: [PATCH 09/34] test: adjust volatile test #820 https://github.com/GIScience/ohsome-quality-api/issues/820 Co-authored-by: --- regression-tests/metadata.hurl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regression-tests/metadata.hurl b/regression-tests/metadata.hurl index 8561ff584..a880e465b 100644 --- a/regression-tests/metadata.hurl +++ b/regression-tests/metadata.hurl @@ -8,7 +8,7 @@ HTTP * [Asserts] duration < 2000 status == 200 -header "content-length" contains "25" +header "content-length" contains "27" jsonpath "$.result.indicators.mapping-saturation.description" contains "Calculate if mapping has saturated." From a647f01c0bf456be26853c5154b70e55c8843f4f Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Mon, 9 Sep 2024 16:21:30 +0200 Subject: [PATCH 10/34] test: add longer-running test for road currentnes #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- regression-tests/long-running/roads_bbox.json | 48 +++++++++++++++++++ .../long-running/roads_bbox_currentness.hurl | 21 ++++++++ regression-tests/run_all_hurl_tests.sh | 5 +- 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 regression-tests/long-running/roads_bbox.json create mode 100644 regression-tests/long-running/roads_bbox_currentness.hurl diff --git a/regression-tests/long-running/roads_bbox.json b/regression-tests/long-running/roads_bbox.json new file mode 100644 index 000000000..f3e405d0a --- /dev/null +++ b/regression-tests/long-running/roads_bbox.json @@ -0,0 +1,48 @@ +{ + "topic": "roads", + "bpolys": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": "box 1", + "bbox": [ + 8.748488, + 49.47397, + 8.7532061, + 49.4767595 + ], + "properties": { + "id": "box 1" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 8.748488, + 49.47397 + ], + [ + 8.7532061, + 49.47397 + ], + [ + 8.7532061, + 49.4767595 + ], + [ + 8.748488, + 49.4767595 + ], + [ + 8.748488, + 49.47397 + ] + ] + ] + } + } + ] + } +} \ No newline at end of file diff --git a/regression-tests/long-running/roads_bbox_currentness.hurl b/regression-tests/long-running/roads_bbox_currentness.hurl new file mode 100644 index 000000000..a161afd73 --- /dev/null +++ b/regression-tests/long-running/roads_bbox_currentness.hurl @@ -0,0 +1,21 @@ +POST https://api.quality.ohsome.org/v1-test/indicators/currentness +accept: application/json +[Options] +verbose: true +file,roads_bbox.json; + +HTTP * + +[Asserts] +duration < 300000 +status == 200 +header "content-length" contains "20" + +jsonpath "$.result[0].topic.name" == "Roads" +jsonpath "$.result[0].result.description" contains "Please note that in the area of interest less than 25 features of the selected topic are present today." +jsonpath "$.result[0].result.figure.data[1].marker.color" == "#21BA45" +jsonpath "$.result[0].result.label" == "green" + + + + diff --git a/regression-tests/run_all_hurl_tests.sh b/regression-tests/run_all_hurl_tests.sh index 21e0375e8..9d68d4271 100755 --- a/regression-tests/run_all_hurl_tests.sh +++ b/regression-tests/run_all_hurl_tests.sh @@ -3,4 +3,7 @@ mkdir report hurl *.hurl --report-html report -open report/index.html \ No newline at end of file +echo "hurl report: file://$PWD/report/index.html" + +# mac only: +# open report/index.html \ No newline at end of file From ec259abeaaf17dc63e6f159371cdc97e2a529d5b Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Mon, 9 Sep 2024 16:48:10 +0200 Subject: [PATCH 11/34] test: improve check for content length #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- .../buildingarea_adminarea_buildingcomparison.hurl | 2 +- regression-tests/buildingcount_bbox_currentness.hurl | 2 +- .../hospitals_adminarea_mappingsaturation__no_features.hurl | 3 +-- regression-tests/metadata.hurl | 3 +-- regression-tests/roads_adminarea_roadcomparison.hurl | 4 ++-- regression-tests/roads_polygon_mappingsaturation.hurl | 2 +- regression-tests/run_all_hurl_tests.sh | 2 +- 7 files changed, 8 insertions(+), 10 deletions(-) diff --git a/regression-tests/buildingarea_adminarea_buildingcomparison.hurl b/regression-tests/buildingarea_adminarea_buildingcomparison.hurl index bddd27228..6d2cdced6 100644 --- a/regression-tests/buildingarea_adminarea_buildingcomparison.hurl +++ b/regression-tests/buildingarea_adminarea_buildingcomparison.hurl @@ -9,7 +9,7 @@ HTTP * [Asserts] duration < 20000 status == 200 -header "content-length" contains "24" +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%." diff --git a/regression-tests/buildingcount_bbox_currentness.hurl b/regression-tests/buildingcount_bbox_currentness.hurl index ff1b37109..43a51377e 100644 --- a/regression-tests/buildingcount_bbox_currentness.hurl +++ b/regression-tests/buildingcount_bbox_currentness.hurl @@ -9,7 +9,7 @@ HTTP * [Asserts] duration < 20000 status == 200 -header "content-length" contains "20" +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" diff --git a/regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl b/regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl index a7b316f52..a4eb6ef12 100644 --- a/regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl +++ b/regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl @@ -9,8 +9,7 @@ HTTP * [Asserts] duration < 20000 status == 200 -header "content-length" contains "16" - +bytes count > 1600 jsonpath "$.result[0].topic.name" == "Hospitals" jsonpath "$.result[0].result.description" == "No features were mapped in this region." diff --git a/regression-tests/metadata.hurl b/regression-tests/metadata.hurl index a880e465b..29f66167b 100644 --- a/regression-tests/metadata.hurl +++ b/regression-tests/metadata.hurl @@ -8,8 +8,7 @@ HTTP * [Asserts] duration < 2000 status == 200 -header "content-length" contains "27" - +bytes count > 27000 jsonpath "$.result.indicators.mapping-saturation.description" contains "Calculate if mapping has saturated." jsonpath "$.result.indicators.currentness.description" contains "Estimate currentness of features" diff --git a/regression-tests/roads_adminarea_roadcomparison.hurl b/regression-tests/roads_adminarea_roadcomparison.hurl index 63cb0ab13..c4d4c0a7b 100644 --- a/regression-tests/roads_adminarea_roadcomparison.hurl +++ b/regression-tests/roads_adminarea_roadcomparison.hurl @@ -7,9 +7,9 @@ file,roads_adminarea.json; HTTP * [Asserts] -duration < 20000 +duration < 5000 status == 200 -header "content-length" contains "22" +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." diff --git a/regression-tests/roads_polygon_mappingsaturation.hurl b/regression-tests/roads_polygon_mappingsaturation.hurl index a1dffecac..9aa446e5c 100644 --- a/regression-tests/roads_polygon_mappingsaturation.hurl +++ b/regression-tests/roads_polygon_mappingsaturation.hurl @@ -9,7 +9,7 @@ HTTP * [Asserts] duration < 20000 status == 200 -header "content-length" contains "24" +bytes count > 24000 jsonpath "$.result[0].topic.name" == "Roads" jsonpath "$.result[0].result.description" contains "The saturation of the last 3 years is 98.3%.High saturation has been reached (97% < Saturation ≤ 100%)." diff --git a/regression-tests/run_all_hurl_tests.sh b/regression-tests/run_all_hurl_tests.sh index 9d68d4271..055a2b4a4 100755 --- a/regression-tests/run_all_hurl_tests.sh +++ b/regression-tests/run_all_hurl_tests.sh @@ -3,7 +3,7 @@ mkdir report hurl *.hurl --report-html report -echo "hurl report: file://$PWD/report/index.html" +echo "\n\nhurl report: file://$PWD/report/index.html" # mac only: # open report/index.html \ No newline at end of file From f0f1386886d3908dbff7e5dbd13dbe0fdcc2ffd2 Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Mon, 9 Sep 2024 17:35:07 +0200 Subject: [PATCH 12/34] test: add regexp matching alternative for description check #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- regression-tests/long-running/roads_bbox_currentness.hurl | 2 +- regression-tests/roads_adminarea_roadcomparison.hurl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/regression-tests/long-running/roads_bbox_currentness.hurl b/regression-tests/long-running/roads_bbox_currentness.hurl index a161afd73..cd593cb36 100644 --- a/regression-tests/long-running/roads_bbox_currentness.hurl +++ b/regression-tests/long-running/roads_bbox_currentness.hurl @@ -9,7 +9,7 @@ HTTP * [Asserts] duration < 300000 status == 200 -header "content-length" contains "20" +bytes count > 20000 jsonpath "$.result[0].topic.name" == "Roads" jsonpath "$.result[0].result.description" contains "Please note that in the area of interest less than 25 features of the selected topic are present today." diff --git a/regression-tests/roads_adminarea_roadcomparison.hurl b/regression-tests/roads_adminarea_roadcomparison.hurl index c4d4c0a7b..ce29b3975 100644 --- a/regression-tests/roads_adminarea_roadcomparison.hurl +++ b/regression-tests/roads_adminarea_roadcomparison.hurl @@ -13,6 +13,7 @@ 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" From d24cfba912051eb247519ad75c486dc2ac20a506 Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Mon, 9 Sep 2024 18:08:28 +0200 Subject: [PATCH 13/34] test: add test for completeness of attribute 'address_housenumber' for building count #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- ...dingcount_attribute_completeness_bbox.json | 49 +++++++++++++++++++ ...tribute_completeness_bbox_currentness.hurl | 22 +++++++++ 2 files changed, 71 insertions(+) create mode 100644 regression-tests/buildingcount_attribute_completeness_bbox.json create mode 100644 regression-tests/buildingcount_attribute_completeness_bbox_currentness.hurl diff --git a/regression-tests/buildingcount_attribute_completeness_bbox.json b/regression-tests/buildingcount_attribute_completeness_bbox.json new file mode 100644 index 000000000..d3197bd56 --- /dev/null +++ b/regression-tests/buildingcount_attribute_completeness_bbox.json @@ -0,0 +1,49 @@ +{ + "topic": "building-count", + "attribute": "address_housenumber", + "bpolys": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": "box 1", + "bbox": [ + 8.748488, + 49.47397, + 8.7532061, + 49.4767595 + ], + "properties": { + "id": "box 1" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 8.748488, + 49.47397 + ], + [ + 8.7532061, + 49.47397 + ], + [ + 8.7532061, + 49.4767595 + ], + [ + 8.748488, + 49.4767595 + ], + [ + 8.748488, + 49.47397 + ] + ] + ] + } + } + ] + } +} \ No newline at end of file diff --git a/regression-tests/buildingcount_attribute_completeness_bbox_currentness.hurl b/regression-tests/buildingcount_attribute_completeness_bbox_currentness.hurl new file mode 100644 index 000000000..822e63979 --- /dev/null +++ b/regression-tests/buildingcount_attribute_completeness_bbox_currentness.hurl @@ -0,0 +1,22 @@ +POST https://api.quality.ohsome.org/v1-test/indicators/attribute-completeness +accept: application/json +[Options] +verbose: true +file,buildingcount_attribute_completeness_bbox.json; + +HTTP * + +[Asserts] +duration < 20000 +status == 200 +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.figure.data[0].gauge.steps[0].color" == "tomato" +jsonpath "$.result[0].result.label" == "green" + + + + From 8ec983775a25ba2e5d4677304eb06dff4cf76894 Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Tue, 10 Sep 2024 11:53:28 +0200 Subject: [PATCH 14/34] refactor: fix naming issue #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- ...ness.hurl => buildingcount_bbox_attribute_completeness.hurl} | 2 +- ...mpleteness_bbox.json => buildingcount_bbox_housenumber.json} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename regression-tests/{buildingcount_attribute_completeness_bbox_currentness.hurl => buildingcount_bbox_attribute_completeness.hurl} (91%) rename regression-tests/{buildingcount_attribute_completeness_bbox.json => buildingcount_bbox_housenumber.json} (100%) diff --git a/regression-tests/buildingcount_attribute_completeness_bbox_currentness.hurl b/regression-tests/buildingcount_bbox_attribute_completeness.hurl similarity index 91% rename from regression-tests/buildingcount_attribute_completeness_bbox_currentness.hurl rename to regression-tests/buildingcount_bbox_attribute_completeness.hurl index 822e63979..65d9a3c27 100644 --- a/regression-tests/buildingcount_attribute_completeness_bbox_currentness.hurl +++ b/regression-tests/buildingcount_bbox_attribute_completeness.hurl @@ -2,7 +2,7 @@ POST https://api.quality.ohsome.org/v1-test/indicators/attribute-completeness accept: application/json [Options] verbose: true -file,buildingcount_attribute_completeness_bbox.json; +file,buildingcount_bbox_housenumber.json; HTTP * diff --git a/regression-tests/buildingcount_attribute_completeness_bbox.json b/regression-tests/buildingcount_bbox_housenumber.json similarity index 100% rename from regression-tests/buildingcount_attribute_completeness_bbox.json rename to regression-tests/buildingcount_bbox_housenumber.json From f890d0b64f1030e80c6f0a2592022d9cf11991c4 Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Tue, 10 Sep 2024 12:08:09 +0200 Subject: [PATCH 15/34] test: add test for completeness of attribute 'maxspeed' for roads #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- .gitignore | 1 + .../roads_polygon_attribute_completeness.hurl | 22 +++++++++++ ...lygon_attribute_completeness_maxspeed.json | 39 +++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 regression-tests/roads_polygon_attribute_completeness.hurl create mode 100644 regression-tests/roads_polygon_attribute_completeness_maxspeed.json diff --git a/.gitignore b/.gitignore index 61e572d73..152f54315 100644 --- a/.gitignore +++ b/.gitignore @@ -152,3 +152,4 @@ cython_debug/ !/config/sample.config.yaml !/config/logging.yaml /tests/*/fixtures/approved/*.received.txt +/regression-tests/report/ diff --git a/regression-tests/roads_polygon_attribute_completeness.hurl b/regression-tests/roads_polygon_attribute_completeness.hurl new file mode 100644 index 000000000..95abe8f24 --- /dev/null +++ b/regression-tests/roads_polygon_attribute_completeness.hurl @@ -0,0 +1,22 @@ +POST https://api.quality.ohsome.org/v1-test/indicators/attribute-completeness +accept: application/json +[Options] +verbose: true +file,roads_polygon_attribute_completeness_maxspeed.json; + +HTTP * + +[Asserts] +duration < 5000 +status == 200 +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: 1034299.9) compared to features with expected tags (matched: 276785.2) is 0.27." +jsonpath "$.result[0].result.figure.data[0].gauge.steps[0].color" == "tomato" +jsonpath "$.result[0].result.label" == "yellow" + + + + diff --git a/regression-tests/roads_polygon_attribute_completeness_maxspeed.json b/regression-tests/roads_polygon_attribute_completeness_maxspeed.json new file mode 100644 index 000000000..9a9bce412 --- /dev/null +++ b/regression-tests/roads_polygon_attribute_completeness_maxspeed.json @@ -0,0 +1,39 @@ +{ + "topic": "roads", + "attribute": "maxspeed", + "bpolys": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": "area 1", + "properties": { + "id": "area 1" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 8.643064, + 49.4412261 + ], + [ + 8.6595344, + 49.3665657 + ], + [ + 8.790611, + 49.4280458 + ], + [ + 8.643064, + 49.4412261 + ] + ] + ] + } + } + ] + } +} \ No newline at end of file From d62537b83ae18a0538774b105b11fcd92955b8cf Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Tue, 10 Sep 2024 12:11:38 +0200 Subject: [PATCH 16/34] refactor: improve naming #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- ...eness.hurl => buildingcount_bbox_attributecompleteness.hurl} | 0 ...mpleteness.hurl => roads_polygon_attributecompleteness.hurl} | 2 +- ...e_completeness_maxspeed.json => roads_polygon_maxspeed.json} | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename regression-tests/{buildingcount_bbox_attribute_completeness.hurl => buildingcount_bbox_attributecompleteness.hurl} (100%) rename regression-tests/{roads_polygon_attribute_completeness.hurl => roads_polygon_attributecompleteness.hurl} (91%) rename regression-tests/{roads_polygon_attribute_completeness_maxspeed.json => roads_polygon_maxspeed.json} (100%) diff --git a/regression-tests/buildingcount_bbox_attribute_completeness.hurl b/regression-tests/buildingcount_bbox_attributecompleteness.hurl similarity index 100% rename from regression-tests/buildingcount_bbox_attribute_completeness.hurl rename to regression-tests/buildingcount_bbox_attributecompleteness.hurl diff --git a/regression-tests/roads_polygon_attribute_completeness.hurl b/regression-tests/roads_polygon_attributecompleteness.hurl similarity index 91% rename from regression-tests/roads_polygon_attribute_completeness.hurl rename to regression-tests/roads_polygon_attributecompleteness.hurl index 95abe8f24..febd5a1d7 100644 --- a/regression-tests/roads_polygon_attribute_completeness.hurl +++ b/regression-tests/roads_polygon_attributecompleteness.hurl @@ -2,7 +2,7 @@ POST https://api.quality.ohsome.org/v1-test/indicators/attribute-completeness accept: application/json [Options] verbose: true -file,roads_polygon_attribute_completeness_maxspeed.json; +file,roads_polygon_maxspeed.json; HTTP * diff --git a/regression-tests/roads_polygon_attribute_completeness_maxspeed.json b/regression-tests/roads_polygon_maxspeed.json similarity index 100% rename from regression-tests/roads_polygon_attribute_completeness_maxspeed.json rename to regression-tests/roads_polygon_maxspeed.json From b9cee019bc519a6e93b93b08574301b007f2830a Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Tue, 10 Sep 2024 14:42:59 +0200 Subject: [PATCH 17/34] refactor: extract base_url variable from all test to env variable #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- .../buildingarea_adminarea_buildingcomparison.hurl | 4 +++- .../buildingcount_bbox_attributecompleteness.hurl | 2 +- regression-tests/buildingcount_bbox_currentness.hurl | 2 +- .../hospitals_adminarea_mappingsaturation__no_features.hurl | 2 +- regression-tests/long-running/roads_bbox_currentness.hurl | 2 +- regression-tests/metadata.hurl | 2 +- regression-tests/roads_adminarea_roadcomparison.hurl | 2 +- regression-tests/roads_polygon_attributecompleteness.hurl | 2 +- regression-tests/roads_polygon_mappingsaturation.hurl | 2 +- regression-tests/run_all_hurl_tests.sh | 2 ++ 10 files changed, 13 insertions(+), 9 deletions(-) diff --git a/regression-tests/buildingarea_adminarea_buildingcomparison.hurl b/regression-tests/buildingarea_adminarea_buildingcomparison.hurl index 6d2cdced6..4741898d7 100644 --- a/regression-tests/buildingarea_adminarea_buildingcomparison.hurl +++ b/regression-tests/buildingarea_adminarea_buildingcomparison.hurl @@ -1,4 +1,6 @@ -POST https://api.quality.ohsome.org/v1-test/indicators/building-comparison +POST {{base_url}}/indicators/building-comparison + + accept: application/json [Options] verbose: true diff --git a/regression-tests/buildingcount_bbox_attributecompleteness.hurl b/regression-tests/buildingcount_bbox_attributecompleteness.hurl index 65d9a3c27..b5d4e506e 100644 --- a/regression-tests/buildingcount_bbox_attributecompleteness.hurl +++ b/regression-tests/buildingcount_bbox_attributecompleteness.hurl @@ -1,4 +1,4 @@ -POST https://api.quality.ohsome.org/v1-test/indicators/attribute-completeness +POST {{base_url}}/indicators/attribute-completeness accept: application/json [Options] verbose: true diff --git a/regression-tests/buildingcount_bbox_currentness.hurl b/regression-tests/buildingcount_bbox_currentness.hurl index 43a51377e..dd7ea55ce 100644 --- a/regression-tests/buildingcount_bbox_currentness.hurl +++ b/regression-tests/buildingcount_bbox_currentness.hurl @@ -1,4 +1,4 @@ -POST https://api.quality.ohsome.org/v1-test/indicators/currentness +POST {{base_url}}/indicators/currentness accept: application/json [Options] verbose: true diff --git a/regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl b/regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl index a4eb6ef12..b8c886ae2 100644 --- a/regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl +++ b/regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl @@ -1,4 +1,4 @@ -POST https://api.quality.ohsome.org/v1-test/indicators/mapping-saturation +POST {{base_url}}/indicators/mapping-saturation accept: application/json [Options] verbose: true diff --git a/regression-tests/long-running/roads_bbox_currentness.hurl b/regression-tests/long-running/roads_bbox_currentness.hurl index cd593cb36..5e71e3556 100644 --- a/regression-tests/long-running/roads_bbox_currentness.hurl +++ b/regression-tests/long-running/roads_bbox_currentness.hurl @@ -1,4 +1,4 @@ -POST https://api.quality.ohsome.org/v1-test/indicators/currentness +POST {{base_url}}/indicators/currentness accept: application/json [Options] verbose: true diff --git a/regression-tests/metadata.hurl b/regression-tests/metadata.hurl index 29f66167b..05cc3284e 100644 --- a/regression-tests/metadata.hurl +++ b/regression-tests/metadata.hurl @@ -1,4 +1,4 @@ -GET https://api.quality.ohsome.org/v1-test/metadata?project=all +GET {{base_url}}/metadata?project=all accept: application/json [Options] verbose: true diff --git a/regression-tests/roads_adminarea_roadcomparison.hurl b/regression-tests/roads_adminarea_roadcomparison.hurl index ce29b3975..5d4892f8a 100644 --- a/regression-tests/roads_adminarea_roadcomparison.hurl +++ b/regression-tests/roads_adminarea_roadcomparison.hurl @@ -1,4 +1,4 @@ -POST https://api.quality.ohsome.org/v1-test/indicators/road-comparison +POST {{base_url}}/indicators/road-comparison accept: application/json [Options] verbose: true diff --git a/regression-tests/roads_polygon_attributecompleteness.hurl b/regression-tests/roads_polygon_attributecompleteness.hurl index febd5a1d7..de738b43d 100644 --- a/regression-tests/roads_polygon_attributecompleteness.hurl +++ b/regression-tests/roads_polygon_attributecompleteness.hurl @@ -1,4 +1,4 @@ -POST https://api.quality.ohsome.org/v1-test/indicators/attribute-completeness +POST {{base_url}}/indicators/attribute-completeness accept: application/json [Options] verbose: true diff --git a/regression-tests/roads_polygon_mappingsaturation.hurl b/regression-tests/roads_polygon_mappingsaturation.hurl index 9aa446e5c..af1dbc146 100644 --- a/regression-tests/roads_polygon_mappingsaturation.hurl +++ b/regression-tests/roads_polygon_mappingsaturation.hurl @@ -1,4 +1,4 @@ -POST https://api.quality.ohsome.org/v1-test/indicators/mapping-saturation +POST {{base_url}}/indicators/mapping-saturation accept: application/json [Options] verbose: true diff --git a/regression-tests/run_all_hurl_tests.sh b/regression-tests/run_all_hurl_tests.sh index 055a2b4a4..fc2ec7149 100755 --- a/regression-tests/run_all_hurl_tests.sh +++ b/regression-tests/run_all_hurl_tests.sh @@ -1,6 +1,8 @@ rm -rf report mkdir report +export HURL_base_url=https://api.quality.ohsome.org/v1-test + hurl *.hurl --report-html report echo "\n\nhurl report: file://$PWD/report/index.html" From d17844baa761bfbaa9bea6818fa5446ede82473a Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Tue, 10 Sep 2024 14:47:17 +0200 Subject: [PATCH 18/34] feat: add per-stage run scripts: TEST #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- .../{run_all_hurl_tests.sh => __run_hurl_tests_for_stage.sh} | 2 -- regression-tests/run_hurl_tests_TEST.sh | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) rename regression-tests/{run_all_hurl_tests.sh => __run_hurl_tests_for_stage.sh} (71%) create mode 100755 regression-tests/run_hurl_tests_TEST.sh diff --git a/regression-tests/run_all_hurl_tests.sh b/regression-tests/__run_hurl_tests_for_stage.sh similarity index 71% rename from regression-tests/run_all_hurl_tests.sh rename to regression-tests/__run_hurl_tests_for_stage.sh index fc2ec7149..055a2b4a4 100755 --- a/regression-tests/run_all_hurl_tests.sh +++ b/regression-tests/__run_hurl_tests_for_stage.sh @@ -1,8 +1,6 @@ rm -rf report mkdir report -export HURL_base_url=https://api.quality.ohsome.org/v1-test - hurl *.hurl --report-html report echo "\n\nhurl report: file://$PWD/report/index.html" diff --git a/regression-tests/run_hurl_tests_TEST.sh b/regression-tests/run_hurl_tests_TEST.sh new file mode 100755 index 000000000..196b8d0da --- /dev/null +++ b/regression-tests/run_hurl_tests_TEST.sh @@ -0,0 +1,4 @@ + +export HURL_base_url=https://api.quality.ohsome.org/v1-test + +./__run_hurl_tests_for_stage.sh \ No newline at end of file From e4b8d9c3a42fd4fa63253ec2d1680d13c893282a Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Tue, 10 Sep 2024 16:31:07 +0200 Subject: [PATCH 19/34] feat: add per-stage run scripts: PROD #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- regression-tests/__run_hurl_tests_for_stage.sh | 2 ++ regression-tests/metadata.hurl | 2 +- regression-tests/run_hurl_tests_PROD.sh | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 regression-tests/run_hurl_tests_PROD.sh diff --git a/regression-tests/__run_hurl_tests_for_stage.sh b/regression-tests/__run_hurl_tests_for_stage.sh index 055a2b4a4..16f6caabf 100755 --- a/regression-tests/__run_hurl_tests_for_stage.sh +++ b/regression-tests/__run_hurl_tests_for_stage.sh @@ -1,3 +1,5 @@ +# requires the env variable $HURL_base_url + rm -rf report mkdir report diff --git a/regression-tests/metadata.hurl b/regression-tests/metadata.hurl index 05cc3284e..88854043b 100644 --- a/regression-tests/metadata.hurl +++ b/regression-tests/metadata.hurl @@ -8,7 +8,7 @@ HTTP * [Asserts] duration < 2000 status == 200 -bytes count > 27000 +bytes count > 25000 jsonpath "$.result.indicators.mapping-saturation.description" contains "Calculate if mapping has saturated." jsonpath "$.result.indicators.currentness.description" contains "Estimate currentness of features" diff --git a/regression-tests/run_hurl_tests_PROD.sh b/regression-tests/run_hurl_tests_PROD.sh new file mode 100755 index 000000000..e43d99e13 --- /dev/null +++ b/regression-tests/run_hurl_tests_PROD.sh @@ -0,0 +1,4 @@ + +export HURL_base_url=https://api.quality.ohsome.org/v1/ + +./__run_hurl_tests_for_stage.sh \ No newline at end of file From be37f81560119f535698aa07428fa927555ebe59 Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Tue, 10 Sep 2024 16:43:24 +0200 Subject: [PATCH 20/34] feat: add per-stage run scripts: DEV #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- regression-tests/run_hurl_tests_DEV.sh | 4 ++++ regression-tests/run_hurl_tests_PROD.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100755 regression-tests/run_hurl_tests_DEV.sh diff --git a/regression-tests/run_hurl_tests_DEV.sh b/regression-tests/run_hurl_tests_DEV.sh new file mode 100755 index 000000000..c11aa7cde --- /dev/null +++ b/regression-tests/run_hurl_tests_DEV.sh @@ -0,0 +1,4 @@ + +export HURL_base_url=http://127.0.0.1:8080 + +./__run_hurl_tests_for_stage.sh \ No newline at end of file diff --git a/regression-tests/run_hurl_tests_PROD.sh b/regression-tests/run_hurl_tests_PROD.sh index e43d99e13..376ef2e63 100755 --- a/regression-tests/run_hurl_tests_PROD.sh +++ b/regression-tests/run_hurl_tests_PROD.sh @@ -1,4 +1,4 @@ -export HURL_base_url=https://api.quality.ohsome.org/v1/ +export HURL_base_url=https://api.quality.ohsome.org/v1 ./__run_hurl_tests_for_stage.sh \ No newline at end of file From 63e55535629dd0a71c866a7795af90967871d932 Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Tue, 10 Sep 2024 16:54:24 +0200 Subject: [PATCH 21/34] doc: add README with intro to hurl testing #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- regression-tests/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 regression-tests/README.md diff --git a/regression-tests/README.md b/regression-tests/README.md new file mode 100644 index 000000000..fe747cf03 --- /dev/null +++ b/regression-tests/README.md @@ -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 on the stages. + +An HTML-report with the results is generated here: + +[report/index.html](./report/index.html) + + From ceb445828503de49d39a47da2a3b5c905230215a Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Tue, 10 Sep 2024 17:08:38 +0200 Subject: [PATCH 22/34] doc: describe regression tests in development docs #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- docs/development_setup.md | 16 ++++++++++++++++ regression-tests/README.md | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/development_setup.md b/docs/development_setup.md index 777f4ed53..102ff2ec9 100644 --- a/docs/development_setup.md +++ b/docs/development_setup.md @@ -131,6 +131,22 @@ approval tests will show the difference to the previously approved version of the output using a diff tool. If it es as expected resolve the difference using the diff-tool save and rerun the tests. +### Regression Tests + +Unlike the above-mentioned unit and integration tests, +regression tests do not primarily serve to guide and validate the development, +but to check if an upcoming version caused bugs in the existing system. + +The regression tests are implemented in `hurl` +and can be run manually on the command line against any of the staging systems. +Please consider adding new `hurl` tests if you add new endpoints. +A `hurl` plugin for JetBrains IDEs (e.g. PyCharm, Intellij Idea etc.) +is available for syntax highlighting and execution within the IDE. + +For details, check the + [regression test README](../regression-tests/README.md). + + ## Logging Logging is enabled by default. diff --git a/regression-tests/README.md b/regression-tests/README.md index fe747cf03..f549f128f 100644 --- a/regression-tests/README.md +++ b/regression-tests/README.md @@ -11,7 +11,7 @@ The tests can be run against the different stages using the following scripts: * [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 on the stages. +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: From 1acc239608d82a86afb9fa10bcee1dbb0c782083 Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Tue, 10 Sep 2024 17:34:03 +0200 Subject: [PATCH 23/34] doc: document new regression tests in change log #820 https://github.com/GIScience/ohsome-quality-api/issues/820 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a31b14e42..7809533a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,16 @@ - report endpoint: has been deleted ([#818]) + +### Other Changes + +- a new regression test suite has been added to support safer deployments of new versions ([#820]) + + + [#818]: https://github.com/GIScience/ohsome-quality-api/pull/818 +[#820]: https://github.com/GIScience/ohsome-quality-api/issues/820 + ## Release 1.4.0 From ee78ede28dc96656697e1f95cb28ee27b16ec1ff Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Wed, 11 Sep 2024 15:03:25 +0200 Subject: [PATCH 24/34] Incorporate review feedback # 820 Co-authored-by: Johannes Visintini --- docs/development_setup.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/development_setup.md b/docs/development_setup.md index 102ff2ec9..c2ce75be3 100644 --- a/docs/development_setup.md +++ b/docs/development_setup.md @@ -137,16 +137,15 @@ Unlike the above-mentioned unit and integration tests, regression tests do not primarily serve to guide and validate the development, but to check if an upcoming version caused bugs in the existing system. -The regression tests are implemented in `hurl` -and can be run manually on the command line against any of the staging systems. -Please consider adding new `hurl` tests if you add new endpoints. -A `hurl` plugin for JetBrains IDEs (e.g. PyCharm, Intellij Idea etc.) +The regression tests are implemented in `hurl` +and can be run manually on the command line against any of the staging systems. +Please consider adding new `hurl` tests if you add new endpoints. +A `hurl` plugin for JetBrains IDEs (e.g. PyCharm, Intellij Idea etc.) is available for syntax highlighting and execution within the IDE. -For details, check the +For details, check the [regression test README](../regression-tests/README.md). - ## Logging Logging is enabled by default. From f42714a5a8b048e1aebe1460b683df8d11f3f4fc Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Wed, 11 Sep 2024 15:05:52 +0200 Subject: [PATCH 25/34] Incorporate review feedback # 820 Co-authored-by: Johannes Visintini --- regression-tests/buildingarea_adminarea_buildingcomparison.hurl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regression-tests/buildingarea_adminarea_buildingcomparison.hurl b/regression-tests/buildingarea_adminarea_buildingcomparison.hurl index 4741898d7..162ef37fb 100644 --- a/regression-tests/buildingarea_adminarea_buildingcomparison.hurl +++ b/regression-tests/buildingarea_adminarea_buildingcomparison.hurl @@ -1,4 +1,4 @@ -POST {{base_url}}/indicators/building-comparison +POST {{BASE_URL}}/indicators/building-comparison accept: application/json From a16d0404f64c81b000243221a4fa0679c71e989e Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Wed, 11 Sep 2024 15:06:10 +0200 Subject: [PATCH 26/34] Incorporate review feedback # 820 Co-authored-by: Johannes Visintini --- regression-tests/long-running/roads_bbox_currentness.hurl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regression-tests/long-running/roads_bbox_currentness.hurl b/regression-tests/long-running/roads_bbox_currentness.hurl index 5e71e3556..54caffbb2 100644 --- a/regression-tests/long-running/roads_bbox_currentness.hurl +++ b/regression-tests/long-running/roads_bbox_currentness.hurl @@ -1,4 +1,4 @@ -POST {{base_url}}/indicators/currentness +POST {{BASE_URL}}/indicators/currentness accept: application/json [Options] verbose: true From 59fb901da68c4705cdfc6cf56f7d4656a0e5a2d4 Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Wed, 11 Sep 2024 15:06:29 +0200 Subject: [PATCH 27/34] Incorporate review feedback # 820 Co-authored-by: Johannes Visintini --- regression-tests/buildingcount_bbox_attributecompleteness.hurl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regression-tests/buildingcount_bbox_attributecompleteness.hurl b/regression-tests/buildingcount_bbox_attributecompleteness.hurl index b5d4e506e..eff591920 100644 --- a/regression-tests/buildingcount_bbox_attributecompleteness.hurl +++ b/regression-tests/buildingcount_bbox_attributecompleteness.hurl @@ -1,4 +1,4 @@ -POST {{base_url}}/indicators/attribute-completeness +POST {{BASE_URL}}/indicators/attribute-completeness accept: application/json [Options] verbose: true From 184968662d9c1375a5a2d74c25310ac618675bfd Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Wed, 11 Sep 2024 15:06:41 +0200 Subject: [PATCH 28/34] Incorporate review feedback # 820 Co-authored-by: Johannes Visintini --- regression-tests/buildingcount_bbox_currentness.hurl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regression-tests/buildingcount_bbox_currentness.hurl b/regression-tests/buildingcount_bbox_currentness.hurl index dd7ea55ce..6686c21cc 100644 --- a/regression-tests/buildingcount_bbox_currentness.hurl +++ b/regression-tests/buildingcount_bbox_currentness.hurl @@ -1,4 +1,4 @@ -POST {{base_url}}/indicators/currentness +POST {{BASE_URL}}/indicators/currentness accept: application/json [Options] verbose: true From 0116cf8aa6436a5b6991c26d0f74b92baffbe17d Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Wed, 11 Sep 2024 15:08:56 +0200 Subject: [PATCH 29/34] Update regression-tests/__run_hurl_tests_for_stage.sh Co-authored-by: Johannes Visintini --- regression-tests/__run_hurl_tests_for_stage.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/regression-tests/__run_hurl_tests_for_stage.sh b/regression-tests/__run_hurl_tests_for_stage.sh index 16f6caabf..df54524f6 100755 --- a/regression-tests/__run_hurl_tests_for_stage.sh +++ b/regression-tests/__run_hurl_tests_for_stage.sh @@ -5,7 +5,12 @@ mkdir report hurl *.hurl --report-html report -echo "\n\nhurl report: file://$PWD/report/index.html" +printf "\n\nhurl report: file://$PWD/report/index.html\n" -# mac only: -# open report/index.html \ No newline at end of file +if [[ "$OSTYPE" == "linux-gnu"* ]]; then + xdg-open report/index.html +elif [[ "$OSTYPE" == "darwin"* ]]; then + open report/index.html +else + printf "\nOS could not be detected. Please open report manually!\n" +fi \ No newline at end of file From 74ea4be62c86c6a0263f0033627a0903b78c5cde Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Wed, 11 Sep 2024 15:09:25 +0200 Subject: [PATCH 30/34] Incorporate review feedback # 820 Co-authored-by: Johannes Visintini --- regression-tests/__run_hurl_tests_for_stage.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/regression-tests/__run_hurl_tests_for_stage.sh b/regression-tests/__run_hurl_tests_for_stage.sh index df54524f6..5e0de2057 100755 --- a/regression-tests/__run_hurl_tests_for_stage.sh +++ b/regression-tests/__run_hurl_tests_for_stage.sh @@ -1,4 +1,6 @@ -# requires the env variable $HURL_base_url +#!/bin/bash + +# requires the env variable $HURL_BASE_URL rm -rf report mkdir report From 3646b8c7f2cc2f990b0be6f546575b5b258d50fb Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Wed, 11 Sep 2024 15:09:48 +0200 Subject: [PATCH 31/34] Incorporate review feedback # 820 Co-authored-by: Johannes Visintini --- regression-tests/run_hurl_tests_DEV.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/regression-tests/run_hurl_tests_DEV.sh b/regression-tests/run_hurl_tests_DEV.sh index c11aa7cde..4d2ae41f1 100755 --- a/regression-tests/run_hurl_tests_DEV.sh +++ b/regression-tests/run_hurl_tests_DEV.sh @@ -1,4 +1,5 @@ export HURL_base_url=http://127.0.0.1:8080 +cd "$(dirname "$0")" ./__run_hurl_tests_for_stage.sh \ No newline at end of file From 0068fc4443b4572ca7e4c4d5f875c8d96d55fc32 Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Wed, 11 Sep 2024 15:10:11 +0200 Subject: [PATCH 32/34] Incorporate review feedback # 820 Co-authored-by: Johannes Visintini --- regression-tests/run_hurl_tests_PROD.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/regression-tests/run_hurl_tests_PROD.sh b/regression-tests/run_hurl_tests_PROD.sh index 376ef2e63..8d6232131 100755 --- a/regression-tests/run_hurl_tests_PROD.sh +++ b/regression-tests/run_hurl_tests_PROD.sh @@ -1,4 +1,5 @@ export HURL_base_url=https://api.quality.ohsome.org/v1 +cd "$(dirname "$0")" ./__run_hurl_tests_for_stage.sh \ No newline at end of file From 11940487678870a8ccfe5187b48e5226ee5877ad Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Wed, 11 Sep 2024 15:10:30 +0200 Subject: [PATCH 33/34] Incorporate review feedback # 820 Co-authored-by: Johannes Visintini --- regression-tests/run_hurl_tests_TEST.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/regression-tests/run_hurl_tests_TEST.sh b/regression-tests/run_hurl_tests_TEST.sh index 196b8d0da..9d7efe88f 100755 --- a/regression-tests/run_hurl_tests_TEST.sh +++ b/regression-tests/run_hurl_tests_TEST.sh @@ -1,4 +1,5 @@ export HURL_base_url=https://api.quality.ohsome.org/v1-test +cd "$(dirname "$0")" ./__run_hurl_tests_for_stage.sh \ No newline at end of file From e6e76de63d5a461daa81a9194b174bc00fa11992 Mon Sep 17 00:00:00 2001 From: Matthias Merdes Date: Wed, 11 Sep 2024 15:25:05 +0200 Subject: [PATCH 34/34] Incorporate review feedback (batched suggestions) # 820 Co-authored-by: Johannes Visintini --- regression-tests/__run_hurl_tests_for_stage.sh | 3 +-- .../hospitals_adminarea_mappingsaturation__no_features.hurl | 2 +- regression-tests/metadata.hurl | 2 +- regression-tests/roads_adminarea_roadcomparison.hurl | 2 +- regression-tests/roads_polygon_attributecompleteness.hurl | 2 +- regression-tests/roads_polygon_mappingsaturation.hurl | 2 +- regression-tests/run_hurl_tests_DEV.sh | 3 ++- regression-tests/run_hurl_tests_PROD.sh | 3 ++- regression-tests/run_hurl_tests_TEST.sh | 3 ++- 9 files changed, 12 insertions(+), 10 deletions(-) diff --git a/regression-tests/__run_hurl_tests_for_stage.sh b/regression-tests/__run_hurl_tests_for_stage.sh index 5e0de2057..7ce674c91 100755 --- a/regression-tests/__run_hurl_tests_for_stage.sh +++ b/regression-tests/__run_hurl_tests_for_stage.sh @@ -5,8 +5,7 @@ rm -rf report mkdir report -hurl *.hurl --report-html report - +hurl *.hurl --report-html report printf "\n\nhurl report: file://$PWD/report/index.html\n" if [[ "$OSTYPE" == "linux-gnu"* ]]; then diff --git a/regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl b/regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl index b8c886ae2..498e9f541 100644 --- a/regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl +++ b/regression-tests/hospitals_adminarea_mappingsaturation__no_features.hurl @@ -1,4 +1,4 @@ -POST {{base_url}}/indicators/mapping-saturation +POST {{BASE_URL}}/indicators/mapping-saturation accept: application/json [Options] verbose: true diff --git a/regression-tests/metadata.hurl b/regression-tests/metadata.hurl index 88854043b..f6e0723e0 100644 --- a/regression-tests/metadata.hurl +++ b/regression-tests/metadata.hurl @@ -1,4 +1,4 @@ -GET {{base_url}}/metadata?project=all +GET {{BASE_URL}}/metadata?project=all accept: application/json [Options] verbose: true diff --git a/regression-tests/roads_adminarea_roadcomparison.hurl b/regression-tests/roads_adminarea_roadcomparison.hurl index 5d4892f8a..30bf00bb7 100644 --- a/regression-tests/roads_adminarea_roadcomparison.hurl +++ b/regression-tests/roads_adminarea_roadcomparison.hurl @@ -1,4 +1,4 @@ -POST {{base_url}}/indicators/road-comparison +POST {{BASE_URL}}/indicators/road-comparison accept: application/json [Options] verbose: true diff --git a/regression-tests/roads_polygon_attributecompleteness.hurl b/regression-tests/roads_polygon_attributecompleteness.hurl index de738b43d..01edde66f 100644 --- a/regression-tests/roads_polygon_attributecompleteness.hurl +++ b/regression-tests/roads_polygon_attributecompleteness.hurl @@ -1,4 +1,4 @@ -POST {{base_url}}/indicators/attribute-completeness +POST {{BASE_URL}}/indicators/attribute-completeness accept: application/json [Options] verbose: true diff --git a/regression-tests/roads_polygon_mappingsaturation.hurl b/regression-tests/roads_polygon_mappingsaturation.hurl index af1dbc146..9ca7cf5ac 100644 --- a/regression-tests/roads_polygon_mappingsaturation.hurl +++ b/regression-tests/roads_polygon_mappingsaturation.hurl @@ -1,4 +1,4 @@ -POST {{base_url}}/indicators/mapping-saturation +POST {{BASE_URL}}/indicators/mapping-saturation accept: application/json [Options] verbose: true diff --git a/regression-tests/run_hurl_tests_DEV.sh b/regression-tests/run_hurl_tests_DEV.sh index 4d2ae41f1..e925c7d92 100755 --- a/regression-tests/run_hurl_tests_DEV.sh +++ b/regression-tests/run_hurl_tests_DEV.sh @@ -1,5 +1,6 @@ +#!/bin/bash -export HURL_base_url=http://127.0.0.1:8080 +export HURL_BASE_URL=http://127.0.0.1:8080 cd "$(dirname "$0")" ./__run_hurl_tests_for_stage.sh \ No newline at end of file diff --git a/regression-tests/run_hurl_tests_PROD.sh b/regression-tests/run_hurl_tests_PROD.sh index 8d6232131..6a96c59c3 100755 --- a/regression-tests/run_hurl_tests_PROD.sh +++ b/regression-tests/run_hurl_tests_PROD.sh @@ -1,5 +1,6 @@ +#!/bin/bash -export HURL_base_url=https://api.quality.ohsome.org/v1 +export HURL_BASE_URL=https://api.quality.ohsome.org/v1 cd "$(dirname "$0")" ./__run_hurl_tests_for_stage.sh \ No newline at end of file diff --git a/regression-tests/run_hurl_tests_TEST.sh b/regression-tests/run_hurl_tests_TEST.sh index 9d7efe88f..fbca39dcf 100755 --- a/regression-tests/run_hurl_tests_TEST.sh +++ b/regression-tests/run_hurl_tests_TEST.sh @@ -1,5 +1,6 @@ +#!/bin/bash -export HURL_base_url=https://api.quality.ohsome.org/v1-test +export HURL_BASE_URL=https://api.quality.ohsome.org/v1-test cd "$(dirname "$0")" ./__run_hurl_tests_for_stage.sh \ No newline at end of file