> For the complete documentation index, see [llms.txt](https://docs.testvibe.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.testvibe.com/create-tests/import-existing-tests.md).

# Import Existing Tests

If your team already has test specs, scripts, or issues, you can bring them into a TestVibe group instead of recreating each feature by hand.

Imported features become part of the Test Suite and can be edited, generated, and run like other TestVibe tests.

## What To Import

TestVibe drafts a Gherkin feature from existing material. Each import is AI-drafted, not a 1:1 copy, so review the result before generation.

| Source                                                | Why                                                                                             |
| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| A document — PDF, Word, Excel, CSV, text, or Markdown | A spec, test script, or spreadsheet of test cases is segmented into one or more feature drafts. |
| A GitHub issue                                        | An issue from the linked repo becomes a feature draft.                                          |
| Raw Gherkin text                                      | Paste it directly into a blank feature (see below).                                             |

## Import From A Document Or GitHub Issue

1. Open the **Test Suite**.
2. Select the group where the new feature belongs.
3. From the **New feature** dialog choose **Import from document** (PDF, Word, Excel, CSV, text, or Markdown — or drop the file onto the feature list or a feature row), or choose **Import from GitHub issue** (requires a linked repo).
4. Watch the staged pipeline run, answering any inline questions:
   * **Extract & segment** — reads the document (or issue) and breaks it into candidate features.
   * **Draft feature file(s)** — writes the Gherkin draft(s).
   * **Enrich from screenshots** — for PDFs with embedded images, folds in details (fields, dialogs, expected screens) the text alone missed. Skipped for non-PDF sources or text-only PDFs.
   * **Verify against your site** — only when the project has a test site URL: replays the drafted path in a live browser and corrects screen names, labels, and invented data against what's actually there.
   * **Finalize the draft(s)**.
5. Review the drafted features, or cancel and keep the draft as-is.

An Excel or CSV import treats each row as a candidate test case; a Word/PDF/text/Markdown import treats the document as prose and segments it by described behavior. One import can split into multiple feature files. See [Import](/reference/forms/import.md) for the import panel reference.

## Bring In Raw Gherkin

If you already have Gherkin text you want to keep verbatim, create a **Blank Gherkin file** in the target group and paste your content into the editor. This skips AI drafting and keeps your wording exactly.

## Review After Import

After importing, open each feature and check:

| Review       | Why it matters                                             |
| ------------ | ---------------------------------------------------------- |
| Feature name | It should match the behavior being tested.                 |
| Scenarios    | Each scenario should be focused and testable.              |
| Steps        | Steps should use visible UI details and expected outcomes. |
| Background   | Shared setup should apply to every scenario.               |
| Test data    | Data should exist or be created during the test.           |

Imported Gherkin may need cleanup before AI generation.

## Common Cleanup

* split very long scenarios
* replace vague steps with visible actions and results
* remove implementation notes that are not user behavior
* add missing `Then` assertions
* move repeated setup into `Background`
* update old labels or page names to match the current app

## Next

Improve imported content with [Write good test instructions](/create-tests/write-good-test-instructions.md), then generate code with [Generate Playwright code](/ai-generation/generate-playwright-code.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.testvibe.com/create-tests/import-existing-tests.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
