Skip to main content

Import and export test cases

Move test cases between Agnox, spreadsheets, other test management tools and your Playwright code.

Migrating from Qase, TestRail, Xray or Zephyr? Start with the step-by-step Migrate & Export Test Cases guide. This page is the field-level reference.

In the dashboard, open Test Cases: Export offers every format below for the selected rows, else the open folder, else the whole project. Import (admins and developers) previews a file before anything is written.

Export​

POST /api/test-cases/export (dashboard, returns the file) or POST /api/v1/test-cases/export (API key, returns { files: [{ path, content }] }). Every role may export.

{ "projectId": "665f…", "format": "csv", "folderPath": "/root/Login", "ids": ["…"] }
formatFileContent
jsonagnox-test-cases.json{ format: "agnox.test-cases", version: 1, exportedAt, testCases: [...] }. Re-imports losslessly.
csvagnox-test-cases.csvID, Title, Folder, Description, Preconditions, Steps, Expected Results, Severity, Type, Tags, Kind. UTF-8 with BOM, CRLF. Steps are numbered lines in one cell; tags are ;-separated. A cell starting with =, +, - or @ is prefixed with ' so spreadsheets do not run it as a formula.
markdownagnox-test-cases.mdA heading per folder, a heading per case, and a step table
playwrightagnox-export.spec.ts (dashboard), one file per top-level folder (API and CLI)test.describe per folder, one test() per manual case with its steps as comments and test.fixme(...) so it never passes before it is implemented. Automated cases are skipped (they already have a spec).

At most 5 000 cases per export; narrow by folder or selection beyond that.

Import​

POST /api/test-cases/import (dashboard) or POST /api/v1/test-cases/import (API key):

{
"projectId": "665f…",
"format": "auto",
"content": "<file content as text>",
"filename": "testrail-export.csv",
"dryRun": true,
"duplicateStrategy": "skip",
"targetFolderId": "optional folder to import under"
}

Formats​

formatAccepts
autoDetects the format below from the content
agnox-json, agnox-csvAgnox exports
testrailTestRail CSV, including "separated steps" exports (one row per step)
qaseQase JSON (nested suites) or Qase CSV (suite_id / suite_parent_id hierarchy)
xrayXray CSV (Issue Key, Summary, Test Repository Path, one row per step)
zephyrZephyr Scale CSV (Name, Folder, Test Script (Step-by-Step) - Step, one row per step)
generic-csvAny CSV with a title column

Column names are matched case-insensitively. When a field has no column under the vendor's name, these common names are used: title ← title, name, summary; folder ← folder, suite, section (separated by /, > or /); steps ← steps, action; expected result ← expected, expected_result, expected result; priority ← priority, severity; tags ← tags, labels.

Priorities map to severities: critical, blocker, highest, p0 → CRITICAL; high, major, p1 → HIGH; medium, normal, p2 → MEDIUM; low, minor, trivial, lowest, p3 → LOW; anything else → MEDIUM with a warning.

XML exports are not supported: export CSV from TestRail or Zephyr, or JSON from Qase.

Preview and report​

dryRun: true parses and validates the file and writes nothing. Both a preview and a real import return:

{
"format": "testrail", "total": 4, "toCreate": 3, "duplicates": 0, "invalid": 1,
"foldersToCreate": ["Login", "Login / Happy Path", "Account"],
"errors": [{ "row": 4, "message": "Title is missing" }],
"warnings": [],
"preview": [{ "title": "Valid login", "folderPath": ["Login", "Happy Path"], "steps": [] }],
"created": 3, "createdFolders": 3
}

created and createdFolders are present only on a real import.

Rules​

  • A case is a duplicate when the project already has a case with the same title in the same folder. duplicateStrategy: "skip" (default) leaves it out; "create" imports it again.
  • Folders are created top-down. An existing folder with the same parent and name is reused. A / in a folder name becomes -.
  • Cases get consecutive AG-TC-N numbers in file order, type MANUAL, and importSource { format, externalId, importedAt }.
  • A row without a title is reported with its row number and skipped; the rest of the file is imported.

Limits​

LimitValue
File size5 MB
Cases per import2 000
Steps per case200
Folder depth10
Title500 characters
Any other field10 000 characters
Tags per case20 (extra tags are dropped with a warning)
Error codeWhen
UNKNOWN_FORMATThe format could not be detected, or is not supported (XML)
INVALID_FILEThe file is not the chosen format, or a CSV quote is never closed
LIMIT_EXCEEDEDMore than 2 000 cases
NOTHING_TO_IMPORTNo row is a valid test case