Skip to main content
Integrating MobileBoost into your CI pipeline enables automated test execution against your latest app builds.

GitHub Action

The MobileBoost Test Action uploads your build and sends the PR body (which should contain test instructions) to MobileBoost in a single step.
The action automatically extracts test instructions from your PR body and sends them along with the build artifact. For guidance on formatting test instructions, see the format requirements section in the Natural language test definitions page.
If your app talks to a staging environment that is not reachable from the public internet, open a tunnel in the same job so the devices can reach it. See Local testing in CI.

Inputs

Required secrets

Add MOBILEBOOST_ORG_ID to your repository under Settings > Secrets and variables > Actions.

CI provider snippets

For other CI systems, use the upload API to send your build artifact and capture the returned buildId.
In all examples below, replace <ORG_KEY> with your MobileBoost organisation key, <platform> with ios or android, and the build file path with the actual path to your artifact.
Add a Script step to your workflow after the build step. This uploads the build and makes the buildId available as an environment variable for subsequent steps.
Link each build to its pull request (recommended). Pass a ci field so MobileBoost knows which pull request produced each build. Results then map back to the right PR, and MobileBoost can select the tests relevant to that PR’s changes. Every value comes from a built-in Bitrise variable, so there is nothing extra to create.
Each ci field maps to a variable Bitrise sets automatically:
$BITRISE_PULL_REQUEST and $BITRISEIO_GIT_BRANCH_DEST are only set on pull-request-triggered builds, so make sure your workflow runs on pull requests (App settings > Triggers). On non-PR builds the snippet omits prNumber and links the build by commit instead - no changes needed.
The only value you provide yourself is your organisation key - store it as a Secret (App settings > Secrets) and reference it (for example $MOBILEBOOST_ORG_KEY) instead of hardcoding <ORG_KEY>. The build path is whatever your build step produces ($BITRISE_APK_PATH for Android, $BITRISE_IPA_PATH for iOS).

API

For full control, use the API directly. The process has three steps: upload the build, start a run, then read its results. Send your API key as Authorization: Bearer mb_live_... on each call.

Step 1: Upload the build

Upload your build artifact using the upload endpoint. The response returns a buildId.

Step 2: Start a run

Send the buildId from step 1 to POST /tests/execute. Run specific tests by ID:
Run tests by tags: tags runs every test that has at least one of the tags. Send testIds as well to add specific tests to the run.
Run the newest build with a name: If your pipeline doesn’t keep the buildId, name the build instead. The run uses the newest build uploaded under that name for platform:
Every selected test must be runnable on the platform: its automation has been written and verified. GET /tests shows this as platforms.<platform>.runnable. The response carries the ID of the run in runId:
deviceConfigs, deviceProviderSettings, launchParams, testInputs, tagsQuery, iterations and metaData are not supported. A request that sends any of them is refused with 400, so a run never goes ahead on settings it ignored.

Step 3: Get the results

Pass runId to GET /runs/{runId}, and repeat the call until status is completed or cancelled:
  • completed means every test has finished, not that every test passed. Fail your pipeline when failedTests is not empty.
  • While the run is in progress, runningTests and queuedTests show which tests are on a device and which are waiting for one.
  • Step 2 returns just before the run is saved, which usually takes under half a second. Wait 2 seconds before your first call. If it answers 404, retry every 2 seconds. A 404 that lasts longer than 30 seconds means the run was not created: check the runId, then start the run again.
  • While status is initial, tests are still being added to the run, so totalTests can still grow. This takes up to about 10 seconds for a run of 100 tests.
A minimal polling loop:

Build requirements

Before tests can run, your application build must be uploaded to MobileBoost.

Simulators

iOS simulator builds: Build your app in Xcode targeting an iOS Simulator. Locate the .app file at Product > Show Build Folder in Finder > Products/Debug-iphonesimulator. Then compress it:
Or build from the command line:

Physical devices