How host/deploy a test¶
The easiest way is to ask someone from OSTrails WP3 to write the test for you, and host it on the OSTrails Infrastructure. This helps keep tests quality-controlled, consistent, and with reliable up-time.
If you really want to do it yourself, you need:
Understand (or author) the Metric that you are going to test. this is a pre-requisite for writing the test!
Access to a server
Coding knowledge in any language
Understanding of the rules for Linked Data
Optimally, you would also use a Linked Data library from your language to reduce errors; however the data structures can simply be templated.
Understanding of the FTR Vocabulary, and specifically the pieces related to a TestResult object
Understand how to author an OpenAPI Service Descriptor
Either understand a DCAT DataService object, or use the Test Wizard to author this object
Tests have two “modalities”:
A test can consume a GUID, and use normal identifier resolution on that to retrieve metadata
A test can consume an uploaded metadata record
The API for option 1 is to consume the following JSON data structure:
{ "resource_identifier": "GUID" }
The API for option 2 is to follow this OpenAPI3 pattern for file upload:
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required: [file]
properties:
file:
type: string
format: binary
description: The uploaded metadata.
encoding:
file:
contentType: application/json
Test outputs must follow the FTR schema, and at a minimim must include
The identifier of the metadata object that was tesated
The Metric that is associated with the Test
The “value” of the output (pass/fail/indeterminate are the only valid outputs)
A reference to the TestExecution, and metadata about that (e.g. test identifier, date, version, etc)
Test outputs may optimally include a reference to a Guidance Object. Guidance Objects are added during test execution, when a test detects an error. They are intended to help the metadata author avoid the error.
Guidance Objects are still under development, so are not deeply documented here.