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
Send HTTP requests and verify the response status (expecting 200).
Retrieve the HTTP response in JSON-XML (with attributes format) and validate it against Relax-NG schemas. These schemas should be prepared based as much as possible on the DTS API documentation (version 1-alpha). Ideally, the schemas would be a Relax NG translation of the DTS specification!
Endpoint collection
/api/dts/collection → expect 200
/api/dts/collection?id=$resourceId
expect 200 if the resource is a collection
expect 200 if the resource is a document
/api/dts/collection?id=$resourceId&nav=parents
expect 200 if the resource is a collection
expect 200 if the resource is a document
Additionally, validate the JSON-XML response with a Relax-NG schema based on the DTS documentation (v1-alpha).
Note: Is a single schema sufficient to cover the different parameter combinations for this endpoint?
Goals:
Send HTTP requests and verify the response status (expecting 200).
Retrieve the HTTP response in JSON-XML (with attributes format) and validate it against Relax-NG schemas. These schemas should be prepared based as much as possible on the DTS API documentation (version 1-alpha). Ideally, the schemas would be a Relax NG translation of the DTS specification!
Endpoint
collection/api/dts/collection→ expect 200/api/dts/collection?id=$resourceId/api/dts/collection?id=$resourceId&nav=parentsAdditionally, validate the JSON-XML response with a Relax-NG schema based on the DTS documentation (v1-alpha).
Note: Is a single schema sufficient to cover the different parameter combinations for this endpoint?
Endpoint
navigation/api/dts/navigation?resource=$resourceId→ expect 200/api/dts/navigation?resource=$resourceId&down=2→ expect 200 (to confirm)/api/dts/navigation?resource=$resourceId&ref=$ref→ expect 200/api/dts/navigation?resource=$resourceId&ref=$ref&down=2→ expect 200 (to confirm)/api/dts/navigation?resource=$resourceId&start=$start&end=$end→ expect 200/api/dts/navigation?resource=$resourceId&start=$start&end=$end&down=2→ expect 200 (to confirm)Additionally, validate the JSON-XML response with a Relax-NG schema based on the DTS documentation (v1-alpha).
Note: Is one single schema enough to support all parameter combinations here?
Endpoint
document/api/dts/document?resource=$resourceId→ expect 200/api/dts/document?resource=$resourceId&mediaType=html→ expect 200/api/dts/document?resource=$resourceId&ref=$ref→ expect 200/api/dts/document?resource=$resourceId&ref=$ref&mediaType=html→ expect 200/api/dts/document?resource=$resourceId&start=$start&end=$end→ expect 200/api/dts/document?resource=$resourceId&start=$start&end=$end&mediaType=html→ expect 200For this endpoint, no Relax-NG validation is required:
NB. : It may also be worth adding tests where 400 responses are expected (e.g.,
/api/dts/navigationwithout parameters).