> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qa.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Test drafts and revisions

> What Active, Draft, and Archived mean for a test case, when new tests start as drafts, and how revisions record changes to a test.

Every test case is either Active, Draft, or Archived, and has a revision history. The state decides whether the test runs as part of your suite. Revisions record what the test contained at each point in time. The two are independent: activating or archiving a test does not create a revision, and saving an edit does not activate the test.

This is separate from a run result. Passed, Failed, and Skipped describe what happened when a test ran; see [Tests and results](/core-concepts/tests-and-results).

## Active, Draft, and Archived

| State    | What it means                                                      | Runs in test plans and schedules | Where you find it                                                       |
| -------- | ------------------------------------------------------------------ | -------------------------------- | ----------------------------------------------------------------------- |
| Active   | Reviewed and part of your regression suite                         | Yes                              | **Test Cases** page (the default filter is **Active only**)             |
| Draft    | In the project, but excluded from suite runs until you activate it | No, only when run directly       | **Test Cases** page with **Include drafts**, or **Test Cases → Drafts** |
| Archived | Removed from the suite and from all test plans, read-only          | No                               | **Test Cases → Archived**, or the **Show archived** filter              |

### Active

An active test is one you have reviewed and trust. It runs whenever a test plan that contains it starts, whether that plan is triggered manually, on a schedule, from CI/CD, or through the API. Active tests are the ones the **Test Cases** page shows by default, and the ones that appear in your results over time.

### Draft

A draft test exists in the project with all its content, but QA.tech skips it when a test plan or a multi-test run starts. Drafts are for tests that are not ready to affect your suite results yet: a test you just created, a test you are rewriting, or a test that covers a feature that is temporarily unavailable.

You can still run a draft on its own. **Run Test** on a single test, **Save & Run** in the test editor, and an API run that names exactly one test case ID all run the test whether or not it is active. When a run names several tests, only the active ones are included.

A draft can stay in a test plan, but it is skipped when the plan runs. A plan that contains only drafts cannot be run. On the **Test Cases** page, the row action for a draft is **Review** instead of **Edit**.

### Archived

Archiving removes a test from your suite and from every test plan it belonged to. The test becomes read-only, but its run history stays available, and you can still view it from **Test Cases → Archived**.

**Unarchive** restores the test as a draft. When you unarchive a single test, QA.tech asks whether to activate it at the same time. When you unarchive several tests at once, they stay drafts until you activate them.

## Activate, draft, or archive a test

From the **Test Cases** page, select one or more tests and open the actions menu. The available actions depend on the test's current state: **Activate**, **Convert to Draft**, **Archive**, or **Unarchive**. The test editor has the same switch as an **Activate test** or **Convert to draft** button.

You can also activate or draft tests through the [AI chat assistant](/core-concepts/ai-chat-assistant) ("activate these three tests", "convert the old checkout test to draft") and through the API. The [update test case](/api-reference/test-cases/update-test-case) endpoint accepts `isEnabled`, and the [list test cases](/api-reference/test-cases/list-test-cases) endpoint and `qatech test-cases --enabled` filter by it.

### Dependencies

Activating, drafting, and archiving respect [dependencies](/core-concepts/dependencies) so that an active test never depends on a test that cannot run:

* **Activating** a test that depends on draft tests prompts you to activate the whole chain together. A login test that other tests resume from is the common case. Chat activates the dependencies automatically. The API changes only the test you specify, so activate its dependencies separately.
* **Converting to draft** is blocked while other active tests depend on the test. Convert the dependents first, or select them together.
* **Archiving** shows you the tests that depend on the test before you confirm.

## When tests are created as Draft or Active

New tests start as drafts. A new test is unproven: the steps were generated from a description, and the first run has not happened yet. Draft gives you time to review the steps and the first result before the test can fail your suite.

| How the test is created                                    | Starts as                                                                                                                                                                |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Created from the **Test Cases** page                       | Draft. QA.tech runs the test once to generate steps.                                                                                                                     |
| Suggested by the AI chat assistant and approved by you     | Draft, unless you asked the assistant to activate the tests. The review panel has an **Activate selected tests** button for the tests you keep.                          |
| Created by the AI chat assistant without approval          | Draft. Onboarding is the exception: the tests the assistant creates while setting up a new project are activated so your first suite run has content.                    |
| Created through the API or the MCP `create_test_case` tool | Draft. A run starts automatically to generate steps.                                                                                                                     |
| Created during a pull request review                       | Draft, and kept out of your test list. The [post-merge agent](/configuration/github-app#post-merge-agent) can promote it, which activates the test and its dependencies. |
| **Duplicate** or **Copy to Project**                       | Same state as the original.                                                                                                                                              |
| Sample tests in the demo project                           | Active.                                                                                                                                                                  |

When you are ready, activate the test. See [Activate your test](/best-practices/creating-tests#activate-your-test) for the review flow.

## Revisions

A revision is a snapshot of a test case's content. Every time the content is saved, QA.tech stores a new revision and makes it the current version of the test. Revisions are never edited or deleted, so the history is complete.

A revision contains the parts of the test that the agent executes:

* Goal and expected result
* Steps
* Required configs
* Start URL path
* Agent and device preset
* [Owner](/core-concepts/ownership)

Everything else about a test lives outside revisions and is not versioned: the name, Active/Draft/Archived state, classification, scenario, application, labels, and dependencies.

### Who creates revisions

* **You**, when you click **Save** or **Save & Run** in the test editor, or when you update a test through the API.
* **The AI chat assistant**, when you accept an edit it proposes. These revisions carry a **Chat** badge in the version history that links back to the conversation.
* **QA.tech**, after a new test's first run, when the agent writes the steps it took into a new revision so you can review them.

Activating, drafting, or archiving a test, or changing its name, labels, scenario, or dependencies does not create a revision.

### Current revision and runs

The most recent revision is the current version, marked **Current** in the version history. There is no separate publish step: a saved edit takes effect on the next run. The version history also marks the latest revision **Draft**; this label is unrelated to a Draft test.

Each run records the revision it executed, so a result always corresponds to the goal and steps that were current at that time, even if the test has changed since.

### View and compare revisions

Open **View Version History** from a test's actions menu to list its revisions, compare any revision with the previous one, and open an older version. To restore an older version, open it, make an edit, and save: the edit becomes a new revision. See [Revision history](/test-features/revision-history) for the full walkthrough.
