Skip to main content

parse_scenario_document

Function parse_scenario_document 

Source
pub fn parse_scenario_document(
    path: &Path,
) -> Result<ScenarioDocument, DocError>
Expand description

Parses and validates a scenario document. Validation order: (a) the path carries a reserved test-document suffix; (b) the text deserializes; (c) a non-empty scenario: section exists; (d) no unit-tier section coexists with it; (e) exactly one route source is declared; (f) each action converts (single-key dispatch, deadlines, durations, endpoint provisioning, expectation grammar) with action-index errors; (g) each partners entry converts (script grammar, response status range) with entry-key errors; (h) no env key collides with a declared bindVar; (i) each partner validate target URI equals a harness endpoint reference declared by the scenario’s own send/receive actions.