Includes
An include is a reusable markdown fragment, pulled into a spec (or another include) with the {% include %} tag. This page covers creating and managing includes; for the tag syntax itself (referencing an include, passing parameters), see Writing a Spec.
| Standalone | Connected | |
|---|---|---|
| Where they live | Includes tab, managed in-app | _includes/ folder nested under your specs folder |
| Create | "New Include" button, in-app editor | Add a .md file under _includes/ |
| Folder nesting | One level only | Any depth |
| Rename/move | Not supported — path is permanent | Rename/move the file, like any repo file |
| History | Version History dialog | Your repo's own git history |
Standalone
Creating an include
Click New Include. The form has:
- Filename (required) — slugified on save, e.g.
"My Test Steps"→my-test-steps.md. - Description (optional, up to 255 characters) — a short blurb of what the include is for. Shown in the Includes list and in the Insert Include picker (below), so an author can judge whether to use it before inserting it. Unlike Filename, it can be changed any time.
- Folder (optional, a single level) — also slugified.
- Content — plain markdown, no front matter needed. Same editor and toolbar as a spec (formatting, To-Do, Insert Include picker).
An include's filename and folder are permanent once created — there's no rename or move action, because that exact [folder/]filename.md path is what every {% include %} tag referencing it points to. Pick a clear name before you save; if it needs to change later, create a new include with the right name and update whatever referenced the old one.
Referencing an include
Rather than typing the {% include %} tag by hand, use the editor toolbar's Insert Include picker — pick from a dropdown (each entry shows its description, if set) and the correctly-formed tag is inserted at the caret.
Outside the editor, use the Includes table's Copy row action to copy an include's exact {% include ... %} reference to your clipboard.
The Includes list
The Includes tab (alongside Specs, for Standalone spaces) lists every include: Source, Version, Updated (relative time, plus who last changed it), and Copy / History / Delete actions. It's flat rather than folder-tabbed like Specs — but it's sortable by Source, and since a folder-prefixed include's Source starts with that folder name, sorting by Source clusters them together.
Clicking an include's name opens it straight into the editor — unlike a spec, there's no read-only preview view for an include yet.
Editing and version history
Content and Description can be edited any time; Filename and Folder can't (see above). Saving supports an optional Edit message. Click History on an include row to open its Version History dialog — every save creates an entry, and any past version can be restored with one click.
Connected
Includes live in a folder literally named _includes, nested under your project's configured specs folder (specs/_includes/ by default — see Spaces for the specs-folder setting). Unlike Standalone, subfolders under _includes can go as deep as you like.
Add, edit, rename, or move an include the same way as any other file in your repo — commit and push, and Testspace picks it up automatically. Reference it from a spec with the same {% include %} tag syntax covered in Writing a Spec, using the path relative to _includes/.
There's no in-app editor, Insert Include picker, or Version History dialog for Connected includes — your repo and its history are the source of truth.