Skip to content

Generating Client Test Data

Requirements

Generate test requests and responses for Knora's routes, to be used in testing client code without the need for a running Knora instance.

Implementation

A class for each Knora API extends the ClientApi trait. A ClientApi contains one or more KnoraRoute implementations that extend ClientEndpoint. Each endpoint provides functions that return generated client test data.

The route ClientApiRoute returns a Zip file containing generated test data. returning source code in a Zip file.

Usage

The following route returns a Zip file containing generated client test data:

HTTP GET to http://host/clientapitest