Networked Media Open Specifications

Using the API

←Usage - Non-Interactive Mode · Index↑ · Usage - Testing IS-07 MQTT→

The testing tool comes with a minimal API for running tests remotely and configuring the testing tool instance dynamically. This is particularly useful for automated testing purposes. The two endpoints presented by the API are:

/api

[GET, POST]

This endpoint accepts (almost) identical inputs as the non-interactive command line utility, except hyphens (-) are replaced with underscores (_) for key values.

For a list of test suites, the body of the POST request would be:

{
  "list_suites": true
}

To execute a test for a remote API, the body of the POST request would look something like:

{
  "suite": "IS-05-01",
  "host": ["192.168.1.2"],
  "port": [80],
  "version": ["v1.0"]
}

Where a field is not required by the test suite such as for IS-09-02, ‘null’ should used to replace string values, and ‘0’ for numeric values, for example:

{
  "suite": "IS-09-02",
  "host": ["192.168.1.2", null],
  "port": [0, 0],
  "version": [null, "v1.0"]
}

/config

[GET, PATCH]

To change the testing tool to restrict the maximum number of resources that time-consuming tests run against, the body of the request would be:

{
  "MAX_TEST_ITERATIONS": 3
}

Known Issues

←Usage - Non-Interactive Mode · Index↑ · Usage - Testing IS-07 MQTT→