GitHub Actions
Run your tests from GitHub Actions with the actions inMobileBoostHQ/actions. You reference them directly in your workflow, so there is nothing to install.
upload-builduploads your build and returns itsbuild-id.run-testsruns your tests by tag or ID, waits for them to finish, and fails the job if a test fails.
Add your credentials
In your repository, go to Settings > Secrets and variables > Actions.- In the Secrets tab, add
MOBILEBOOST_API_KEY. Create the key in MobileBoost under Settings > API keys. - In the Variables tab, add
MOBILEBOOST_ORG_ID, your organisation ID. Ask your MobileBoost contact if you do not have it.
Run your tests against a build
Upload the build your pipeline produced, then run every test with one of the tags you list:mode: ai-sdetruns the test code MobileBoost wrote and verified for each of your tests, on MobileBoost devices.tagsruns every test that has at least one of the tags. Usetest-idsto run specific tests, or both to run both sets.async: falsemakes the step wait for the run. It then writes a result table with links to each recording into the job summary, and fails the job if a test failed or was blocked.
build-path takes an .apk, an .ipa for physical iOS devices, or a .zip or .tar.gz of the .app for iOS simulators. A directory is zipped for you, and a glob uses its first match. See Build requirements.
Run against the app installed on your device
If your organisation tests the app already installed on its reserved device, such as the App Store or Play Store version, you do not need to upload a build. Name the app by its bundle ID (iOS) or package name (Android) and its platform instead:- The tests run on your physical device, the only kind with your app installed.
- They test the version installed on the device, not the code of the commit that started the workflow. That makes this a good fit for scheduled and manual runs. To test a pull request’s changes, upload the build it produced instead.
- Running without a build has to be enabled for your organisation. Ask your MobileBoost contact.
Requires version 1.9.0 of the actions.
@v1 picks it up automatically.run-tests inputs
The step outputs
run-id, and with async: false also passed, failed and blocked. Every selected test must have its automation written and verified for the platform; see Step 2: Start a run.
Results on the pull request
When a run comes from a pull request, MobileBoost can post its results as a comment on that pull request: what passed, what failed and why, with links to the reports. Install the MobileBoost GitHub App on the repository and ask your MobileBoost contact to turn the comments on. Nopermissions: block or GITHUB_TOKEN is needed.
Pin the version
@v1is recommended. It gets everyv1.x.xrelease, with fixes and no breaking changes.@v1.9.0pins an exact version.
Run the tests a pull request describes
The MobileBoost Test Action works differently: it uploads your build and sends the pull request description, which holds the test instructions, to MobileBoost in a single step.organisation-id (store it as the secret MOBILEBOOST_ORG_ID), app-path (the .apk or .ipa) and platform (Android or iOS).
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.
CI provider snippets
For other CI systems, use the upload API to send your build artifact and capture the returnedbuildId.
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.- Bitrise
- GitLab CI
- CircleCI
- Jenkins
Add a Script step to your workflow after the build step. This uploads the build and makes the Link each build to its pull request (recommended). Pass a Each
buildId available as an environment variable for subsequent steps.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.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.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 asAuthorization: Bearer mb_live_... on each call.
Step 1: Upload the build
Upload your build artifact using the upload endpoint. The response returns abuildId.
Step 2: Start a run
Send thebuildId from step 1 to POST /tests/execute.
Run specific tests by ID:
tags runs every test that has at least one of the tags. Send testIds as well to add specific tests to the run.
buildId, name the build instead. The run uses the newest build uploaded under that name for platform:
A test is runnable on the platform once its automation has been written and verified.
GET /tests shows this as platforms.<platform>.runnable.
- A test you name in
testIdsmust be runnable, or the request is refused with 400. - A test that only matches
tagsand is not runnable yet is skipped, and the rest of the run starts. If none of the tests matchingtagsis runnable, the request is refused with 400 and the message lists them.
runId, and lists any skipped test in skippedTests:
reason is one of not_automated, generation_in_progress, generation_failed, generation_blocked or not_ready. Print warnings in your pipeline log so a skipped test does not go unnoticed. A skipped test never fails the run.
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. Send the values testInputs carried as variables instead.Pass values to the tests
Some values belong to one run rather than to your tests: the backend a canary run signs in against, or a feature flag a nightly run switches on. Send them asvariables:
variables.
- Names use upper case letters, digits and underscores, and start with a letter. Names the test runner relies on, such as
PATHor anything starting withPYTHON, are refused with 400. Values must be strings, and a run takes up to 20. - Send your API key. A request with
variablesneeds it even if your organisation does not otherwise require one, because a variable can change which host a test signs in to. - Not for passwords or keys. The values are kept with the run for 14 days so a retry finds them. Keep credentials in your organisation’s environment variables (ENV Variables in the web app), where every read is audited.
Step 3: Get the results
PassrunId to GET /runs/{runId}, and repeat the call until status is completed or cancelled:
completedmeans every test has finished, not that every test passed. Fail your pipeline whenfailedTestsis not empty.skippedTestsrepeats the tests that were left out when the run started, in the same shape as in step 2. They are not counted intotalTestsand never changestatus.- While the run is in progress,
runningTestsandqueuedTestsshow 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
statusisinitial, tests are still being added to the run, sototalTestscan still grow. This takes up to about 10 seconds for a run of 100 tests.

