Run a version's tests
run_version_testsPrice every test in a version's tests[] against that version's stored model and compare each with its expected output. Takes version_reference (any status but archived — a draft after patch_version, or a live version for a baseline). Runs against the stored model, so a patch saved a moment ago is included. A test passes when its result is within 0.005 of the expected result and its valid flag equals the expected valid. Expectations are read from output { result, valid }, or, when output has neither (tests imported from the hosted service), from result { result, valid }; expected_from says which. A test with neither is priced but unchecked (passed: null). Returns { project_reference, version_reference, version, status, updated_at, total, passed, failed, unchecked, results: [{ id, name, passed, expected: { result, valid }, expected_from, actual: { result, valid }, problems, errors }], version_url, next_steps } — problems says why a test failed, errors is up to 5 of the engine's step errors for that run. Nothing is persisted. Use after patch_version, after adding or changing tests, or before a change to record the baseline. To change a test's expected output, patch_version on /tests//output/result (drafts only) — output takes precedence over result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| version_reference | Yes | UUID of the version whose tests to run — e.g. get_project's latest_draft.version_reference, or the version_reference patch_version returned. |