Releases: tenzir/test
Project fixture inline dependencies
Project fixtures can now declare their Python package dependencies inline with PEP 723 metadata. tenzir-test installs those dependencies before loading fixtures, so regular test runs and fixture mode work for projects with self-contained fixture modules.
🐞 Bug fixes
Project fixture inline dependencies
Project fixtures can now declare Python package dependencies inline with PEP 723 metadata:
# /// script
# dependencies = ["boto3"]
# ///tenzir-test installs these dependencies with uv before importing fixture modules, so fixtures used during regular test runs and tenzir-test --fixture can manage their own Python package requirements.
Fixture-based test selection
tenzir-test now lets users select scenarios by requested fixture name, making it easier to run only tests that depend on resources such as nodes or Docker Compose. This release also requires Python 3.13 or newer.
🚀 Features
Fixture name test selection
Select tests by requested fixture name with the new --fixture-name option:
tenzir-test --fixture-name node
tenzir-test tests/alerts --match kafka --fixture-name docker-compose--fixture-name can be repeated and combines with --fixture-tag using OR semantics before intersecting with positional test paths and --match. Fixture selectors are long-only; the previous -F alias for --fixture-tag has been removed before the CLI shape settles.
🔧 Changes
Python 3.13 minimum requirement
tenzir-test now requires Python 3.13 or newer.
Users on Python 3.12 need to upgrade their interpreter before installing or running the CLI:
uvx --python 3.13 tenzir-test --helpFixture tag test selection
This release lets users select tests by fixture tag with the new --fixture-tag option. It makes it easier to run focused subsets such as container-backed or Docker Compose tests without naming every test path.
🚀 Features
Fixture tag test selection
Select tests by fixture tag with the new --fixture-tag option:
tenzir-test --fixture-tag container
tenzir-test --fixture-tag docker-composeFixture tags are cumulative and can be repeated. The selector intersects with positional test paths and --match patterns, so you can narrow a directory to container-backed tests or run only tests that request the built-in Docker Compose fixture.
Fixtures that use the shared container runtime helpers inherit the container tag automatically. Custom fixtures can pass explicit tags at registration time when they use their own abstraction.
Version checks with current TQL pipelines
The test harness now detects the installed Tenzir version across current and upcoming Tenzir releases. This keeps startup and version checks working during the transition to the next Tenzir release series.
🐞 Bug fixes
Version checks with current TQL pipelines
The test harness can detect the installed Tenzir version across current and upcoming Tenzir releases. This keeps startup/version checks working during the transition to the next Tenzir release series.
Consistent hook debug diagnostics
This release makes hook debug diagnostics consistent with the rest of the harness debug trace, so users get uniform output when diagnosing hook behavior.
🐞 Bug fixes
Consistent hook debug diagnostics
Hook diagnostics emitted with --debug now use the same formatting as the rest of the harness debug trace. Previously, hook invocation messages used ad-hoc debug: lines, which made debug output inconsistent.
Runner-independent suite requirements
This release fixes suite-level requirement checks so they apply consistently across every test runner. Mixed TQL, shell, Python, and custom test suites now evaluate required Tenzir operators independently of runner order.
🐞 Bug fixes
Runner-independent suite requirements
Suite-level requires.operators checks now apply consistently to every test runner. Mixed suites that combine TQL, shell, Python, or custom tests no longer depend on the first runner type to decide whether required Tenzir operators are available.
Suite fixture failure reporting
This release improves suite fixture failure handling so setup and teardown errors are reported as regular test failures. The harness now continues running independent queued tests instead of aborting with a Python traceback.
🐞 Bug fixes
Suite fixture failure reporting
Suite-scoped fixture setup and teardown failures now appear as regular test failures instead of aborting the entire run with a Python traceback.
This lets the harness continue with independent queued tests after a fixture assertion or cleanup error.
Project lifecycle hooks
This release adds project lifecycle hooks that let projects prepare their environment before tests run. Use hooks to select local Tenzir binaries, configure project-scoped environment variables, and collect diagnostics without custom wrapper scripts.
🚀 Features
Project lifecycle hooks
Projects can now register Python hooks that run at stable tenzir-test lifecycle points, including before settings discovery:
from tenzir_test import hooks
@hooks.startup
def use_local_build(ctx):
ctx.path.insert(0, str(ctx.root / "build" / "bin"))
ctx.env["TENZIR_BINARY"] = str(ctx.root / "build" / "bin" / "tenzir")
ctx.env["TENZIR_NODE_BINARY"] = str(ctx.root / "build" / "bin" / "tenzir-node")This makes it possible to select local Tenzir binaries, prepare project-scoped environment variables, and collect diagnostics for failed tests without wrapping the test command in custom shell scripts. Use --no-hooks or TENZIR_TEST_DISABLE_HOOKS=1 to bypass hooks when debugging.
Per-test skips for unavailable fixtures
Tests can now skip only the cases that require an unavailable optional fixture instead of skipping an entire suite. This keeps unrelated tests running and makes parameterized fixture setups more reliable.
🐞 Bug fixes
Per-test fixture-unavailable skips
The test harness now honors skip: {on: fixture-unavailable} for fixtures that are selected by individual tests:
skip:
on: fixture-unavailable
fixtures:
- optional-serviceThis lets parameterized per-test fixtures skip only the tests that need the unavailable service. Suite fixtures still require the opt-in in directory-level test.yaml, so one test's frontmatter cannot control the whole suite.
Accurate aggregate pass and fail percentages
This release fixes misleading aggregate test summary percentages in the CLI. Runs with a small number of failures now report non-perfect pass and fail rates, so mixed outcomes no longer appear as 100% passed and 0% failed.
🐞 Bug fixes
Accurate aggregate pass and fail percentages
The final aggregate summary now reports non-perfect pass and fail percentages whenever at least one executed test fails. Previously, rounding could show 100% passed and 0% failed for runs with a small number of failures, even though the overall result was not a full success.
For example, a run like 586 passed / 1 failed / 152 skipped now renders the executed-test percentages as 99% passed and 1% failed. This makes mixed outcomes easier to spot at a glance in the CLI output.