Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Authentication

The Testery API is a REST API that uses token-based authentication. To retrieve your token, click Settings → Integrations → Show API Token and copy the token that is displayed. Keep this token secure as it allows access to Testery on your behalf.

When making calls to the Testery API, pass your token in the authorization header. For example, to retrieve your list of recent test runs via curl,

Code Block
languagebash
curl -H 'Accept: application/json' -H 'Content-Type:application/json' \
-H 'Authorization: Bearer <yourApiToken>' \
"https://api.testery.io/api/test-runs/?page=0&limit=10"

Endpoints

Get a Single Test Run

Returns a single test run by id.

Status
colourBlue
titleGET
https://api.testery.io/api/test-runs/{id}

Code Block
languagejson
{
  "id": 55676,
  "name": "...",
  "testName": null,
  "key": "ABCDABCD75349414053EB9961013126945472A93",
  "startTime": "2020-05-04 23:16:33+0000",
  "endTime": "2020-05-04 23:22:59+0000",
  "createTime": "2020-05-04 23:15:10+0000",
  "accountId": 123,
  "projectId": 123,
  "status": "PASS",
  "copies": 1,
  "passCount": 30,
  "failCount": 0,
  "ignoredCount": 0,
  "codeCoverageName": null,
  "codeCoverageVersion": null,
  "codeCoveragePercentage": null,
  "codeCoverageTotalStatements": null,
  "codeCoverageCoveredStatements": null,
  "totalTestingTime": 1036000,
  "isSchedule": null,
  "totalCount": 30,
  "gitRef": "abcd4e87d8d928a21a393b0def6ab0c0a21d35a2",
  "buildKey": "23",
  "environment": "dev",
  "statusInfo": null,
  "includeTags": [],
  "complete": true
}

Get List of Test Runs

Status
colourBlue
titleGET
https://api.testery.io/api/test-runs?page=##&limit=##

Returns an array of the most recent test runs.

Code Block
languagejson
[
  {
    "id": 12345,
    "name": "...",
    "testName": null,
    "key": "ABCDABCD75349414053EB9961013126945472A93",
    "startTime": "2020-05-04 23:16:33+0000",
    "endTime": "2020-05-04 23:22:59+0000",
    "createTime": "2020-05-04 23:15:10+0000",
    "accountId": 123,
    "projectId": 123,
    "status": "PASS",
    "copies": 1,
    "passCount": 30,
    "failCount": 0,
    "ignoredCount": 0,
    "codeCoverageName": null,
    "codeCoverageVersion": null,
    "codeCoveragePercentage": null,
    "codeCoverageTotalStatements": null,
    "codeCoverageCoveredStatements": null,
    "totalTestingTime": 1036000,
    "isSchedule": null,
    "totalCount": 30,
    "gitRef": "abcd4e87d8d928a21a393b0def6ab0c0a21d35a2",
    "buildKey": "23",
    "environment": "dev",
    "statusInfo": null,
    "includeTags": [],
    "complete": true
  },
  ...
]