Skip to content

Releases: tenzir/test

Project fixture inline dependencies

13 May 13:00
v1.10.1
19c0503

Choose a tag to compare

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.

By @mavam and @codex in #47.

Fixture-based test selection

12 May 16:43
8f8bee4

Choose a tag to compare

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.

By @mavam and @codex.

🔧 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 --help

By @mavam and @codex in #44.

Fixture tag test selection

11 May 19:37
v1.9.0
caaafbb

Choose a tag to compare

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-compose

Fixture 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.

By @mavam and @codex in #42.

Version checks with current TQL pipelines

09 May 09:51
v1.8.4
85ee38d

Choose a tag to compare

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.

By @mavam and @codex in #41.

Consistent hook debug diagnostics

05 May 10:03
v1.8.3
90d00c3

Choose a tag to compare

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.

By @mavam and @codex in #40.

Runner-independent suite requirements

29 Apr 16:54
v1.8.2
5778e56

Choose a tag to compare

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.

By @mavam and @codex in #39.

Suite fixture failure reporting

29 Apr 11:15
v1.8.1
972392c

Choose a tag to compare

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.

By @mavam and @codex in #38.

Project lifecycle hooks

28 Apr 17:16
v1.8.0
c28e4b5

Choose a tag to compare

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.

By @mavam and @codex in #36.

Per-test skips for unavailable fixtures

22 Apr 16:36
v1.7.7
f45d1f6

Choose a tag to compare

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-service

This 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.

By @mavam and @codex in #35.

Accurate aggregate pass and fail percentages

16 Apr 15:43
v1.7.6
f4b4cb8

Choose a tag to compare

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.

By @mavam and @codex.