# Cursor

> Install the Arcus extension for Cursor, sign in, pick a project, and link sessions to tickets for test generation.

The Arcus extension for Cursor captures your coding sessions and sends them to [QI Home](https://testsigma.com/docs/arcus/v2/qi-home/overview/), where Arcus generates test cases from them.

## Prerequisites

- Cursor, or VS Code 1.85 or later.
- `node` on the integrated terminal's `PATH`.
- An active Arcus project.

## Install the extension

The extension captures file saves and the editor's hook events, and also works in VS Code. Its project and map commands run a bundled Node script, which is why it needs `node`.

Install **Arcus** from the VS Code Marketplace. Cursor reads the same marketplace.

Cursor commands use a hyphen where the other Arcus plugins use a colon: `/arcus-login`, not `/arcus:login`.

## Sign in and pick a project

1. Press `Cmd+Shift+P`, select **Arcus: Sign In**, and complete the sign-in in the browser.

2. Run `/arcus-project list` to see your projects, then `/arcus-project use ` to pin the one your sessions go to.

Capture starts after you sign in. To sign out, select **Arcus: Sign Out** from the command palette, which clears your local credentials.

## Link your work to a ticket

Run `/arcus-map ticket ` with the ticket for the work you're doing:

```bash
/arcus-map ticket PROJ-123
```

Your session then arrives in QI Home already mapped to the sprint holding that ticket, so nobody maps it manually.

## Write and push test cases

1. Run `/arcus-test`, optionally followed by the feature you want covered. Cursor writes end-to-end test cases for the current repository, validates them, and offers to run them.

2. Run `/arcus-push` to send the test cases from this session to Arcus.

`/arcus-test` and `/arcus-push` also need the [Arcus CLI](https://testsigma.com/docs/arcus/v2/qi-home/developer-tools/cli/) on your `PATH`. The CLI has its own login, `testsigma login`, separate from **Arcus: Sign In**.

For every command, see [Plugins](https://testsigma.com/docs/arcus/v2/qi-home/developer-tools/plugins/#use-the-commands). Swap the colon for a hyphen in each one.

## Where your work lands

- **Sessions** arrive on the **Unlinked Contexts** tab of Context Management, unless you linked a ticket. Mapping a session to a sprint or an Adhoc session triggers test generation from it.
- **Pushed test cases** arrive on the **Unlinked Test Cases** tab, unless you picked a sprint when you pushed.

The mapping and linking steps are in [Context Management](https://testsigma.com/docs/arcus/v2/qi-home/context-management/).

## Pull requests for the same work

With the [Arcus GitHub App](https://testsigma.com/docs/arcus/v2/integrations/plugins/github/) installed, a pull request for work you captured here joins your session automatically:

- **Session not mapped yet**: the session and the pull request become a single entry in **Unlinked Contexts**.
- **Session already mapped**: the pull request is mapped to the same sprint or Adhoc session, and there's nothing more to do.
