Docs

Job Payload Reference

Overview

The job payload is a JSON object submitted to the job creation endpoint to trigger automated test execution on RobusTest Hub.

Endpoint:

POST /v3/job/new?accesskey=<ACCESS_KEY>

Full Payload Examples

Android (Espresso)

{
    "project": "<project_id>",
    "identifier": "<job_identifier>",
    "desc": "<job_description>",
    "priority": 0,
    "type": "Espresso",
    "runMode": "distributed",
    "runSetting": "<run_setting_id>",
    "build": {
        "aut": "<aut_build_id>",
        "test": "<test_build_id>"
    },
    "setting": {
        "performance": {
            "enableAppVitals": true
        },
        "job": {
            "addMoreDevices": false,
            "retryOnSameDevice": false
        }
    },
    "devices": {
        "deviceQueries": [
            {
                "minDeviceCount": 1,
                "maxDeviceCount": 5
            }
        ],
        "devicesGroupIDs": ["allEligibleGroups"],
        "ids": ["<device_id_1>", "<device_id_2>"],
        "limitToMaxDevice": true
    },
    "framework": {
        "className": "<test_class_name>",
        "packageName": "<app_package_name>",
        "testRunner": "<test_runner_class>",
        "testApplicationID": "<test_app_id>",
        "testPackageName": "<test_package_name>",
        "applicationID": "<app_id>",
        "params": {
            "<param_key_1>": "<param_value_1>",
            "<param_key_2>": "<param_value_2>"
        }
    }
}

iOS (XCUITest)

{
    "project": "<project_id>",
    "identifier": "<job_identifier>",
    "desc": "<job_description>",
    "priority": 1,
    "type": "XCUITest",
    "runMode": "distributed",
    "runSetting": "<run_setting_id>",
    "forceDeviceAllocation": false,
    "build": {
        "aut": "<aut_build_id>",
        "test": "<test_build_id>"
    },
    "setting": {
        "performance": {
            "enableAppVitals": true
        },
        "job": {
            "addMoreDevices": false,
            "retryOnSameDevice": false
        }
    },
    "devices": {
        "deviceQueries": [
            {
                "minDeviceCount": 1,
                "maxDeviceCount": 20
            }
        ],
        "devicesGroupIDs": ["allEligibleGroups"],
        "ids": ["<device_id_1>"],
        "limitToMaxDevice": true
    },
    "framework": {
        "jobRunner": "<test_runner_name>",
        "runOnlyClasses": "<test_class_name>",
        "ignoreTestCases": "<test_cases_to_exclude>",
        "xcuitestPrepareSource": "RobusTest",
        "xctestplanFile": "<xctestplan_file_id>",
        "maxScreenshots": 100,
        "cleanDevice": [
            "beforeEachTest",
            "afterEachTest"
        ],
        "xcuitest_params": {
            "env_vars": {
                "<env_key_1>": "<env_value_1>",
                "<env_key_2>": "<env_value_2>"
            }
        }
    }
}

Attribute Reference

Top-Level Attributes

Attribute Type Mandatory Description Example
project String Yes Project ID from the Project Home page URL "649dc876baec73ad022c8006"
type String Yes Testing framework for the job Espresso, XCUITest, XCTest, Appium(App), Appium(Browser), Selenium(Web Apps), Roku, Karate API
runMode String Yes Order/method of test execution parallel, distributed
identifier String No Human-readable label to identify the job "Smoke Test - Login Flow"
desc String No Brief description of the job "Nightly regression run"
priority Number No Execution priority. Higher value = higher priority 10
runSetting String No Run Setting ID configured in Project → Run Settings "649dcc970bc67baa5c6cca99"
forceDeviceAllocation Boolean No If true, the job preempts devices held by lower-priority jobs when no free devices are available. false

forceDeviceAllocation — Detail

When set to true and no free devices are available, the job:

  1. Finds all busy devices that match its requirements
  2. Sorts them by job priority (lowest priority first)
  3. Force-frees them one by one until the quota is met
  4. Displaced instances are closed with status code 63

Works in two ways depending on how devices are specified:

Path Trigger Behaviour
Device IDs devices.ids specified Force-frees those specific devices if they are busy
Device Query Device criteria specified (model, OS, etc.) Finds all matching devices and force-frees the lowest-priority busy ones until quota is met

Protection rule: A job with forceDeviceAllocation: true cannot have its own devices force-freed by another job — even one that also has the flag set. This prevents priority conflicts.

Things to keep in mind:

  • Only use for genuinely high-priority jobs — it forcibly terminates other running sessions
  • If the devices you need are held by another forceDeviceAllocation job, preemption will fail
  • A job will never force-free a device it already owns
  • Check server logs for ForceDeviceAllocation: and ForceFree: entries to trace what happened

Build

Attribute Type Mandatory Description Example
build.aut String Yes Build ID of the Application Under Test (AUT) "69c1fbdfeacede5be8d3042a"
build.test String Conditional Build ID of the test binary (APK for Espresso / ZIP for XCUITest). Required for Espresso, XCUITest, etc. "69c1fb860bc67b26ab678cb6"

Setting

Controls job behaviour and performance data collection.

setting.performance

Attribute Type Mandatory Description Example
setting.performance.enableAppVitals Boolean No Enables AppVitals performance metric collection during the job true

setting.job

Attribute Type Mandatory Description Example
setting.job.addMoreDevices Boolean No If true, additional devices can be added to the job during execution to meet device count requirements false
setting.job.retryOnSameDevice Boolean No If true, failed test cases are retried on the same device rather than any available device false

Devices

Controls which devices the job runs on.

Attribute Type Mandatory Description Example
devices.deviceQueries Array Yes List of device filter criteria. Each item specifies minDeviceCount and maxDeviceCount See below
devices.devicesGroupIDs Array No Device group IDs to restrict device selection. Use ["allEligibleGroups"] for all groups the project belongs to ["<group_id>"]
devices.ids Array No Explicit list of device IDs to target. Used alongside or instead of query-based selection ["<device_id_1>", "<device_id_2>"]
devices.limitToMaxDevice Boolean No If true, device allocation is capped at maxDeviceCount even if more matching devices are available true

deviceQueries Item

Each item in deviceQueries defines a set of conditions and device count requirements. Conditions are evaluated inline — there is no reference to a saved query ID.

Field Type Mandatory Description Example
minDeviceCount Number No Minimum number of devices required to start the job 1
maxDeviceCount Number No Maximum number of devices to allocate for the job 5
conditions Array No Filter conditions to match devices by attribute. Multiple conditions use AND logic See below
deviceAllocationSortAttribute String No Device attribute to sort matched devices by before allocation "osVersion"
deviceAllocationSortDirection String No Sort direction: asc or desc "asc"

conditions Item

Field Type Mandatory Description Example
attribute String Yes Device attribute to filter on (e.g. osVersion, model, label) "osVersion"
operator String Yes Comparison operator: =, ==, >, >=, <, <=, in "="
value String/Number Yes Value to compare against "12"

Example — target Android 12 devices, minimum 1, maximum 5:

{
  "devices": {
    "deviceQueries": [
      {
        "minDeviceCount": 1,
        "maxDeviceCount": 5,
        "conditions": [
          {
            "attribute": "version",
            "operator": "=",
            "value": "12"
          }
        ]
      }
    ]
  }
}

Framework

Framework-specific configuration passed to the test runner. Attributes vary by platform.

Android (Espresso)

Attribute Type Mandatory Description Example
framework.className String No Fully qualified name of the test class or suite to run "com.example.suites.SmokeTestSuite"
framework.packageName String No Package name of the application under test "com.example.app"
framework.testRunner String No Fully qualified class name of the test runner "com.example.CustomTestRunner"
framework.testApplicationID String No Application ID of the test binary "com.example.app.test"
framework.testPackageName String No Package name of the test binary "com.example.app.test"
framework.applicationID String No Application ID of the app under test "com.example.app"
framework.params Object No Key-value pairs passed as instrumentation arguments to the test runner at runtime {"env": "staging", "annotation": "com.example.SmokeTest"}

iOS (XCUITest)

Attribute Type Mandatory Description Example
framework.jobRunner String No Name of the test runner to use for the job "XCTestRunner"
framework.runOnlyClasses String No Comma-separated list of test class names to run. Leave empty to run all classes "SanityTest,RegressionTest"
framework.ignoreTestCases String No Comma-separated list of test case names to exclude from execution "TestCase1,TestCase2"
framework.xcuitestPrepareSource String No Source that prepares the XCUITest bundle. Use "RobusTest" for RobusTest-managed preparation "RobusTest"
framework.xctestplanFile String No File ID of an .xctestplan file uploaded to RobusTest, used to configure test selection and execution "69a00083eacede675829beb7"
framework.maxScreenshots Number No Maximum number of screenshots to capture per test session 100
framework.xcuitest_params Object No XCUITest-specific runtime parameters. Contains env_vars for environment variable injection See below
framework.cleanDevice Array of Strings No Controls when the device is cleaned (app uninstalled and reinstalled) relative to each test case. Accepted values: "beforeEachTest", "afterEachTest". Both values can be specified together. ["beforeEachTest", "afterEachTest"]

framework.xcuitest_params.env_vars

Key-value pairs injected as environment variables into the XCUITest run. Use these to pass environment configuration, region settings, or authentication tokens to your tests.

"xcuitest_params": {
    "env_vars": {
        "environment": "staging",
        "region": "us",
        "user": "premium"
    }
}