Skip to main content

API

Use the Outomated API to run builds from a CI/CD pipeline or from an external application.

Authentication#

The Outomated API uses API keys to authenticate requests. The API key associated with an account can be viewed and managed from Settings > API Key.

Once you have the API key, send it in the request header X-ApiKey with every API request.

AUTHENTICATED REQUEST
$ curl -H "X-ApiKey:API_KEY" \  -X POST \  https://api.outomated.com/beta/projects/PROJECT_ID/builds

Run a build#

Runs a build on a newly allocated VM.

POST /beta/projects/:project_id/builds
$ curl -H "X-ApiKey:API_KEY" \  -H "Content-Type:application/json" \  -X POST \  -d '{    "buildName": "Fix - commit 453rf3",    "waitForCompletion": true,    "includeDetailedResultInResponse": true,    "buildCapability": {      "os": "windows-10",      "browser": "firefox",      "browserVersion": "94"    },    "buildConfig": {      "totalParallel": 3,      "displayResolution": "1728x1117",      "timezone": "UTC",      "captureShots": true,      "captureDriverLogs": false,      "retryFailedTestsUpto": 3,      "notifyOnCompletion": false,      "buildVars": {        "url": "https://staging.example.com/"      }    },    "files": [      "LandingTests",      {        "name": "EditorTests",        "tests": [          "validate tabbed layout works expected",          {            "name": "validate color of button on picker change",            "versions": ["v1", "v3"]          }        ]      }    ]  }' \  https://api.outomated.com/beta/projects/PROJECT_ID/builds
RESPONSE
{  "buildId": 3034,  "status": success,  "error": null,  "testDetails": [...]}

Parameters#

note

All parameters are optional. When no request body is sent, all tests in the given project are run and defaults are used for the rest of the parameters.

note

Replace PROJECT_ID in the endpoint URL with the numeric id of the project you're running builds on. To get the project id, login to Outomated, select/create a project, and simply look into the query string param named project. For example in https://app.outomated.com/management?project=8, the project id is 8.

buildName#

An optional name for the build. Use it to identify builds easily. You can pass any identifier, commit message, etc. When omitted, builds are identified using their unique id. Multiple builds can have the same name.

waitForCompletion#

Controls when a response is returned. Defaults to true. When set to false, a response is returned immediately after the build is started on the VM.

includeDetailedResultInResponse#

Requires waitForCompletion to be true. Defaults to false. When set to true, the response body contains the following details.

  • testDetails: An array of test detail objects.

    TEST DETAILS ARRAY
    [  { "file": "FILE_NAME", "test": "TEST_NAME", "version": "VERSION_NAME", "status": "SUCCESS | ERROR" },  ...]  

buildCapability#

  • os#

    Specifies the OS used for running this build. Possible values are:

    • windows-10 | win10

    • windows-8.1 | win8.1

      Defaults to win10

  • browser#

    Specifies the browser used for running this build. Possible values are:

    • chrome

    • firefox | ff

    • ie

      Defaults to chrome

  • browserVersion#

    Specifies the version of the given browser. Must be a valid and available version. Defaults to the latest version.

  • meDeviceType#

    Optional parameter to enable mobile emulation. Specifies the type of device for mobile emulation. Use it when you want to test on latest version of iPhone's or iPad's dimensions. Use either this or meDeviceDimensions. If both are supplied, meDeviceDimensions takes precedence. Possible values are:

    • mobile
    • tablet
  • meDeviceDimensions#

    Optional parameter to enable mobile emulation. Specifies the exact dimensions of the mobile device such as 425x800. Use it when testing using a specific device or specific dimensions. Use either this or meDeviceType. If both are supplied, meDeviceDimensions takes precedence.

buildConfig#

  • totalParallel#

    Specifies the desired number of parallel VMs to be used for running the build. Defaults to 1, which means no parallel.
warning

The maximum number of parallels that can be given to this parameter depends on an account's Total parallel builds limit. This can be viewed from Settings > Usage Quotas.

  • displayResolution#

    Specifies the desired resolution of the VM, such as 1728x1117. Defaults to 1366x768.

  • timezone#

    Specifies the desired timezone of the VM, such as Alaskan Standard Time. Defaults to UTC.

  • captureShots#

    Specifies whether screenshots (and therefore video) need to be captured and stored. Defaults to true.

  • captureDriverLogs#

    Specifies whether webdriver logs need to be captured and stored. Defaults to false.

  • retryFailedTestsUpto#

    Specifies the desired number of retries in event of a test failure. Defaults to 0, which means no retries.

  • notifyOnCompletion#

    Specifies whether to notify organization users upon a build completion (in the event of success or failure). Note that build notifications must be turned 'ON' from 'user settings' in order to receive the emails. Defaults to false.

  • buildVars#

    Provide an object of key-value pairs that override any existing build variables.

files#

An array of files and tests that need to be executed as part of this build. When omitted, all files and tests within those files are executed. The following granularity levels are allowed when passing a file array.

  • Files can be given as string name or an object. When it's a string, all tests and their default versions are run. When an object, tests can be specified as an array.
  • Tests in a file object can be given as string names or an object. When it's a string, the default version is run. When an object, version names can be specified as an array.
FILE ARRAY
[  "LandingTests",  {    "name": "EditorTests",    "tests": [      "validate tabbed layout works expected",      {        "name": "validate color of button on picker change",        "versions": ["v1", "v3"]      }    ]  }]