etf-validator / etf-webapp

:earth_africa: :mag: ETF is an open source testing framework for spatial data and services
https://www.etf-validator.net
European Union Public License 1.2
19 stars 19 forks source link

CSW GetRecordByID request can't be validated using API (Swagger UI) #211

Closed ghost closed 5 years ago

ghost commented 5 years ago

Description

We have installed ETF-Validator locally. In order to figure out how API works we are using Swagger-UI. In description for "4._Manage_Test_Runs/startUsingPOST" seems that web services can be tested without uploading metadata records.

I tried to validate against "Conformance class INSPIRE Profile based on EN ISO 19115 and EN ISO 19119" using this GetRecordByID request with API but the error message "URI scheme is not "file"" is constantly shown in HTML Report. Using the ETF-Validator GUI result is as expected without this error.

Operating systems and browser

Browser: Mozilla Firefox Operating System: Windows

Steps to Reproduce

  1. Open Swagger UI
  2. Go to 4._Manage_Test_Runs/startUsingPOST
  3. Enter following request in "testRunRequest": { "label": "Test-CSW-MD", "executableTestSuiteIds": ["EIDec7323d5-d8f0-4cfe-b23a-b826df86d58c"], "arguments": {}, "testObject": { "resources": { "serviceEndpoint": "hier goes CSW GetRecordById request" } } }
  4. Execute the validation using "Try it out"
  5. HTTP Response code is 201
  6. Open HTML report and observer results

Expected behavior:

HTML Report should contain the validation results.

Actual behavior:

The Test Suite was not executed because the Test Driver returned an error.

Error message URI scheme is not "file"

Please contact the system administrator if the problem persists. grafik

jonherrmann commented 5 years ago

If you have an issue with an Executable Test Suite, then please use the corresponding repository, for instance the INSPIRE repository if you have an issue with an INSPIRE test.

ghost commented 5 years ago

Thanks a lot for the response.

I was not sure if I have the problem with API or Executable Test Suite.

The reason why I thought that the problem is related to API is because I can validate in ETF-Validator GUI without any problems using the same CSW GetRecordById request. When I use Swagger UI then the problem occurs.

Should I close the ticket here and report it to https://github.com/inspire-eu-validation/community/blob/master/README.md?

jonherrmann commented 5 years ago

The reason why I thought that the problem is related to API is because I can validate in ETF-Validator GUI without any problems using the same CSW GetRecordById request. When I use Swagger UI then the problem occurs.

I took a second look at your request. We distinguish between two Test Objects Types, one that interacts with the Test Object (send multiple requests and validates the responses) and one that only tests data without interaction. The metadata tests do not really “interact” with the Test Object, they download one record and validate it.

TLTR; please use data instead of serviceEndpoint in the request and try again.

ghost commented 5 years ago

Thanks a lot for the information.

If I understood well, CSW GetRecordById request can't be used as parameter for serviceEndpoint.

I used datainstead of serviceEndpoint and metadata record is succesfully validated.

jonherrmann commented 5 years ago

If I understood well, CSW GetRecordById request can't be used as parameter for serviceEndpoint.

Correct, because this test does not test the Catalogue Service itself but the data it returns. However, if you run the WMS, WMTS, ATOM, and WFS tests that actually interact and test the service interface, you must use serviceEndpoint.