release 0.3 preparation

- version 0.3 (the pytest item release)
- release note: 0.3 entry (user-facing)
- regenerated user manual (0.3 stamp + pytest item section)
- DESIGN: "Graceful item load" section

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-14 23:21:34 +02:00
parent 1c598a1eae
commit f579599f1d
4 changed files with 20 additions and 1 deletions

View File

@@ -212,6 +212,10 @@ Unlike `unittest` (which runs in-process), pytest runs in a **subprocess on the
- `load()` runs `pytest --collect-only` once to build the child tree; `execute()` runs the enabled node-ids once and maps results back by node-id.
- pytest is invoked with `--capture=no` (so plugin sentinels + test prints reach our pipe), `-o addopts=` (neutralise user addopts — xdist/cov would break the per-test hook parsing), `-p no:cacheprovider`. `stop_on_failure``-x`; disabled children → NORUN without running.
- Params: `test_file` (required), `test_method` (optional list of function names, matched against the node-id function segment with the parametrisation suffix stripped). Registered as `cst.TYPE_PYTEST` / `TYPE_PYTEST_STEP`, loaded via the same self-loading branch as `unittest` in `test_set.load_test_recursively`.
- `load()` raises on a collection problem (pytest not installed → a dedicated "pip install pytest" message; bad file / unknown `test_method`). That raise is handled by the **Graceful item load** path below — a warning at load and a clean FAIL at run, never a crash.
### Graceful item load
A self-loading item whose `load()` fails (a `unittest` test file importing a missing module, `pytest` not installed on the host, …) must not abort the **whole** test load. `TestSet._load_item()` wraps the `load()` call: on any exception it emits `tm.print_warn(...)` and stores the reason in `item._load_error` instead of propagating. The `@test_run` wrapper (`test_item.py`) turns a non-None `_load_error` into a clean run-time `FAILURE` (the message is printed once by `write_footer`), so the rest of the campaign still loads and runs. Scoped to the self-loading, module-loading items (`unittest`, `pytest`); structural action loading (`console`/`plot`/`json_rpc`) stays fail-fast at load.
### Report exporters & plugins
`src/testium/interpreter/test_report/test_report.py``_EXPORTER_REGISTRY` dict maps a format name (cmd key in the YAML `report.export`) to a lazy loader. Built-ins: `text`, `json`, `junit` (needs `junit_xml`), `html` (needs `lxml`). `sqlite` is the storage layer, no-op as an export.

Binary file not shown.

View File

@@ -1,3 +1,18 @@
version 0.3
==============
- New ``pytest`` test item: run your pytest files as a test step; each
test shows up with its own PASS / FAIL / SKIP. Requires pytest to be
installed (``pip install pytest``).
- console ``read_until`` can now wait for several possible texts at once
(it matches the first one seen), and a ``regex: true`` option lets you
match with a regular expression.
- Serial console: a clear message when the device is missing, and serial
ports now work in the Flatpak version.
- If a test file cannot be loaded (for example pytest is not installed),
only that step fails — the rest of the tests still run.
- Fix: a variable (``$(...)``) used in a console ``telnet_port`` is now
correctly substituted.
version 0.2.3
=============
- Windows version now working reliably. Fix of a problem of jrpc ports

View File

@@ -1 +1 @@
0.2.4
0.3