Discord Username / User ID
interferon0
What does this improvement do?
There is no way to get a test's definition out of (or back into) TestSprite as a file, so test definitions cannot be version-controlled, reviewed in PRs, backed up, or migrated — the tests-as-code model that made Checkly and Terraform sticky. Add test export [--out ]: compose the existing GET /tests/{id} (metadata) + GET /tests/{id}/code into one deterministic .testsprite.json (stable key order, a schemaVersion, and the codeVersion recorded as provenance). Add test import : create (POST /tests) or update (PUT /tests/{id} + PUT .../code, honoring the existing codeVersion optimistic-concurrency guard) from that file. Note: this is DEFINITION export, distinct from the filed JUnit RESULTS export (#95) — different artifact, different purpose.
Details / implementation notes
Honest limitation disclosed up front: backend tests round-trip losslessly (metadata + Python code), but a frontend test's authored planSteps[] is write-only on the wire (PUT /tests/{id}/plan-steps exists; there is no GET, and GET /tests/{id} returns only planStepCount) — so FE export carries metadata + generated code with an explicit planUnavailable: true marker instead of silently dropping the plan. If that gap matters to reviewers, v1 can be scoped to backend tests. Reuses the existing create/update/code-put request shapes and idempotency-key minting; file writes honor the existing --out safety guards. No new dependency. Natural follow-up (separate issue): a declarative sync
reconcile. PR to follow once assigned.
Confirmations
Discord Username / User ID
interferon0
What does this improvement do?
There is no way to get a test's definition out of (or back into) TestSprite as a file, so test definitions cannot be version-controlled, reviewed in PRs, backed up, or migrated — the tests-as-code model that made Checkly and Terraform sticky. Add test export [--out ]: compose the existing GET /tests/{id} (metadata) + GET /tests/{id}/code into one deterministic .testsprite.json (stable key order, a schemaVersion, and the codeVersion recorded as provenance). Add test import : create (POST /tests) or update (PUT /tests/{id} + PUT .../code, honoring the existing codeVersion optimistic-concurrency guard) from that file. Note: this is DEFINITION export, distinct from the filed JUnit RESULTS export (#95) — different artifact, different purpose.
Details / implementation notes
Honest limitation disclosed up front: backend tests round-trip losslessly (metadata + Python code), but a frontend test's authored planSteps[] is write-only on the wire (PUT /tests/{id}/plan-steps exists; there is no GET, and GET /tests/{id} returns only planStepCount) — so FE export carries metadata + generated code with an explicit planUnavailable: true marker instead of silently dropping the plan. If that gap matters to reviewers, v1 can be scoped to backend tests. Reuses the existing create/update/code-put request shapes and idempotency-key minting; file writes honor the existing --out safety guards. No new dependency. Natural follow-up (separate issue): a declarative sync
reconcile. PR to follow once assigned.Confirmations