From 69b96748a835b90c01061fde0287bb03150db913 Mon Sep 17 00:00:00 2001 From: Dmitrii Gridnev Date: Mon, 8 Sep 2025 22:42:14 +0300 Subject: [PATCH] feat: release version 3.5.5 with improved status handling - Updated version to 3.5.5 in pyproject.toml. - Introduced `invalid` status to better differentiate between assertion and non-assertion errors. - Enhanced `Execution` and `StepExecution` models to support the new `invalid` status. - Updated `RunStats` to track counts of `invalid` status. - Improved documentation to reflect changes in status filtering and reporting. This release enhances test result accuracy across all reporters. --- qase-python-commons/changelog.md | 20 +++++++++++++++++++ qase-python-commons/pyproject.toml | 2 +- .../src/qase/commons/models/result.py | 4 ++-- .../src/qase/commons/models/run.py | 3 +++ .../src/qase/commons/models/step.py | 4 ++-- 5 files changed, 28 insertions(+), 5 deletions(-) diff --git a/qase-python-commons/changelog.md b/qase-python-commons/changelog.md index 6137ca70..352a7c6d 100644 --- a/qase-python-commons/changelog.md +++ b/qase-python-commons/changelog.md @@ -1,3 +1,23 @@ +# qase-python-commons@3.5.5 + +## What's new + +- Improved test failure status handling across all reporters +- Added support for `invalid` status to distinguish non-assertion errors from assertion failures +- Updated `Execution` and `StepExecution` models to support `invalid` status +- Updated `RunStats` to track `invalid` status count +- Enhanced status filtering documentation to include `invalid` status +- Assertion errors (AssertionError) now map to `failed` status +- Non-assertion errors (setup failures, exceptions, etc.) now map to `invalid` status + +## Migration Guide + +The new `invalid` status provides better distinction between: +- `failed`: Test failed due to assertion error (test logic issue) +- `invalid`: Test failed due to non-assertion error (infrastructure/setup issue) + +This change affects all reporters (pytest, tavern, behave, robotframework) and provides more accurate test result reporting. + # qase-python-commons@3.5.4 ## What's new diff --git a/qase-python-commons/pyproject.toml b/qase-python-commons/pyproject.toml index 6d2bc310..fad6ba65 100644 --- a/qase-python-commons/pyproject.toml +++ b/qase-python-commons/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "qase-python-commons" -version = "3.5.4" +version = "3.5.5" description = "A library for Qase TestOps and Qase Report" readme = "README.md" authors = [{name = "Qase Team", email = "support@qase.io"}] diff --git a/qase-python-commons/src/qase/commons/models/result.py b/qase-python-commons/src/qase/commons/models/result.py index 5381af85..12e343af 100644 --- a/qase-python-commons/src/qase/commons/models/result.py +++ b/qase-python-commons/src/qase/commons/models/result.py @@ -33,10 +33,10 @@ def __init__(self, self.thread = thread def set_status(self, status: Optional[str]): - if status in ['passed', 'failed', 'skipped', 'untested']: + if status in ['passed', 'failed', 'skipped', 'untested', 'invalid']: self.status = status else: - raise ValueError('Step status must be one of: passed, failed, skipped, untested') + raise ValueError('Step status must be one of: passed, failed, skipped, untested, invalid') def get_status(self): return self.status diff --git a/qase-python-commons/src/qase/commons/models/run.py b/qase-python-commons/src/qase/commons/models/run.py index 6f05e029..e670999e 100644 --- a/qase-python-commons/src/qase/commons/models/run.py +++ b/qase-python-commons/src/qase/commons/models/run.py @@ -24,6 +24,7 @@ def __init__(self) -> None: self.failed = 0 self.skipped = 0 self.broken = 0 + self.invalid = 0 self.muted = 0 self.total = 0 @@ -37,6 +38,8 @@ def track(self, result: dict): self.skipped += 1 elif status == "broken": self.broken += 1 + elif status == "invalid": + self.invalid += 1 self.total += 1 if result.get('muted', False): self.muted += 1 diff --git a/qase-python-commons/src/qase/commons/models/step.py b/qase-python-commons/src/qase/commons/models/step.py index fc96f35a..07e59034 100644 --- a/qase-python-commons/src/qase/commons/models/step.py +++ b/qase-python-commons/src/qase/commons/models/step.py @@ -82,10 +82,10 @@ def __init__(self, status: Optional[str] = 'untested', end_time: int = 0, durati self.attachments = [] def set_status(self, status: Optional[str]): - if status in ['passed', 'failed', 'skipped', 'blocked', 'untested']: + if status in ['passed', 'failed', 'skipped', 'blocked', 'untested', 'invalid']: self.status = status else: - raise ValueError('Step status must be one of: passed, failed, skipped, blocked, untested') + raise ValueError('Step status must be one of: passed, failed, skipped, blocked, untested, invalid') def complete(self): self.end_time = time.time()