You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DOCUMENTATION.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,11 +181,11 @@ testsprite test get test_xxxxxxxx --dry-run --output json
181
181
182
182
#### `testsprite test code get <test-id>`
183
183
184
-
Print the generated test source. With `--out <path>`, write it to a file instead of stdout (text mode writes the source body; JSON mode writes the wire envelope).
184
+
Print the generated test source. TestSprite test code is **Python**: frontend tests are Playwright (`playwright.async_api`, async), backend tests use `requests` with `pytest`-style assertions. With `--out <path>`, write it to a file instead of stdout (text mode writes the source body; JSON mode writes the wire envelope).
185
185
186
186
```bash
187
187
testsprite test code get test_xxxxxxxx
188
-
testsprite test code get test_xxxxxxxx --out ./test_xxxxxxxx.spec.ts
188
+
testsprite test code get test_xxxxxxxx --out ./test_xxxxxxxx.py
189
189
testsprite test code get test_xxxxxxxx --dry-run --output json
Replace the generated test code with a new file. The CLI uses an etag (`codeVersion`) for optimistic-concurrency control: it auto-fetches the current version, or pass `--expected-version` to pin one, or `--force` to skip the guard.
304
+
Replace the generated test code with a new file. **The replacement must be Python** — the execution engine runs the stored code with Python `exec()` (frontend: Playwright `playwright.async_api`; backend: `requests` + assertions), so a TypeScript/JavaScript file would fail at run time with a `SyntaxError`. The CLI uses an etag (`codeVersion`) for optimistic-concurrency control: it auto-fetches the current version, or pass `--expected-version` to pin one, or `--force` to skip the guard.
305
305
306
306
```bash
307
-
testsprite test code put test_xxxxxxxx --code-file ./test.spec.ts
308
-
testsprite test code put test_xxxxxxxx --code-file ./test.spec.ts --expected-version v3
309
-
testsprite test code put test_xxxxxxxx --code-file ./test.spec.ts --dry-run --output json
307
+
testsprite test code put test_xxxxxxxx --code-file ./test.py
308
+
testsprite test code put test_xxxxxxxx --code-file ./test.py --expected-version v3
309
+
testsprite test code put test_xxxxxxxx --code-file ./test.py --dry-run --output json
0 commit comments