Waldo CI/CD Integration: Automate Mobile Testing in Your Pipeline
Running mobile tests manually is a trap. You do it once after a big release, find three bugs, feel productive, and then skip it for the next six releases because it takes 45 minutes and someone always needs the test device. The only way mobile testing actually works is when it runs automatically — on every PR, every merge, every build.
This guide covers integrating Waldo into your CI/CD pipeline: the API, the CLI, GitHub Actions setup, and the patterns that work in practice.
How Waldo CI Integration Works
The integration has three steps regardless of which CI platform you use:
- Upload your app binary — send the signed IPA or APK to Waldo's API
- Trigger the test run — specify which test suite and which devices to run against
- Poll for results — wait for Waldo to finish and report pass/fail back to CI
Waldo exposes a REST API and a CLI that wraps it. Both approaches work. The CLI is simpler for straightforward pipelines; the API gives you more control if you need custom logic.
Authentication
All API calls require an API key. Generate one from the Waldo dashboard under Settings → API Keys. Store it as a CI secret — never hardcode it in your pipeline configuration.
The header for all requests:
Authorization: Bearer YOUR_WALDO_API_KEYUploading a Build
Before you can run tests, Waldo needs the binary.
API approach:
curl -X POST https://api.waldo.io/versions \
-H "Authorization: Bearer $WALDO_API_KEY" \
-F "file=@path/to/YourApp.ipa" \
-F "appToken=YOUR_APP_TOKEN"The response includes a versionId you'll use to trigger the test run:
{
"versionId": "v-abc123def456",
"status": "ready",
"platform": "ios"
}CLI approach:
waldo upload YourApp.ipa --application YOUR_APP_TOKENThe CLI handles the polling loop internally and outputs the version ID when the upload is processed.
Triggering a Test Run
Once you have a version ID, trigger the test suite:
curl -X POST https://api.waldo.io/suites/YOUR_SUITE_ID/runs \
-H "Authorization: Bearer $WALDO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"versionId": "v-abc123def456",
"devices": ["iPhone14Pro_iOS16", "SamsungGalaxyS22_Android13"]
}'This returns a run ID:
{
"runId": "run-xyz789",
"status": "queued"
}Polling for Results
Waldo tests run asynchronously. Poll the run status until it reaches a terminal state:
while true; do
STATUS=$(curl -s https://api.waldo.io/runs/run-xyz789 \
-H "Authorization: Bearer $WALDO_API_KEY" | jq -r '.status')
if [ "$STATUS" = "passed" ] || [ "$STATUS" = "failed" ] || [ "$STATUS" = "error" ]; then
echo "Run completed with status: $STATUS"
break
fi
echo "Status: $STATUS — waiting..."
sleep 15
doneTerminal statuses:
passed— all tests passed on all devicesfailed— one or more tests failederror— infrastructure error (not a test failure — worth retrying)
GitHub Actions Integration
Here's a complete GitHub Actions workflow that builds, uploads, and runs Waldo tests:
name: Mobile Tests
on:
push:
branches: [main]
pull_request:
jobs:
test-mobile:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Build app
run: |
xcodebuild archive \
-scheme YourApp \
-archivePath build/YourApp.xcarchive \
-configuration Release \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO
xcodebuild -exportArchive \
-archivePath build/YourApp.xcarchive \
-exportPath build/ \
-exportOptionsPlist ExportOptions.plist
- name: Install Waldo CLI
run: npm install -g @waldo/waldo-cli
- name: Upload to Waldo
id: upload
run: |
VERSION_ID=$(waldo upload build/YourApp.ipa \
--application ${{ secrets.WALDO_APP_TOKEN }} \
--token ${{ secrets.WALDO_API_KEY }} \
--format json | jq -r '.versionId')
echo "version_id=$VERSION_ID" >> $GITHUB_OUTPUT
- name: Run test suite
run: |
waldo run \
--suite ${{ secrets.WALDO_SUITE_ID }} \
--version ${{ steps.upload.outputs.version_id }} \
--token ${{ secrets.WALDO_API_KEY }} \
--waitThe --wait flag on the run command blocks until the suite completes and exits with a non-zero code if tests fail, which causes the CI job to fail automatically.
Bitrise Integration
Waldo publishes an official Bitrise step. Add it to your bitrise.yml:
- waldo-upload@1:
inputs:
- upload_token: $WALDO_API_KEY
- app_token: $WALDO_APP_TOKEN
- ipa_path: $BITRISE_IPA_PATH
- waldo-run-tests@1:
inputs:
- api_token: $WALDO_API_KEY
- suite_id: $WALDO_SUITE_ID
- wait_for_result: "true"Store WALDO_API_KEY and WALDO_APP_TOKEN as Bitrise secret environment variables, not in the YAML file.
CircleCI Integration
version: 2.1
jobs:
mobile-tests:
macos:
xcode: "15.0"
steps:
- checkout
- run:
name: Build IPA
command: |
xcodebuild archive -scheme YourApp -archivePath /tmp/YourApp.xcarchive
xcodebuild -exportArchive -archivePath /tmp/YourApp.xcarchive \
-exportPath /tmp/ -exportOptionsPlist ExportOptions.plist
- run:
name: Install Waldo CLI
command: npm install -g @waldo/waldo-cli
- run:
name: Upload and Test
command: |
waldo upload /tmp/YourApp.ipa \
--application $WALDO_APP_TOKEN \
--token $WALDO_API_KEY
waldo run \
--suite $WALDO_SUITE_ID \
--token $WALDO_API_KEY \
--wait
workflows:
mobile-ci:
jobs:
- mobile-tests:
filters:
branches:
only: [main, develop]Selective Test Execution
Running your full test suite on every PR adds time to the feedback loop. Use Waldo's tag system to run subsets:
# Run only smoke tests on PR
waldo run --suite $WALDO_SUITE_ID --tag smoke --wait
# Run full suite only on main branch merges
waldo run --suite $WALDO_SUITE_ID --waitTag tests in the Waldo dashboard by editing each test's properties. A typical tag strategy:
smoke— 5-10 critical flows, runs on every PRregression— full suite, runs on merges to mainonboarding— first-run experience tests, runs when onboarding code changes
Handling Failures Intelligently
Not every test failure warrants blocking a deploy. Build failure handling into your pipeline:
# Capture the exit code without immediately failing
waldo run --suite $WALDO_SUITE_ID --wait --format json > /tmp/waldo-results.json
WALDO_EXIT=$?
# Parse the results
FAILED_COUNT=$(jq '.failedTests | length' /tmp/waldo-results.json)
TOTAL_COUNT=$(jq '.totalTests' /tmp/waldo-results.json)
echo "Waldo results: $FAILED_COUNT/$TOTAL_COUNT failed"
# Block on smoke test failures, warn on other failures
if [ $WALDO_EXIT -ne 0 ]; then
FAILED_TAGS=$(jq -r '.failures[].tags[]' /tmp/waldo-results.json)
if echo "$FAILED_TAGS" | grep -q "smoke"; then
echo "Smoke test failure — blocking deploy"
exit 1
else
echo "Non-smoke failures — flagging but not blocking"
# Send Slack notification, create issue, etc.
exit 0
fi
fiParallel Device Execution
Running the same tests across multiple devices serially multiplies your CI time. Waldo's API supports parallel device runs — trigger separate runs for each device configuration and wait for all of them:
DEVICES=("iPhone14Pro_iOS17" "iPhone12_iOS15" "SamsungGalaxyS22_Android13")
RUN_IDS=()
for DEVICE in "${DEVICES[@]}"; do
RUN_ID=$(waldo run --suite $SUITE_ID --device $DEVICE --token $API_KEY \
--format json | jq -r '.runId')
RUN_IDS+=($RUN_ID)
done
# Wait for all runs to complete
for RUN_ID in "${RUN_IDS[@]}"; do
waldo wait --run $RUN_ID --token $API_KEY
doneThis runs all device configurations in parallel — total CI time equals the slowest device, not the sum of all devices.
Pairing with Web Testing
Mobile CI covers your native app surface. If you're also shipping a web product, pair Waldo's mobile coverage with web automation. HelpMeTest handles the web layer: run helpmetest test tag:ci in the same pipeline to cover web flows in parallel with Waldo covering mobile. Both integrate via environment variables and exit codes, so the same CI pattern applies.
# Run mobile and web tests in parallel
- name: Run mobile tests
run: waldo run --suite $WALDO_SUITE_ID --wait
- name: Run web tests
run: helpmetest test tag:ci
env:
HELPMETEST_API_TOKEN: ${{ secrets.HELPMETEST_API_TOKEN }}Summary
Waldo's CI integration is straightforward once you understand the three-step pattern: upload binary, trigger run, wait for result. The API is clean, the CLI wraps the polling loop, and official integrations exist for the major CI platforms.
The keys to making it work in practice: store credentials as secrets, use test tags to control what runs on PRs vs merges, and handle failures intelligently so flaky infrastructure errors don't block deploys unnecessarily.