Test utility to verify the correctness of different openEHR REST API implementations. See the openEHR specification for more information.
Could be used as a .NET test project in existing implementations by adding it as a git submodule.
We automatically build a Docker image no the Docker Hub with the tests from this repository. Users with Docker installed can run these with a single command:
docker run -e ServerHostname='host.docker.internal' -t dipsas/openehr-rest-test
Users can specify the hostname and ports using the envionrment variables
ServerHostname
and ServerPort
. The above command with
ServerHostname='host.docker.internal'
will run tests against an openEHR REST
API running on the docker host.
It is also possible to run the tests locally without Docker.
dotnet test
It's possible to target differet openEHR REST API servers by modifying the settings.json file:
{
"ServerHostname": "localhost",
"ServerPort": "9000",
"Protocol": "http",
"BasePath": ""
}
It is also possible to set these using environment variables. Setting the
BasePath
will prepend this path to the URL paths used in the tests. E.g.
using the above settings will test an openEHR REST API at
http://localhost:9000/
, and setting e.g. BasePath="/openehr/"
will test an
openEHR REST API at http://localhost:9000/openehr/
.
Tests that require input data, such as creating a new composition, use test data in TestData. These datasets should be identical to the test data in the REST API Swagger docs.