REST API

Loadmill's API is an interface for interacting with Loadmill’s servers. Use it to create and launch your tests.

Before getting started you’ll need to generate an API token, take a look how to generate it here.

Run Test Suite

POST https://app.loadmill.com/api/v1/test-suites/:id/run

Run a predefined test suite

Path Parameters

NameTypeDescription

id

string

UUID of the Test Suite to run.

Query Parameters

NameTypeDescription

forceAllFlows

boolean

Default = false - running only flows marked for execution with CI toggle. If true - executing all flows.

Headers

NameTypeDescription

Authorization*

string

Authentication token - you can generate it in the "User menu"> "Settings" > "Security".

Request Body

NameTypeDescription

additionalDescription

string

Add an additional description at the end of the current suite's description

overrideParameters

object

name: value

pairs to override the default parameters values of this specific run. i.e.

{{"paramName1":"paramVal1"}, ...}

{testSuiteRunId: "running-uuid"}

Get Test Suite Run (Test Suite results)

GET https://app.loadmill.com/api/v1/test-suites-runs/:id

Get a launched Test Suite results

Path Parameters

NameTypeDescription

id

string

The running uuid. You get this ID in the response when launching a Test Suite

Headers

NameTypeDescription

Authorization

string

Authentication token - you can generate it in the "User menu"> "Settings" > "Security"

{
  "id": "test suite run uuid,
  "description": "test suite run description",
  "startTime": timestamp,
  "endTime": timestamp | null,
  "conf": {
    "useCookies": true
  },
  "status": "PASSED" | "FAILED" | "RUNNING",
  "displayName": "Display name of the executing user",
  "testSuiteId": "origin test suite uuid" | null (if deleted),
  "testSuiteFlowRuns": [
    {
      "id": "test suite flow run uuid",
      "startTime": timestamp,
      "endTime": timestamp | null,
      "conf": {}, // executed flow conf 
      "description": "Flow description",
      "status": "PASSED" | "FAILED" | "RUNNING",
      "numOfRequests": number of requests in this flow conf,
      "avgResTime": 199, // in ms
      "duration": "422 ms"
    }
  ],
  "progress": "1/1", // flows progress
  "successRate": "100%", // flows success rate
  "avgResTime": "422 ms"
} 

Get Test Suite Flow Run

GET https://app.loadmill.com/api/v1/test-suites-runs/flows/:id

Get Test Suite Flow results

Path Parameters

NameTypeDescription

id

string

The flow running uuid. You get this ID when fetching the Test Suite Run entity

Headers

NameTypeDescription

Authorization

string

Authentication token - you can generate it in the "User menu"> "Settings" > "Security"

{
  "id": "test suite flow run uuid",
  "description": "Flow description",
  "conf": {...}, // the executed flow conf
  "status": "PASSED" | "FAILED" | "RUNNING",
  "startTime": timestamp,
  "testSuiteFlowId": "origin test suite flow uuid" | null (if deleted),
  "testSuiteId": "origin test suite uuid" | null (if deleted)
}

Stop Test Suite Run

PUT https://app.loadmill.com/api/v1/test-suites-runs/:id

Stop a launched Test Suite

Path Parameters

NameTypeDescription

id

string

The Test Suite Run uuid. You can get this ID in the response when getting the Test Suite Run (https://docs.loadmill.com/integrations/rest-api#get-test-suite-run-test-suite-results).

\

Query Parameters

NameTypeDescription

forceFail=true

string

Using this filter option the user can stop the Test Suite Run and put its status to FAILED

Headers

NameTypeDescription

Authorization

string

Authentication token - you can generate it in the "User menu"> "Settings" > "Security"

Request Body

NameTypeDescription

additionalDescription

string

Will be added at the end of the Test Suite Run description

Create Load Test

POST https://app.loadmill.com/api/v1/tests

Create a load test from load test configuration

Headers

NameTypeDescription

Authorization

string

Authentication token - you can generate it in the "User menu"> "Settings" > "Security"

Request Body

NameTypeDescription

config

object

A load test configuration. The JSON test configuration may be exported from the Loadmill test editor or from an old test run. See a config example here - https://docs.loadmill.com/load-testing/configuration-files

{ testId: "load test id" }

Set Flow

PATCH https://app.loadmill.com/api/v1/test-suites/:suiteId/flows/:flowId/pools

Create a parameter pool and attach it to a flow

Path Parameters

NameTypeDescription

suiteId

string

The suite UUID in which the flow resides

flowId

string

The flow UUID. The parameter pool will be attached to this flow

Query Parameters

NameTypeDescription

name

string

name of the parameter pool data

Headers

NameTypeDescription

content-type

string

must be text/csv

Authorization

string

Authentication token - you can generate it in the "User menu"> "Settings" > "Security"

Request Body

NameTypeDescription

body

string

The CSV data in CSV format.

Run Load Test

PUT https://app.loadmill.com/api/v1/tests/:id/load

Run an existing load test. Be aware that a given load test can be run only once. In order to rerun it you will have to recreate it.

Path Parameters

NameTypeDescription

id

string

Load test ID

Headers

NameTypeDescription

Authorization

string

Authentication token - you can generate it in the "User menu"> "Settings" > "Security"

Get Load Test

GET https://app.loadmill.com/api/v1/tests/:id

Returns the Load Test data. If the Load Test has ended it would contain its result.

Path Parameters

NameTypeDescription

id

string

Load test ID

Headers

NameTypeDescription

Authorization

string

Authentication token - you can generate it in the "User menu"> "Settings" > "Security"

{
  "id": "load test id",
  "startTime": timestamp,
  "endTime": timestamp,
  "usedSeconds": "total seconds used by all sessions",
  "description": "load description",
  "conf": {}, // load test configuraion
  "result": "aborted" | "done" | "failed",
  "failedIterations": number,
  "successfulIterations": number
}

Labels

GET https://app.loadmill.com/api/v1/labels

Returns all user's team's labels

Query Parameters

NameTypeDescription

filter=active&filter=evaluating

string

Using this filter option the user can get only the labels who are attached to flows with a specific status.

Headers

NameTypeDescription

Authorization

string

Authentication token - you can generate it in the "User menu"> "Settings" > "Security".

{
  "teamLabels": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174001",
      "description": "my label",
    },
    {
      "id": "123e4567-e89b-12d3-a456-426614174002",
      "description": "another label",
    }
  ]
}

Run Test Plan

POST https://app.loadmill.com/api/v1/test-plans/:test-plan-id/run

Run a predefined test plan

Path Parameters

NameTypeDescription

test-plan-id*

String

UUID of the Test Plan to run

Headers

NameTypeDescription

Authorization*

String

Authentication token - you can generate it in the "User menu"> "Settings" > "Security".

Request Body

NameTypeDescription

additionalDescription

String

Add an additional description at the end of the current plan's description

labels

Array

An array of strings representing labels to filter the test plan execution. i.e. ["label1", "label2"]

Only test flows with matching labels will be included in the execution.

labelsExpression

String

String representing of labels expression to filter the test plan execution. i.e. (label1 | label2) & !label3 An expression may contain the characters ( ) & | ! (

overrideParameters

Object

name:value pairs to override the default parameters values of this specific run. i.e. {{"paramName1":"paramVal1"}, ...}

pool

String

Execute tests from a dedicated agent's pool (when using private agent)

parallel

String

Set the concurrency of a running test suites in a test plan. Max concurrency is 10

maxFlakyFlowRetries

String

The maximum number of retries for flaky test flows. If a test flow fails due to flakiness, it will be retried up to the specified number of times

Get Test Plan Run

GET https://app.loadmill.com/api/v1/test-plans-runs/:plan-run-id

Get the Test Plan Run result

Path Parameters

NameTypeDescription

test-plan-run-id*

String

test plan run id - given when launching the test plan

Headers

NameTypeDescription

Authorization

String

Authentication token - you can generate it in the "User menu"> "Settings" > "Security".

Re-run Test Plan

POST https://app.loadmill.com/api/v1/test-plans-runs/:test-plan-run-id/re-run

Re-run a test plan run

Path Parameters

NameTypeDescription

test-run-plan-id*

String

UUID of the Test Plan Run to re-run

Query Parameters

NameTypeDescription

onlyFailed

boolean

Default = false. When set to true only failed or stopped suites will re-run

Headers

NameTypeDescription

Authorization*

String

Authentication token - you can generate it in the "User menu"> "Settings" > "Security".

Get test suites

GET https://app.loadmill.com/api/v1/test-suites

Returns a list of test suites

Query Parameters

NameTypeDescription

search

String

filter test suites by the given search phrase

rowsPerPage

String

How many suites to return, Values might be 10, 25, 50, 100 default to 10

Headers

NameTypeDescription

Authorization*

String

Authentication token - you can generate it in the "User menu"> "Settings" > "Security".

Get Test Plans

GET https://app.loadmill.com/api/v1/test-plans

Returns a list of test plans

Query Parameters

NameTypeDescription

search

String

filter test suites by the given search phrase

rowsPerPage

String

How many suites to return, Values might be 10, 25, 50, 100 default to 10

Headers

NameTypeDescription

Authorization*

String

Authentication token - you can generate it in the "User menu"> "Settings" > "Security".

Last updated