Documentation Index
Fetch the complete documentation index at: https://docs.roboticks.io/llms.txt
Use this file to discover all available pages before exploring further.
Pytest plugin
The Roboticks pytest plugin is the bridge between in-code@confirms decorators and the JUnit XML the platform ingests. It loads automatically via the pytest11 entry point and writes properties at three lifecycle points: session-start (schema version), per-test setup/teardown (active-test thread-local), and per-test report (decorator metadata + nodeid + attached artifacts).
You almost never touch this plugin directly. It loads on
pip install roboticks and does the right thing. This page is for the times you need to debug it or override its behaviour.How it loads
The plugin is declared as a pytest11 entry point in the SDK’spyproject.toml:
pip install roboticks runs, pytest discovers the entry point on next session-start. No conftest.py change required.
Verify it’s loaded:
What it does, in order
Properties emitted
Per session (suite-level):attach_artifact():
roboticks.attach.* on the testcase and posts each file to the platform’s per-test-case S3 prefix. See the full wire contract for property semantics and the artifact attachment API.
The kill switch
If the plugin breaks something — a pytest plugin conflict, a CI environment that can’t tolerate the entry-point loading order, an investigation where you want the bare JUnit — disable just the property-writing without uninstalling the SDK:roboticks.* property write. Decorators still work in-process (they still mutate function attributes); they just don’t surface in the XML.
The schema-version stamp is also dropped — so a downstream platform will treat the result as stock JUnit (the wire contract defines the “no schema version” fallback).
You can also disable the plugin entirely the normal pytest way:
user_properties
The plugin uses pytest’s standarduser_properties mechanism. Each roboticks.* property is a tuple (key, value) appended to request.node.user_properties during pytest_runtest_makereport. pytest’s built-in JUnit reporter writes them out as <property> elements automatically.
This means you can read them in your own conftest hook:
Schema version stamping
The plugin reads its own version fromroboticks.__version__ and the schema version from roboticks._version.SCHEMA_VERSION. These are independent integers — the SDK can ship 0.2.0, 0.3.0, 0.4.0 still emitting schema version 2, until a wire change bumps it.
To override the schema version at runtime (e.g. for testing a future-version platform):
Debugging the plugin
Show plugin events
Dry-run property emission
The plugin exposes a CLI to render what would be written without running pytest:Force-regenerate JUnit from a re-parse
If you already have a JUnit XML without the plugin’s stamps (because the plugin was disabled, or an old SDK), the stitcher utility back-fills:What the plugin does not do
- It does not modify pytest’s test selection.
@requires_simis metadata; the platform router uses it, not pytest itself. - It does not swallow assertion errors.
@deadlineraises anAssertionErrorsubclass; pytest reports it normally. - It does not auto-load the assertion helpers. Those import only when you import them.
- It does not require rclpy. The plugin runs on any pytest installation.
Next
Decorators
What the plugin is reading.
Wire contract
What the plugin is writing.
Modules
Where to find the plugin source.
CI recipes
How the plugin’s output gets to the platform.