Documentation
¶
Overview ¶
Package parser loads and normalizes test manifests from YAML sources.
The parser handles three syntax levels — full, compact, and one-liner — and normalizes all of them into the canonical TestFile structure.
Parser is a pure transformation layer: it does not execute tests, resolve templates, or validate plugin fields. Its sole job is producing valid manifest structures from raw bytes.
Responsibilities ¶
- Read files/directories and load YAML documents
- Split multi-document YAML files
- Detect and expand compact syntax ("POST /users": {...})
- Detect and expand one-liner syntax ("GET /users -> 200")
- Populate manifest.TestCase.Extra with plugin-specific fields
- Report parse errors with line numbers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct{}
Parser loads and normalizes test manifests. A Parser is stateless and safe for concurrent use.
func (*Parser) ParseBytes ¶
ParseBytes parses raw YAML bytes into one or more TestFiles. Multi-document YAML is split before parsing.
func (*Parser) ParsePaths ¶
ParsePaths loads test files from one or more file or directory paths. Directories are walked recursively for .yaml and .yml files.