TestKase
TestKase
|Docs
AutomateMobileEspresso

Starting a build

Start an Espresso build on one or more Android devices, and choose which tests run.

One request runs your app and test suite on a list of devices:

curl -u "x:$TESTKASE_ACCESS_KEY" -H "Content-Type: application/json" \
  https://hub.testkase.com/espresso/v1/build \
  -d '{
    "app": "farm://app-3f9c01a2b4c5d6e7",
    "testSuite": "farm://suite-81ad02c4e9f1b367",
    "devices": ["Pixel 8-17", { "device": "Galaxy S24-15", "virtual": true }],
    "buildTag": "nightly-412"
  }'
{ "build_id": "5b1e7c2a-9d4f-4e1b-8a63-2f0c7d9e4b18", "message": "Success" }

Keep build_id to read the results.

The fields you will use

Field
app, testSuiteThe two farm:// URLs from uploading. Required.
devices1 to 20 devices. Required. A real phone is "<name>-<Android version>". An emulator is { "device": "<name>-<version>", "virtual": true }. Copy names from the capability generator.
classRun only some tests, e.g. ["com.acme.LoginTest"] or ["com.acme.LoginTest#loginFails"]. package, annotation, notAnnotation and size work like adb shell am instrument -e.
buildTagThe build's name in the dashboard, e.g. a CI run number.
runTimeoutStop after this many minutes (1 to 120).

Every field is in the API reference.

How it runs

  • Each device gets its own session. All the selected tests run on it, one after another.
  • The devices run at the same time, one per thread in your plan. Extra devices wait in the queue.
  • A filter that matches no test ends as error, never as a pass.
  • App data is not cleared between tests, so each test should set up its own state.

How long a run may take

At most 120 minutes per device. Use runTimeout for a shorter limit. Installing the APKs counts toward the time.

Not available yet

Sharding, Android Test Orchestrator (and clearPackageData), network logs, Local Tunnel, biometric simulation, camera image injection, and one instrumentation run per test. Sending one of these fields is refused with a 400 that says so. You also cannot watch an Espresso session live.