NewiPhone Duo, live in your browser. Try it →
Vibeview
Pricing
Integration

Mobile App Testing in CircleCI

Testing a mobile app on CircleCI usually means a macOS executor for the iOS half and an Android emulator that has to boot inside the job for the other. With VibeView, the job that tests your app runs on the same Docker executor as the rest of your workflow. It picks up the APK an earlier job saved to the workspace, or has VibeView build iOS in its cloud, and runs your tagged test groups against that exact build on a live iOS simulator, Android emulator, Apple TV, Android TV or Roku. CircleCI collects the JUnit report on the job’s Tests tab, and a GitHub repository can also get a commit status per group. Smart, the default, replays recorded and learned paths, and uses AI (beta) only where the screen changed or a step has no path yet.

How it works

  1. 1. Put the token in a context or the project

    In VibeView, under Settings > API token, create a token with the Developer role, CI only access and an expiry. In CircleCI, add it as VIBEVIEW_API_TOKEN, either in a context (so you can restrict who runs jobs that use it, and share it across projects) or in the project’s environment variables. CircleCI doesn’t pass project variables to builds of pull requests from forks unless you turn that on, and you shouldn’t for this token. A CI-only token can upload builds, start cloud builds, create tests from a spec, and start, cancel and read test runs. It can’t manage your team, billing, build secrets, signing credentials, webhooks or other tokens, or open live device sessions.

  2. 2. Add the job to .circleci/config.yml

    Your build job ends with persist_to_workspace for the APK, and this job attaches the workspace, uploads the APK and runs the groups you tagged smoke in VibeView (every one of them must belong to the app the APK is for). The CLI installs under your home folder, with no sudo, and $BASH_ENV puts it on the PATH of the later steps; restore_cache and save_cache, keyed on the CLI version, keep the npm download between runs. The APK must include the x86_64 ABI.

    jobs:
      vibeview-android:
        docker:
          - image: cimg/node:lts
        steps:
          - attach_workspace:
              at: .
          - restore_cache:
              key: vibeview-cli-0.58.0
          - run: |
              npm install --global --prefix ~/.vibeview vibeview@0.58.0
              echo 'export PATH="$HOME/.vibeview/bin:$PATH"' >> "$BASH_ENV"
          - save_cache:
              key: vibeview-cli-0.58.0
              paths: [~/.npm]
          - run: |
              mkdir -p test-results
              BUILD_ID=$(vibeview upload-app build/app-release.apk --output json \
                | node -p 'JSON.parse(require("fs").readFileSync(0)).build_id')
              vibeview run-suites --tag smoke --platform android --build "$BUILD_ID" \
                --commit-sha "$CIRCLE_SHA1" --output junit > test-results/vibeview.xml
          - store_test_results:
              path: test-results
  3. 3. Read the Tests tab, and the pull request

    store_test_results runs even after the test step failed, so a red run still has its report. The job’s Tests tab lists every VibeView test as a test case, and each one’s output holds the link to its run page with the step-by-step result and screenshots. vibeview run-suites exits 1 when a test failed and 2 when the run couldn’t complete, which fails the job. If the project is a GitHub repository and it is the one connected in VibeView’s GitHub integration, --commit-sha also posts a commit status per group on the pull request, which branch protection can require.

  4. 4. iOS on a Docker executor, and TV

    iOS needs no macOS executor: vibeview build --cloud --platform ios --json builds the ios entry of your vibeview.json on VibeView’s macOS builders and reports the build id on its build_finished line. Add --profile preview for a React Native or Expo app, whose default development build would wait for a Metro server; vibeview build --cloud --profile preview, run once on your machine, saves that profile. For TV, the same job takes --platform tvos or androidtv, and a Roku job uploads the channel zip with --platform roku.

Full setup instructions live in the documentation.

Add CircleCI to your pipeline

Start free and run your first check on a live device.