# Create mobile test cases

> Create a test case for an Android or iOS app, pick the app and build, record its steps with Copilot on a cloud device or a local device, and run it.

Create a test case for an Android or iOS app, then have Copilot automate it on a real device in the cloud or on a device connected to your computer. A test case has no app type of its own. You choose **Mobile**, the app, and its build when you start a Copilot session, and again in the run configuration that runs the test case.

## Prerequisites

- The app exists in **Test Assets** > **Apps**. See [Apps](https://testsigma.com/docs/arcus/v2/run-tests/apps/#create-an-app).
- For **Cloud**: the app has an uploaded build in the **Ready** state. A Cloud session installs that build on the device, so an app created with **Enter package details manually** has nothing to install: you can select it, but **Start Copilot** stays unavailable. See [Upload a build](https://testsigma.com/docs/arcus/v2/run-tests/apps/#upload-a-build).
- For **My local machine**: the Arcus Agent is running, and a phone, emulator, or simulator is connected to it. See [Connect a mobile device](https://testsigma.com/docs/arcus/v2/get-started/installation/arcus-agent/#connect-a-mobile-device).
- For a real iPhone: a provisioning profile exists in **Settings** > **iOS Settings**. See [iOS signing](https://testsigma.com/docs/arcus/v2/apps/mobile/ios-signing/).

## Create the test case

1. Open **Test Cases** in the left navigation and open the folder the test case belongs in.
2. Click **Create**, or press `C`. The dialog opens with **Documentation** selected as the template type and the folder you opened in the folder chip.
3. Enter a title and, optionally, a description.
4. If the folder chip reads **Select a Folder**, click it, select a folder, and click **Select Folder**. Without a folder, Arcus shows "Folder is Required" and doesn't create the test case.
5. Click **Create**. The test case opens on the **Details** tab.
6. **(Optional)** To have Copilot learn the steps, enter the manual steps under **Steps**. Arcus saves them automatically.

For the template types and the other properties in the dialog, see [Manage test cases](https://testsigma.com/docs/arcus/v2/create-and-manage/test-cases/#create-a-test-case). Only test cases with the status **Ready** can be added to test runs and run templates.

## Start a Copilot session on a device

1. Open the **Automated steps** tab. If the test case has manual steps, click **Learn with Copilot**. Otherwise, click **Author with Copilot**. The **Copilot configuration** panel opens.

   
   Clicking either button replaces the tab's empty state with the step editor, even if you then click **Cancel**. To open the panel again, click **Debug with Copilot** in the header, or **Learn with Copilot** if the test case has manual steps.
   

2. In **What you are authoring**, select **Mobile**.
3. In **Where to run**, select **Cloud** or **My local machine**.
4. Under **Test machine**, choose the device:
   - **Cloud**: select the **OS & Version** and **Device**. The lists show the devices available to your account. **Orientation** is optional: **Portrait** or **Landscape**.
   - **My local machine**: select the device in **Attached device**. If none is connected, the panel reads "No device is booted. Start an emulator or simulator and reopen this." Connect or start one, then click **Cancel** and open the panel again.
5. Under **App Under Test**, select the app in **App**. **Start Copilot** stays unavailable until you do. If the project has no apps, the section reads "No apps in this project yet". Click **Open Apps** to create one.

   ![The Copilot configuration panel with Mobile, Cloud, and App Under Test with the app and Build version outlined.](https://s3.amazonaws.com/static-docs.testsigma.com/arcus/application_types/apps_mobile_copilot_config.webp)

6. **(Optional)** In **Build version**, select a build. The default, **Latest at trigger**, installs the app's newest build when the session starts.
7. **(Optional)** To see what the session installs, expand **App details and checks**. It lists the build's package or bundle ID and, once you pin a build, the facts Arcus read from the binary. If a row reads **This app asks for special access**, the app needs a permission Android grants only in Settings, such as Accessibility or Device admin. Turn it on for the app before you start, or record the steps that do it.

   ![The This app asks for special access warning, expanded.](https://s3.amazonaws.com/static-docs.testsigma.com/arcus/application_types/apps_mobile_special_access.webp)
8. Click **Start Copilot**. The session opens in a new browser tab and shows "Starting the device".

When the device is ready, Copilot runs a **Launch the app** step, and the app opens in the device mirror. For every setting in the panel, see [Copilot configuration](https://testsigma.com/docs/arcus/v2/copilot/configuration/).

If the session shows "Couldn't start a session on the device. Please try again.", click **Try again**. The failed start still appears on the test case's **Run history** as a failed Copilot run.

## The session window

The device mirror sits in the middle, with a toolbar beside it: **Search** finds elements by locator, **Refresh** reloads the screen, **Back** and **Home** press the device buttons, **Type** enters text into the focused field, **Keyboard** hides the device keyboard when it's showing, **Rotate** turns the device, and **Screenshot** captures it. The header shows the orientation, the screen size, and how long the session has run. The drawer below the mirror has the **Element** tab, which shows the screen's element tree and the details of the element you pick, plus **Run log**, **Device log**, **Network**, and **Source code**.

![A mobile session, with the passed steps, the device toolbar, App check, and Modes outlined.](https://s3.amazonaws.com/static-docs.testsigma.com/arcus/application_types/apps_mobile_session.webp)

**App check**, below the mirror, shows what Arcus found about the build before and at launch, such as whether it's a debug build, whether every native locator works on it, and which controls are hidden from accessibility. Click it to read each finding and what to do about it.

![The App check panel, with findings under Before start, At launch, and This session.](https://s3.amazonaws.com/static-docs.testsigma.com/arcus/application_types/apps_mobile_app_check.webp)

**Modes**, at the bottom right, holds **Recording mode** with its options **Tap coordinates**, **Swipe coordinates**, and **Double tap**, the **Live app testing** toggle, and **App context**: **Native** or **Hybrid**.

![The Modes popover, with Recording mode and its options, Live app testing, and App context.](https://s3.amazonaws.com/static-docs.testsigma.com/arcus/application_types/apps_mobile_modes.webp)

## Record the steps

1. Click **Record**. **Recording mode** turns on, and the banner reads "Tap and type in the device mirror here. Taps on the emulator or phone itself are not recorded."
2. Tap the app in the device mirror. Each tap adds a **Click on** step marked **RECORDED**, and a card names the element and its locator.

   

3. To enter text, tap the field and type the value. The **Type into** box shows it. Press `Enter` to add a **Type** step, which replaces what the field holds.
4. To go back a screen, click **Back** in the toolbar beside the device. Copilot adds **Press the device back button**, which runs on Android only.
5. Click **Stop recording**.

To add a check, click **Inspect** above the device, then tap an element in the mirror. The card shows the element's name, type, and locator, and the **Element** tab shows its details. Click **Verify** and select a check, such as **is visible**. Copilot adds a **Verify that** step for the element.

![The element card after inspecting a list item, with the picked element and Verify outlined.](https://s3.amazonaws.com/static-docs.testsigma.com/arcus/application_types/apps_mobile_inspect_card.webp)

![The Element tab, with the element tree and the picked element's type, text, accessibility id, resource id, and bounds.](https://s3.amazonaws.com/static-docs.testsigma.com/arcus/application_types/apps_mobile_element_tab.webp)

If the screen is a web page inside the app, set **App context** to **Hybrid** in **Modes** before you record or inspect it, so Copilot reads the page's elements. To use the app without recording anything, turn on **Live app testing**.

## Learn the steps

If you clicked **Learn with Copilot**, click **Start learning** instead of recording. Copilot performs the manual steps on the device and writes the automated steps. This works for Android and iOS, on a Cloud device or a device connected to your computer. See [Learn with Copilot](https://testsigma.com/docs/arcus/v2/automation/explore-and-automate/).

## Check and save the steps

1. Click **Restart execution**. Copilot relaunches the app and runs every step. Each step that passes shows a check mark and its duration. While the steps run, the mirror reads "Running — pause to interact".

   ![The Copilot panel after Restart execution, with the passed Launch the app, Click on, and Verify that steps outlined.](https://s3.amazonaws.com/static-docs.testsigma.com/arcus/application_types/apps_mobile_steps_passed.webp)

2. Click the exit icon at the top of the Copilot panel.
3. In **End session and close this tab?**, click **End session**. On **Cloud**, Arcus releases the cloud machine.

Back on the test case, the **Automated steps** tab lists the steps, and **Automation Type** shows **Automated**. The session's runs appear on the **Run history** tab, tagged with the device's platform, such as **Android**. If the steps don't show yet, refresh the page.

## Run the test case

Add the test case to a [test run](https://testsigma.com/docs/arcus/v2/run-tests/test-runs/#create-a-test-run) or a [run template](https://testsigma.com/docs/arcus/v2/run-tests/test-runs/#create-a-run-template) with a run configuration for **Mobile**. In the run configuration, select the device, then the **App** and its **Build version** under **App Under Test**. **Latest at trigger** installs the newest ready build when the run starts. A pinned build must still be ready or about to expire. See [Mobile configurations](https://testsigma.com/docs/arcus/v2/run-tests/run-configurations/#mobile-configurations).

Steps written for the web only, such as **Verify page** with page text, are skipped on mobile. Once the test case has steps, **Mobile** in **What you are authoring** shows how many of them are skipped, such as **1 of 3 steps skipped**, or **runs every step**.

![The What you are authoring chips on a test case with steps, reading Web 1 of 3 steps skipped, Mobile runs every step, and Windows.](https://s3.amazonaws.com/static-docs.testsigma.com/arcus/application_types/apps_copilot_coverage_chips.webp)
