.testcase Files
.testcase is TestDog's open case format: one file equals one test case (including its first script version, v1), stored as UTF-8 JSON. It powers import/export, team sharing and offline generation by coding agents.
Case detail: script versions & step table; Export produces a .testcase file
Import & export

Case list: Import Case / Batch Import in the toolbar
- Export: the Export button on the case detail exports the current version steps as a
.testcasefile. - Import: Import Case (single) and Batch Import (pick multiple files or a whole folder) in the case list toolbar; files are validated on import with clear error messages.
- Imported cases are identical to manually created ones — AI generation, recording and replay all work.
File structure
json
{
"format": "testcase",
"version": 1,
"title": "Case title (required)",
"description": "Optional case description",
"naturalLanguage": "Optional original natural-language response",
"steps": [],
"rawCode": ""
}Step (TestStep) essentials
Key fields per step:
| Field | Notes |
|---|---|
instruction | Natural-language sub-instruction. Strongly recommended — self-healing relies on it to re-locate elements when selectors break |
action | goto / click / fill / press / check / select / assert / wait etc. |
locator | {strategy, value, role?, name?, scope?}, prioritized by stability: testid → role → … |
assertion | Required for action=assert: visible / hidden / text / url / response_status / response_body / response_json / ws_sent / ws_received |
value | Input text, option value, wait milliseconds; supports {{var}} placeholders |
description | Human-facing step description |
Full field spec
For the complete enums, locator priority and execution semantics, see testcase-schema.md inside the skill package (download via "Testcase Skill" on the project list page).
Generating cases with coding agents
Two downloads on the project list page (see Projects):
- Testcase Skill: the
generate-testcaseskill (zip). Drop it into the target project's.claude/skills/and coding agents like Claude Code read the skill and schema, then produce.testcasefiles importable into TestDog — optionally smoke-tested with local Playwright to verify locators resolve. - Test-Friendly Rule: coding rules that add
data-testidmarkers and similar conventions to your codebase for stabler locators.
Recommended workflow
- Developers add testids as they code (or adopt the test-friendly rule).
- Coding agents batch-produce
.testcasefiles via the generate-testcase skill. - Import into TestDog via Batch Import, verify by replay, and promote into the regression suite.