Reusable specification fragments
Fragments are typed DSL building blocks that keep repeated request data and response expectations consistent across multiple specifications.
What you can do
- Store request targets, headers, bodies, variables, and attachment definitions.
- Store response header, body, XPath, data-path, and attachment assertions.
- Create protocol-aware drafts manually or with the preview-only AI assistant.
Starts with
- A reusable piece of request configuration or expected response behavior.
- The fragment type and protocol context that determine validation and autocomplete.
Produces
- A named fragment that can be assembled into one or more specifications.
- A single source of truth for behavior that would otherwise be copied between tests.
Use it when
- Use fragments when authentication headers, payload structures, common endpoints, or assertions repeat.
- Keep scenario-specific values in the specification or flow context instead of over-generalizing a fragment.
- fragments
- reusable DSL
- request fragment
- assertion fragment