etf-validator/governance

Reusable Test Objects

jonherrmann opened this issue · 1 comments

ETF Improvement Proposal (EIP)

Background and Motivation:

The workflow of ETF v2 has been mainly developed for public deployments: the
user selects an ETS, uploads the test data or enters the URL of a web service
and starts the test run. To rerun modified datasets or web services, you need
to upload files or re-enter the URL of the service.

Within an organization that mostly tests the same services with specific URL
or datasets that are in specific locations (e.g. a network drive), this
workflow should be optimized.

Proposed change

Support the creation of Test Objects that reference a service or the location
of a dataset and that can be reused in test runs.

Additionally to the "simple" workflow for public deployments, there could
be another "org-internal" workflow for organisations. A draft for the workflow
and the web interface is described in EIP #27.

This EIP is about the changes in the REST interfaces which can also be
implemented before the changes in the web interface and the implementation of
the complete workflow.

The workflow could be configured in the etf-config.propeties configuration file.
The default workflow would be set to "simple".

The Test Object REST controller must be changed to allow the creation of
reusable test objects if the "org-internal" workflow is configured.

The controller would accept Test Object JSON objects that possess:

  • a label
  • a description
  • a username (optional for web services)
  • a password (optional for web services)
  • a resource

where resource can either be a reference to a web service or a relative path
in the ETF test data directory. The ETF data directory could be shared in an organization-internal network so that users could upload the test data on a network drive.

This is an example for the definition of a web service that could be send to
the interface:

{
 "label": "Our WFS 2",
 "description": "Internal WFS service",
 "resources": {
      "serviceEndpoint": "http://example.com/service?SERVICE=WFS&REQUEST=GetCapabilities"
  }
}

and this an example for the definition of a data test object:

{
  "label": "GML data sets",
  "description": "On mounted network drive X",
  "resources": {
      "data": "/data_delivery_3"
  }
}

In the web interface the user should be able to:

  • create a Test Object
  • delete an existing Test Object
  • Select a Test Object and execute one or multiple ETSs against it

Alternatives

none considered

Funding

Full funding available.

Additional information

  • This EIP is backwards compatible with existing ETSs
  • Changes are required in the ETF web application
  • Organizational workflows were already implemented once in ETF version 1
    and were the default workflows there. Due to technical changes, these can
    can not be reused
  • It must be ensured that in the "simple" workflow no reusable test objects can
    be created but only temporary test objects (which are automatically deleted)
  • Since this is an addition to the existing interface, the main API version
    number v2 does not need to be increased, and existing external clients do not
    need to be modified

Implemented in Version 2.1.0