Repository navigation
Releases
Releases · savex/tempest-parser
tempest-parser 3.0.0
Added
--xml-time-unit s|ms: the unit of XML test times, for files whose times are whole seconds (read as
milliseconds by the guess) or milliseconds with a decimal point.CLAUDE.mdwith the project layout and rules (changelog, checks before committing, test tags and
data, specs, packaging, versioning).-q, --quiet: print errors only.tests/data/trending/run_{1..4}.log: four made-up tempest console runs for trending reports (tests in
every run, tests missing from one run, tests new in runs 3 and 4), with a parser test.examples/: trending reports of those four runs (detailed and brief) and an errors report of run 4,
made withtparser.- Dependabot (
.github/dependabot.yml): weekly grouped updates for GitHub Actions anduv.lock. - The
logformat reads the stestr / subunit-trace console layout oftempest run
({0} tempest....test_x [1.5s] ... ok): statuses, times, skip reasons,Captured traceback:sections,
the-ffailure list,Totalsand thestestr --slowesttable. CI timestamp prefixes
(2026-01-01 10:00:00.123456 | host |) are removed from every line. Sample:tests/data/stestr.log. - An own CSV export imports every run, not only the first column: runs are dated from the header,
named after their files (-dexports) and the baseline column comes back as therequiredrun.
Options are split back from the test name, and messages keep their quotes and commas. --html-layout grid: the trending report laid out with CSS grid (every row a grid of one shared
column template; offscreen classes skipped withcontent-visibility, so 6000 tests open in a quarter
of a second): sticky header, class rows and name column, dark mode from the system, classes and times
hidden by CSS:has().tablestays the default. Example:examples/trending_report_grid.html.- Grid report: a colour scheme switch next to the title (small system / light / dark icons); the choice
is kept in the browser. --html-layout gridalso applies to the errors report (-e): each message is a collapsible
<details>group with its test count, tests and times, a filter and Expand all / Collapse
all; same colours and theme switch (sharedtemplates/grid_base.html). Example:
examples/errors_report_run_4_grid.html..gitignoreno longer ignorestempest_parser/templates/*.html: the wheel is built from the files
git tracks, so an ignored new template was left out.- Type annotations on the whole package, checked with
mypy --strict; the wheel shipspy.typed, so
code that importstempest_parsergets the types. - Trending report: test times under each status (the run's slowest in bold) and each class's total
time per run in the class rows; a Times box hides them. - Trending report: a filter bar to search class and test names and to show only tests that failed in
any run, failed in the last run, or changed status (inline script, no external files). -V, --version: prints the installed version.- CI runs the tests on Windows too (Python 3.11–3.15), so the "OS Independent" classifier is checked.
- Checks: ruff import order, bugbear and simplify rules (
I,B,SIM); mypy ontempest_parser
(uv run mypy, in the lint job); coverage of the smoke and functional tests together, failing CI
under 90% (pytest-cov,fail_underinpyproject.toml). -j, --json-file: a JSON summary of the runs (name, file, ISO date, counts per status, time) for CI
pipelines.--fail-on STATUS(repeatable): exit with code 3 when any run has a test with that status, after the
reports are written; the matching tests are logged.--run-name NAMEand--run-date DATE(ISO 8601, UTC unless an offset is given) name and date the run
of a single file or stdin instead of the file name and modification time.
Changed
- README: an Example reports section with screenshots (
examples/screenshots/) and links to view
each example report; PyPI upload is on from 3.0.0 (repository variablePYPI_PUBLISH). TestsManager.split_test_nameis one regular expression instead of a branch per name style
(tempest, plugins, cvp_checks, unittest2, setUpClass); every baseline test name splits as before.- Importers'
parse()methods all returnNone(the XML importer returnedTrue, the JSON and CSV
ones the number of tests); the HTML report base classes are merged into one_HTMLReport. setup.py: requires Python 3.10+, classifiers for 3.10–3.13,Apache-2.0license expression, project
URLs and a description that lists every input format; the emptydata_filesare gone.README.md: CI badges, a status note and a Project status table; links are absolute for PyPI.-ftakes only the known formats; an unknown value now exits with code 2 and the argparse usage message
(was 1).- Progress and summaries go through
logging(stdout,Error:/Warning:prefixes) instead ofprint;
thelogparser's debug dump of parsed objects is gone from the normal output. - CSV report is written with
csv.writer: fields are quoted as needed, so", commas and line breaks in
messages survive (they used to be replaced with'). The header always has a required/added column, so
it lines up with the rows. - Test lookup in
TestsManageruses an index per class instead of a linear scan; importing many large runs
of one class is about 10× faster. Result dicts are built directly instead of deep-copied from templates. - Python 2 leftovers removed (
sixdependency,__future__imports,utils/file.py). - GitHub Actions bumped by Dependabot:
actions/checkoutv7,actions/setup-pythonv7,
astral-sh/setup-uvv10.4.0,actions/upload-artifactv7 andactions/download-artifactv8 (an
artifact whose hash doesn't match now fails the release instead of a warning). - Requires Python 3.11+ (was 3.10+): Python 3.10 reached end of life in October 2026 and gets no more
security fixes. CI tests 3.11–3.15 and builds, bumps and releases on 3.15; classifiers list 3.11–3.15. - ruff checks pyupgrade rules (
UP) against Python 3.11: f-strings,super(),datetime.UTC. - Packaging moved from
setup.py,MANIFEST.inand the requirements files topyproject.toml(PEP 621
metadata, PEP 639 license, PEP 735 dependency groupstest,lint,release,dev). The version is
read from thev*git tag by setuptools-scm; untagged commits build asX.Y.Z.devN+g<sha>. scripts/version.shcompares tags withchangelog.mdonly;setupandsetare gone, and
check <tag>now needs achangelog.mdsection for the tag. Bump version no longer commits a
version into the source; Release compares the built package's version with the tag (PEP 440 form).- CI installs with uv from the new
uv.lock(uv sync --locked) instead of pip, and the lint job runs
actionlint. - Results are dataclasses (
manager/models.py:Result,Case,Execution,Summary) instead of
dicts;manager/structs.pyis gone. Times are stored as float seconds and run dates as UTC
datetimes; the reports format them. Reports (HTMLTrendingReport,HTMLErrorsReport,
ReportToFile) now take theTestsManagerinstead ofget_tests_list(), which is removed. const.pydefinesStatus,Column(report summary columns) andInputFormatenums instead of
numbered constants and label dicts.- Every run is dated by its file's modification time in UTC and shown as
dd/mm/YYYY HH:MM GMT.log
runs had noGMTand were ordered by the file's change time; therequiredcolumn used the baseline
list's change time. - Summaries are counted in one pass over the tests (
TestsManager.summarize(), report totals); the
logparser prints the summary of its own run only, not of every run imported so far. Unused helpers
(get_time_for_class,get_totals_as_string_for_class,is_test_has_errors) are removed and
is_class_has_errorsis nowclass_has_errors. - Trending report: result cells are built and escaped in the reporter instead of cell by cell in the
template, and reports are written to the file as they are rendered. For 10 runs × 3000 tests rendering
takes 0.33 s instead of 0.72 s (detailed) and 0.20 s instead of 0.48 s, the files are about 18% smaller
and the page is no longer held in memory. Traces in detailed reports are folded in<details>
elements and keep their line breaks (they ran together in one block). - The
logparser reads the log line by line with regular expressions instead of splitting it into
blank-line separated sections (parser_strings.pyandTestsManager.split_test_name_from_speedare
gone). It accepts any dotted class name (plugins), any upper-case status (ERROR),FAIL:/ERROR:
failure heads and logs without aRan N testsline. Failure messages keep their"and commas (they
were replaced with'and spaces), and traces no longer end with an extra blank line. - XML
timeattributes are read as seconds when any of them in the file has a decimal point, as jUnit
writes them; files with whole numbers only are still read as milliseconds (they were always divided
by 1000).
Fixed
- Test ids: dots inside the options (
test_x[id-1](1.5)) no longer cut the class name there;[]gives
no tags instead of one empty tag; a baretempestid no longer raisesIndexError; unittest2 ids
followraw_names(r_xml). k8s_slow_extract(raw XML from k8s): a "not to have occurred" failure no longer raisesTypeError
(the line was added as bytes); found by the type check.- Input files, piped text and the config file are read as UTF-8, and reports are written as UTF-8. With
a non-UTF-8 locale (Windows before Python 3.15, an ASCII locale) a non-ASCII test name or message
stopped the import withUnicodeDecodeError, or the report withUnicodeEncodeError. Console output
escapes characters the console can't show instead of failing. - A subunit run is named after its file (
<stdin>...
tempest-parser 0.3.0
Added
- GitHub workflows: Tests (lint, package and version checks, smoke and functional tests on
ubuntu/macOS with Python 3.10–3.13, integration against the built wheel), Version tracking,
Bump version and Release (GitHub release with changelog notes; optional PyPI upload behind the
PYPI_PUBLISHrepository variable). scripts/version.sh notes <version>prints a changelog section for release notes.scripts/version.sh: tag-based versioning helper (current, next and highest version, SemVer compare,
writessetup.pyand releases the changelog's Unreleased section), with tests. Tagv0.2.81back-filled
on the commit that was published to PyPI as 0.2.81.- Test suite in
tests/with one tag per test from its folder:smoke(thetparsercommand end to end),
functional(importers, log parser, test manager, reports, config) andintegration(the built wheel,
installed and run). Made-up sample inputs for every format intests/data/. pyproject.tomlwith pytest and ruff settings;scripts/check-test-tags.py.documents/with the CI plan (plan.md) and the specification (specs.md).
Changed
- A folder given without
-fdetects each file's format from its extension and skips unsupported files. - An unsupported
-fvalue stops the run with exit code 1. README.mdis the only README and the package's long description.
Fixed
- CSV input crashed (
status_filtersargument) and dropped the first test row. - Rally JSON and
.loginput crashed on Python 3. --omit-statushad no effect for.logand subunit input.- Subunit
erroranduxsuccessstatuses crashed the import; test times are now stored as"<seconds>s". -itogether with-rcrashed (baseline results had no message; run times of mixed types).- Tests first seen in a run lost their UUID and options, so the same test from two runs became two rows.
- Test tags were never stored.
- HTML reports escaped messages in the shared results: a second report double-escaped them and the CSV
report got HTML entities. - Double quotes in failure and skip messages broke the CSV report.
import cgiin the reporter, which fails on Python 3.13.
Pre v0.2.6
- updated Rally XML parsing
- support for raw XML parsing (K8s friendly)
- new test status filters
- support for new pytest schema
- error messages parsing
v0.2.4
RC for v0.2.4
New:
- Subunit support
- PIPE input support
- Errors presort now uses tempest.exceptions basis
Fixed:
Trending report generation
Test names parser for trending report
Support for plugin test names
v0.2.1
Now available in PyPI under TempestParser v0.2.1
Repackaged, fixed paths and related
Added -d, --detailed option to turn off Notes column. Default value can be configured in conf file
Multiple bug fixes.
v0.1
Comments:
- JSON (Rally) files parsing is ready and can be used in a jiffy.
- CSV parsing is good, but you must follow original format:
- no heading
- csv lines: XX,test,,,...
- CLI parsing is tricky, remove all config and other subunit 'env' stuff. Leave string starting as tempest....
- XML (PyCharm) parsing should work.