You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Execute the tests, from ids returned in 1) and 2) and do a POST to http://localhost/etf-webapp/v2/TestRuns with JSON containing information about the tests and metadata to validate:
{
"label": "Test run on 10:54 - 02.11.2017 with test suite Conformance class: INSPIRE Profile based on EN ISO 19115 and EN ISO 19119 and one more test suite",
"executableTestSuiteIds": [
"EIDec7323d5-d8f0-4cfe-b23a-b826df86d58c",
"EID9a31ecfc-6673-43c0-9a31-b4595fb53a98"
],
"arguments": {
"files_to_test": ".*",
"tests_to_execute": ".*"
},
"testObject": {
"id": "EID1915be77-020e-4da0-bb5f-2887696064c1"
}
}
This creates a background task returning a json with the task id
Monitor previous task id (in the example EIDc97b7b8c-d306-454a-8729-0dc0ae354332) returned in previous request
The easiest way would be to create a backend service that manages all the interaction and returns the url of the result to the client side, the problem with this approach is that the ETF API is asynchronous so the backend service should run the task and monitor it until finished. Usually is quite fast, but I guess depends on how busy is the ETF server.
A better approach would be similar, but having in the backend work asynch also, so the client side checks for finishing task:
EtfValidatorApi
/validate/metadatauuid --> Does steps 1, 2 and 3 and returns ETF task id
/check/taskid --> This enpoint manages about step 4, if not complete returns empty value. If complete returns link to results html
The web client executes /validate/metadatauuid and gets the task id after that check /check/taskid until it's complete and opens the results html.
Would be good to move all validation method in DataManager to a new one. Create a bean configuration to define which validators are available (eg. GeoNetworkValidator, ETFValidator, ...) and the validation API can define which validator to use.
Work to do:
Allow to configure the url for ETF in the settings
Develop ETF Validation API in GeoNetwork
Develop ETF http client
Add client-side javascript
Note
The validator should not have dependencies to GeoNetwork in order to be easily reused in the dashboard project if feasible.
The text was updated successfully, but these errors were encountered:
ETF validation
Related to the validation, I have been checking the new API and here are the steps that require to be perform using curl.
Retrieve the test suites to run from http://localhost/etf-webapp/v2/ExecutableTestSuites.json
Upload the file to ETF, using endpoint http://localhost/etf-webapp/v2/TestObjects?action=upload
This endpoint returns a response like:
This creates a background task returning a json with the task id
http://localhost/etf-webapp/v2/TestRuns/EIDc97b7b8c-d306-454a-8729-0dc0ae354332/progress
http://localhost/etf-webapp/v2/TestRuns/EIDc97b7b8c-d306-454a-8729-0dc0ae354332.html
It's the html page as displayed in the online app

How to implement in GeoNetwork
The easiest way would be to create a backend service that manages all the interaction and returns the url of the result to the client side, the problem with this approach is that the ETF API is asynchronous so the backend service should run the task and monitor it until finished. Usually is quite fast, but I guess depends on how busy is the ETF server.
A better approach would be similar, but having in the backend work asynch also, so the client side checks for finishing task:
The web client executes /validate/metadatauuid and gets the task id after that check /check/taskid until it's complete and opens the results html.
Would be good to move all validation method in DataManager to a new one. Create a bean configuration to define which validators are available (eg. GeoNetworkValidator, ETFValidator, ...) and the validation API can define which validator to use.
Work to do:
Note
The validator should not have dependencies to GeoNetwork in order to be easily reused in the dashboard project if feasible.
The text was updated successfully, but these errors were encountered: