Examples of requests#

STANDARD PRO

The page contains the examples for:

Run a test#

To run a test, run the command:

curl --location --request POST 'https://api.platform.io/test-srv/api/test' \
--header 'api-token: API token' \
--header 'Content-Type: application/json' \
--data-raw '{
   "testProjectId": 3,
   "testProjectVersionId": 47,
   "comment": "",
   "inheritLabelsFromProject": true
}'

Note

This example is for Mac/Linux systems. If you are using a Windows system, replace all single quotes with double quotes.

Parameters of a request:

  • api-token. The API token.

  • testProjectId. The ID of the test. To find the ID, follow these steps:

    1. Go to the Tests page.

    2. Select the test. The test ID is displayed in the address bar: testId

  • testProjectVersionId. The ID of the test’s version. If the parameter isn’t specified, a the latest test’s version will run. To find the version, follow these steps:

    1. Go to the Test run page.

    2. Select the test run.

    3. Click Test. The ID of the test’s version is displayed in the address bar: testVersionId

  • comment. Comments on the test.

  • inheritLabelsFromProject. If true, labels are copied from a test to a test run.

Get SLA results#

To get SLA results, run the command:

curl --location --request GET 'https://api.platform.io/test-srv/api/testResult/sla?testId=357' \
--header 'api-token: API token'

Note

This example is for Mac/Linux systems. If you are using a Windows system, replace all single quotes with double quotes.

Parameters of a request:

  • testId. The test run ID. To find the test run ID, use one of the following methods:

    • Send the request for running a test. The ID is included in the response in the id property.

    • Find it in the address bar:

      1. Go to the Test run page.

      2. Select the test run. The test run ID is displayed in the address bar: testRunId

  • api-token. The API token.