Demo
GUIDE

Mobile testing

3 MIN READ

TestZeus supports mobile apps on real or virtual Android and iOS devices. Mobile work shares the same Environments, Test Data, and Authentications as web tests, but the executor and authoring surface depend on how you create the test.

Environments and device type

Location: Test Toolkit → Environments

When you create or edit an environment, set Device Type to a mobile device instead of Browser. That environment is what mobile tests and mobile Test Blocks runs lease during Live Test and suite execution.

Mobile Test Blocks requires both the Test Blocks feature and the mobile feature for your tenant.

Authoring paths

Path Where to start What you edit
Gherkin on mobile Test Management → Tests → Create New Test → Mobile tab (From Scratch, From Recording, Magic Test, etc.) Feature/Scenario in the Gherkin editor; testing type set to mobile
Test Blocks on mobile Create New Test → Mobile → Test Blocks Step list with Device steps (Test Blocks guide)
Recorded mobile flow Create New Test → From Recording (mobile) Becomes Gherkin in Tests; Origin shows recording

Gherkin mobile scenarios use the same TestZeus dialect as web. For copy-paste examples (taps, switches, permission dialogs, pickers, webviews), see the Casebook → Mobile section.

Running and debugging

Test Blocks mobile specifics

Mobile Test Blocks uses the same step list, verify/save, and Live Test flow as web, but the builder is device-first:

  • There is no Browser tab, no Open browser, and no record-from-browser rail. The right rail shows Configuration, Variable Dictionary, and the device live view when a session is active.
  • New steps default to Device (step_type mobile). Code uses tz.device (launch, close, tap, type, assert text, compare screen, pressKey, and related helpers)—not Playwright page / expect.
  • Pre-seeded steps on mobile lists six device-only recipes (launch/close app, press key, assert text, compare screen, check visual feature). Web Salesforce and browser page recipes do not appear on mobile tests.
  • Do not mix browser and device steps in the same run range; the executor rejects a graph that would drive both surfaces in one run.
  • Web tests require an environment URL key before verify; mobile tests rely on the mobile environment and app package instead—no landing URL key.
  • Magic Test’s Gherkin vs Test Blocks chevron is hidden on the Mobile tab; create Test Blocks directly from Create New Test → Mobile when you want step-wise mobile authoring.

Programmatic mobile Test Blocks

With CLI ≥ 0.0.32 / SDK ≥ 0.0.28 / MCP ≥ 2.0.4, create mobile tests explicitly:

bash
testzeus test-blocks create --name "Login smoke" --testing-type mobile --environment ENV_ID
testzeus test-blocks add-step TEST_ID --type mobile --instruction "Launch the app and sign in"
testzeus test-blocks verify TEST_ID
testzeus test-blocks save TEST_ID

Use client.test_blocks.create(..., testing_type="mobile") or MCP create_test_blocks with the same field. See Test Blocks → Mobile Test Blocks and CLI, SDK, MCP, and skills for the full lifecycle and tool list.