Docs Sign in Get a key

Docs / Platform

Tests API

Reference of the Hapti tests endpoints: parameters, fields and real responses.

Every endpoint takes a key in the Authorization header: Authorization: Bearer hp_test_.... Base address: https://api.hapti.dev. The full specification is in openapi.json.

Run tests on your app

HTTP
POST /v1/test-runs

Runs end-to-end tests written in plain words against an application. Each test is a task; a failed check is run once more before it is called a bug. Returns at once with the run, then follow it with GET.

FieldTypeDescription
url (required)stringAddress of the application to test
tests (required)array
commitstring
branchstring
Request
{
  "url": "https://staging.example.com",
  "tests": [
    {
      "name": "checkout",
      "text": "Add the Nord lamp to the cart and go to payment.\n\nCheck:\n- the cart shows 1 item\n- the VAT is 20 %"
    }
  ],
  "commit": "c0ffee",
  "branch": "feat/vat"
}

List test runs

HTTP
GET /v1/test-runs

The latest runs, newest first.

Get a test run

HTTP
GET /v1/test-runs/{id}

The verdict of each test, with its checks (expected, observed), proof link and cost.

ParameterInDescription
idpathTest run id