Validation
Validation is the boundary between a readable file and an executable contract. This page explains what Relampo validation should be used for and what it does not guarantee.
Primary command
Validate YAML with:
relampo run test.yaml --validate
Use this after any meaningful manual edit and before execution in shared workflows.
What validation is for
Validation is intended to catch problems early, before runtime execution begins.
Typical goals include:
- detect YAML syntax issues
- reject structurally invalid files
- catch missing required sections
- stop obviously invalid combinations before execution
What validation should catch
At a minimum, validation should help detect:
- malformed YAML syntax
- broken indentation
- invalid structural hierarchy
- missing required blocks such as core scenario structure
- values that are clearly incompatible with the runtime contract
What validation does not guarantee
A file can validate structurally and still fail at runtime.
Validation does not automatically guarantee:
- the target system is reachable
- authentication succeeds
- correlation is complete
- extracted values will exist at runtime
- the business flow is logically correct
That means a valid file can still fail because of behavioral or environmental issues.
When the file validates but still fails
If the file passes validation but execution still fails, move to deeper troubleshooting:
- use
relampo debug - inspect responses and missing dynamic values
- review extractors and placeholders
- verify environment assumptions such as base URL, headers, credentials, and test data
Common authoring mistakes
The most common issues after manual edits are:
- broken indentation
- replacing dynamic placeholders with hard-coded values accidentally
- inconsistent variable naming
- request-level overrides that unintentionally conflict with defaults
- invalid assumptions about generated fields
Practical validation workflow
A reliable maintenance loop is:
- edit the YAML
- run
relampo run test.yaml --validate - fix structural issues
- run a controlled test or debug session
- commit only after the file is structurally sound
Recommended policy for teams
For shared maintained scripts:
- validate after every meaningful change
- do not merge modified YAML without at least one validation pass
- treat validation failures as blocking issues, not warnings
Relationship to the spec
The specification defines what a valid file shape looks like. Validation enforces that contract at the tooling level.
Use the Reference page to understand the intended structure, and use validation to confirm that your file still conforms to it.