# GitHub Copilot

> Install the Arcus plugin for the GitHub Copilot CLI, sign in, pick a project, and link sessions to tickets for test generation.

The Arcus plugin for the GitHub Copilot CLI 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

- The GitHub Copilot CLI.
- An active Arcus project.

## Install the plugin

This is the Arcus plugin for the GitHub Copilot CLI, not [Copilot](https://testsigma.com/docs/arcus/v2/automation/copilot/), the Arcus test execution feature.

The plugin captures your prompts, the tools Copilot runs, and the files it changes. In your terminal, run:

```bash
copilot plugin marketplace add testsigmahq/arcus-copilot-plugin
copilot plugin install arcus@testsigma
```

Then start a new GitHub Copilot CLI session so the plugin loads.

## Sign in and pick a project

1. In the GitHub Copilot CLI, run `/arcus:login` and complete the sign-in in the browser. You sign in once per machine.

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.

## 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
```

The ticket can come from Jira, Azure DevOps, Linear, ClickUp, or GitHub. 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. Copilot 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. Pick a sprint and module, or leave them unlinked.

`/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:login`.

For every command, see [Plugins](https://testsigma.com/docs/arcus/v2/qi-home/developer-tools/plugins/#use-the-commands).

## 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.
