François 8ab53f470d lsp: declarative action registry + cross-channel language server
Make `testium lsp` (and the testium_assist editor extension that spawns it)
work from every distribution channel: source, wheel, PyInstaller, Flatpak,
AppImage.

Two enablers:

1. Declarative ACTIONS registry. The TestItemActions parents (console, plot,
   json_rpc) now declare their nested actions as a class attribute
   `ACTIONS = {yaml_key: class}`, mirroring PARAMS. The base __init__ seeds
   action_classes from type(self).ACTIONS; register_actions() is kept only as
   an imperative escape hatch. lsp/schema.py reads ACTIONS directly, dropping
   the inspect.getsource/AST walk that returned no actions in a frozen
   PyInstaller build (no .py source on disk).

2. pygls bundled per channel. Kept as the pyproject [lsp] extra (lean
   `pip install testium`), layered into each full-app channel:
   - build_env.sh installs pygls into test/tmp/.venv (source run + PyInstaller
     build env)
   - AppImage installs the wheel as `…whl[lsp]`
   - Flatpak adds a python3-lsp network-pip module (matches the manifest's
     global --share=network)
   - PyInstaller .spec collect_submodules(pygls/lsprotocol) + hiddenimports for
     the lazily-imported lsp/lsp.server/lsp.schema

test/validation/lsp_smoke.py (run by run.sh before the suite) enforces both
per channel: `<channel> schema` must keep console/plot/json_rpc actions and
`<channel> lsp` must answer an initialize request without reporting pygls
missing. Verified for source mode; the other channels need a rebuild to verify.

DESIGN.md updated (declarative section + new "Language server across channels"
subsection + Recent fixes).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-29 23:17:59 +02:00
2026-05-01 07:58:22 +02:00
2026-01-02 11:55:52 +01:00
2026-01-02 11:55:52 +01:00
2025-12-29 10:46:05 +01:00

testium

testium is a YAML-driven test sequencer for hardware-in-the-loop and integration testing. A test campaign is described in a .tum file as a tree of items (checks, console interactions, Python/Lua functions, parallel blocks, dialogs, …); testium executes the tree, captures results, and produces reports in several formats.

Documentation

Pre-built releases

Pre-built artifacts are published at https://git.beafrancois.fr/v-and-v/testium/releases:

  • Python wheel (testium-<version>-py3-none-any.whl) — install with pip install testium-*.whl. Lighter than the binary; pulls Python dependencies from PyPI on install.

  • Self-contained Linux binary (testium, built with PyInstaller) — runnable directly, no Python installation required on the host. Lua support still needs a system lua interpreter and the lua-socket / lua-cjson modules.

  • Flatpak bundle (testium.flatpak) — install with:

    # Add Flathub (once, to fetch the KDE/PySide runtimes)
    flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
    
    # Install the bundle
    flatpak install --user testium.flatpak
    

    After installation testium appears in the desktop application menu and the testium command is available in the terminal (requires ~/.local/bin in PATH, which most modern distributions provide by default).

Quick start

From a checkout of the repository:

OS Command
Linux ./run.sh
Windows (cmd) run.bat
Windows (PowerShell) run.ps1

The wrapper creates a Python virtual environment on first run and starts testium in GUI mode. Add -b path/to/test.tum to run a test in batch mode.

Manual installation

If the wrapper script does not fit your environment, set up testium manually:

python3 -m venv .venv
source .venv/bin/activate
pip install -r src/requirements.txt

Required Python packages (see src/requirements.txt): pyside6, pyserial, pyyaml, pexpect, gitpython, jinja2, colorama, matplotlib, junit-xml, lxml.

For tests using lua_func items, install Lua (>= 5.1) plus the socket and cjson modules. On Debian/Ubuntu:

sudo apt install lua5.4 lua-socket lua-cjson

Run testium:

python3 src/testium               # GUI
python3 src/testium -b mytest.tum # batch

Troubleshooting

wl_proxy_marshal_flags symbol error

testium: symbol lookup error: ... undefined symbol: wl_proxy_marshal_flags

Force the X11 Qt backend:

export QT_QPA_PLATFORM=xcb
testium

xcb plugin missing

qt.qpa.plugin: Could not load the Qt platform plugin "xcb"

Install the missing system libraries:

sudo apt install libxcb-cursor0 libicu-dev libxcb-cursor-dev

License

Copyright © 2025-2026 François Dausseur.

testium is distributed under the European Union Public Licence v. 1.2 (EUPL-1.2) — see LICENSE for the full text. SPDX: EUPL-1.2.

Contributions are accepted under the same licence (inbound = outbound). See CONTRIBUTING.md for development setup, debugging workflow, and the release procedure.

2026-06-01 23:48:56 +02:00
Languages
Python 97%
Shell 1.7%
Lua 0.6%
Batchfile 0.5%
PowerShell 0.2%