# Launch a Copilot session

> Start a Copilot session on web, Android, or iOS, from a test case or from QI Home, and end or resume it.

Launch Testsigma Copilot from a test case in **Test Cases**, or from a generated test case in **QI Home**. Choose where it runs first: on your machine through Testsigma Terminal, or on **Testsigma Lab**. See [Choose where the session runs](https://testsigma.com/docs/v2/copilot/overview/#choose-where-the-session-runs).

## Launch a session on web

1. Go to **Create Tests > Test Cases** and open a test case.

2. Click **Copilot** in the action panel.

3. Under **Test lab**, select **Local Devices** or **Testsigma Lab**.

   
   **Local Devices** needs the Terminal online. **Terminal Status** at the top of the overlay shows **Terminal is offline** when none is detected on your machine.
   

4. (Optional) In the **Set Initial Debug Point** field, select the step where execution should pause.

5. (Optional) In the **Execute from Step** field, select the step where execution should begin. All prior steps are marked **Skipped**. Put the application under test on the screen that matches that step first.

6. (Optional) Turn on **Run till failed step** to stop at the first failure. With it off, the test case runs from start to end.

7. (Optional) Configure **Environment**, **Additional Settings**, and **Desired Capabilities**.

8. Click **Launch** and wait for the session to start.
   ![Launch Copilot](https://s3.amazonaws.com/static-docs.testsigma.com/new/projects/applications/Launch_Copilot_from_TCs.png)

On **Local Devices**, Copilot opens a browser window on the test case's URL. On **Testsigma Lab**, a new tab opens with **Spinning up your cloud browser** while the cloud VM is provisioned, and the cloud browser appears when it is ready. In both, the steps panel and the application sit side by side, and the chat panel carries the session conversation.

The application is streamed live into the session, so the view keeps pace with the step being executed. Anything you do in the application while the run is paused registers against the current screen.

When a test case uses a test data profile, a session can debug only one profile at a time.

## Launch a session on Android or iOS

A mobile session runs on a device connected to your machine or on a cloud device from **Testsigma Lab**. The panel, controls, and Analyzer behave the same as on web.

1. Open the test case and click **Copilot**.

2. In the **Run in Debug Mode** overlay, under **Test lab**, select **Local Devices** or **Testsigma Lab**.

3. Under **Test Machine**, select the **OS & Version** and the **Device**. On **Testsigma Lab**, the list shows cloud devices.

4. (Optional) Turn on **Run till failed step** and select the step to pause at.

5. Under **App Source**, select **External link** for a publicly accessible URL, **Uploaded apps** for an app already in **Uploads**, or **Use details** to enter the **App Package** and **App Activity**.

6. Click **Launch**.

The session opens with the test steps, the related information, and the streamed device screen.

## Launch from QI Home with Run with Copilot

A test case generated in **QI Home** carries manual steps. **Run with Copilot** executes the steps the Generator wrote, so you can check element detection, assertions, and test data against the live application before the test case reaches the library. To have the agent find missing steps instead, use [Agentic Learning](https://testsigma.com/docs/v2/copilot/agentic-learning/).

1. In **QI Home**, generate the test cases and open one from the list. See [Generator](https://testsigma.com/docs/v2/qi-home/ai-agents/#generator).

2. Review the steps on the **Manual Steps** tab. Click **Edit** to change them manually, or enter a prompt and click **Refine manual steps** to have the agent adjust them.

3. Click **Generate Automated Steps** to convert the manual steps into NLP steps.

4. Hover over **Run with Copilot** and select the environment to run in. Copilot executes the steps.

5. Review the results, then click **Save to Library**.

6. Select the folder and subfolder in **Select Location**.

![Test Case Details with the automated steps, the Run with Copilot environment list, and Save to Library](https://s3.amazonaws.com/website-static-docs.testsigma.com/new_images/projects/Updated_Doc_Images/Atto_automate_update_9.png)

**Run with Copilot** has no **Test lab** field. It runs on your machine and needs the Terminal online. To save without running first, click **Save to Library** at step 3.

With auto-healing enabled, the run validates element locators against the live application as it executes. Where a locator no longer matches because the UI changed, Testsigma finds the element through an updated locator rather than failing the step. After the run, Auto-Healing Insights shows what was healed and lets you make the change permanent.

## Launch in the same window

Same-window launch applies to **Local Devices** only. A **Testsigma Lab** session always opens in a fresh cloud browser.

Copilot opens in a new window or in the same window. A new window uses a new profile and needs no preparation. To use the same window, start Chrome in remote debugging mode first, in a new profile.

On Windows, open the command prompt and run:

```bash
start chrome.exe --remote-debugging-port=9222 --user-data-dir="C:\selenum\ChromeProfile"
```

On macOS, open Terminal and run:

```bash
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --user-data-dir="~/ChromeProfile"
```

Chrome then exposes the remote DevTools protocol on that port, with the profile set by `--user-data-dir`, which is what lets ChromeDriver drive it.

## End or resume a session

To end a session, click **Exit Copilot**, then **Stop Copilot** in the **Stop & Exit Copilot** dialog. On **Testsigma Lab**, the cloud machine is released when the session ends.

![Exit Copilot Session](https://s3.amazonaws.com/static-docs.testsigma.com/new/projects/applications/Exit_Copilot_Session.png)

A **Testsigma Lab** session is tied to its URL. If the tab closes or the browser crashes, open the same URL to return to it. The panel shows **Session connected**, and the step list, chat history, and run state are as you left them.
