Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions qase-python-commons/changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion qase-python-commons/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}]
Expand Down
4 changes: 2 additions & 2 deletions qase-python-commons/src/qase/commons/models/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions qase-python-commons/src/qase/commons/models/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions qase-python-commons/src/qase/commons/models/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down