From dc1475a6df30913336d2d6b9333740df308c8c96 Mon Sep 17 00:00:00 2001 From: Dmitrii Gridnev Date: Thu, 25 Sep 2025 21:43:24 +0300 Subject: [PATCH] feat: release version updates with status mapping support - Updated version to 2.0.1 in pyproject.toml for qase-behave, qase-pytest, qase-robotframework, and qase-tavern. - Added support for status mapping across all components, allowing transformation of test result statuses based on configuration. - Updated changelogs to reflect the new version and changes. - Enhanced documentation to include details about status mapping functionality. This release improves test result handling and provides better integration with various testing frameworks. --- qase-behave/changelog.md | 6 ++++++ qase-behave/docs/CONFIGURATION.md | 1 + qase-behave/pyproject.toml | 4 ++-- qase-behave/src/qase/behave/formatter.py | 12 ++++++++++++ qase-pytest/changelog.md | 6 ++++++ qase-pytest/docs/CONFIGURATION.md | 1 + qase-pytest/pyproject.toml | 4 ++-- qase-pytest/src/qase/pytest/conftest.py | 12 ++++++++++++ qase-pytest/src/qase/pytest/options.py | 8 ++++++++ qase-robotframework/changelog.md | 6 ++++++ qase-robotframework/pyproject.toml | 4 ++-- qase-tavern/changelog.md | 7 +++++++ qase-tavern/docs/CONFIGURATION.md | 1 + qase-tavern/pyproject.toml | 4 ++-- qase-tavern/src/qase/tavern/conftest.py | 12 ++++++++++++ qase-tavern/src/qase/tavern/options.py | 8 ++++++++ 16 files changed, 88 insertions(+), 8 deletions(-) diff --git a/qase-behave/changelog.md b/qase-behave/changelog.md index 7bbb4f62..2571281d 100644 --- a/qase-behave/changelog.md +++ b/qase-behave/changelog.md @@ -1,3 +1,9 @@ +# qase-behave 2.0.1 + +## What's new + +- Added support for status mapping. More information about status mapping can be found in the [docs](../qase-python-commons/docs/STATUS_MAPPING.md). + # qase-behave 2.0.0 ## What's new diff --git a/qase-behave/docs/CONFIGURATION.md b/qase-behave/docs/CONFIGURATION.md index b3644475..3d48ac2d 100644 --- a/qase-behave/docs/CONFIGURATION.md +++ b/qase-behave/docs/CONFIGURATION.md @@ -38,6 +38,7 @@ and command line options override both other values. | Test run configurations | `testops.configurations.values` | `QASE_TESTOPS_CONFIGURATIONS_VALUES` | `qase-testops-configurations-values` | None, don't add any configurations | No | Format: "group1=value1,group2=value2" | | Create configurations if not exists | `testops.configurations.createIfNotExists` | `QASE_TESTOPS_CONFIGURATIONS_CREATE_IF_NOT_EXISTS` | `qase-testops-configurations-create-if-not-exists` | `False`, don't create configurations | No | `True`, `False` | | Filter results by status | `testops.statusFilter` | `QASE_TESTOPS_STATUS_FILTER` | `qase-testops-status-filter` | None, don't filter any results | No | Comma-separated list of statuses | +| Map test result statuses | `statusMapping` | `STATUS_MAPPING` | `qase-status-mapping` | None, don't map any statuses | No | Format: 'source1=target1,source2=target2' | | **Qase Report mode configuration** | | Local path to store report | `report.connection.path` | `QASE_REPORT_CONNECTION_PATH` | `qase-report-connection-path` | `./build/qase-report` | No | Any string | | Report format | `report.connection.format` | `QASE_REPORT_CONNECTION_FORMAT` | `qase-report-connection-format` | `json` | No | `json`, `jsonp` | diff --git a/qase-behave/pyproject.toml b/qase-behave/pyproject.toml index 8ba259c7..4c1d43ce 100644 --- a/qase-behave/pyproject.toml +++ b/qase-behave/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "qase-behave" -version = "2.0.0" +version = "2.0.1" description = "Qase Behave Plugin for Qase TestOps and Qase Report" readme = "README.md" keywords = ["qase", "behave", "plugin", "testops", "report", "qase reporting", "test observability"] @@ -28,7 +28,7 @@ classifiers = [ ] requires-python = ">=3.9" dependencies = [ - "qase-python-commons~=4.0.0", + "qase-python-commons~=4.0.1", "behave>=1.2.6", "more_itertools", ] diff --git a/qase-behave/src/qase/behave/formatter.py b/qase-behave/src/qase/behave/formatter.py index ff6af49b..b38c1833 100644 --- a/qase-behave/src/qase/behave/formatter.py +++ b/qase-behave/src/qase/behave/formatter.py @@ -176,6 +176,18 @@ def __parse_config(userdata) -> ConfigManager: cfg_mgr.config.testops.set_status_filter( [status.strip() for status in userdata['qase-testops-status-filter'].split(',')]) + if 'qase-status-mapping' in userdata: + # Parse status mapping from userdata + # Format: "source1=target1,source2=target2" + mapping_dict = {} + pairs = userdata['qase-status-mapping'].split(',') + for pair in pairs: + pair = pair.strip() + if pair and '=' in pair: + source_status, target_status = pair.split('=', 1) + mapping_dict[source_status.strip()] = target_status.strip() + cfg_mgr.config.set_status_mapping(mapping_dict) + if 'qase-report-driver' in userdata: cfg_mgr.config.report.set_driver(userdata['qase-report-driver']) diff --git a/qase-pytest/changelog.md b/qase-pytest/changelog.md index fa562d42..5455b329 100644 --- a/qase-pytest/changelog.md +++ b/qase-pytest/changelog.md @@ -1,3 +1,9 @@ +# qase-pytest 7.0.2 + +## What's new + +- Added support for status mapping. More information about status mapping can be found in the [docs](../qase-python-commons/docs/STATUS_MAPPING.md). + # qase-pytest 7.0.1 ## What's new diff --git a/qase-pytest/docs/CONFIGURATION.md b/qase-pytest/docs/CONFIGURATION.md index af7c62df..d4da1b99 100644 --- a/qase-pytest/docs/CONFIGURATION.md +++ b/qase-pytest/docs/CONFIGURATION.md @@ -38,6 +38,7 @@ and command line options override both other values. | Test run configurations | `testops.configurations.values` | `QASE_TESTOPS_CONFIGURATIONS_VALUES` | `--qase-testops-configurations-values` | None, don't add any configurations | No | Format: "group1=value1,group2=value2" | | Create configurations if not exists | `testops.configurations.createIfNotExists` | `QASE_TESTOPS_CONFIGURATIONS_CREATE_IF_NOT_EXISTS` | `--qase-testops-configurations-create-if-not-exists` | `False`, don't create configurations | No | `True`, `False` | | Filter results by status | `testops.statusFilter` | `QASE_TESTOPS_STATUS_FILTER` | `--qase-testops-status-filter` | None, don't filter any results | No | Comma-separated list of statuses | +| Map test result statuses | `statusMapping` | `STATUS_MAPPING` | `--qase-status-mapping` | None, don't map any statuses | No | Format: 'source1=target1,source2=target2' | | **Qase Report mode configuration** | | Local path to store report | `report.connection.path` | `QASE_REPORT_CONNECTION_PATH` | `--qase-report-connection-path` | `./build/qase-report` | No | Any string | | Report format | `report.connection.format` | `QASE_REPORT_CONNECTION_FORMAT` | `--qase-report-connection-format` | `json` | No | `json`, `jsonp` | diff --git a/qase-pytest/pyproject.toml b/qase-pytest/pyproject.toml index cc3a09ff..809ea5a7 100644 --- a/qase-pytest/pyproject.toml +++ b/qase-pytest/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "qase-pytest" -version = "7.0.1" +version = "7.0.2" description = "Qase Pytest Plugin for Qase TestOps and Qase Report" readme = "README.md" keywords = ["qase", "pytest", "plugin", "testops", "report", "qase reporting", "test observability"] @@ -28,7 +28,7 @@ classifiers = [ ] requires-python = ">=3.9" dependencies = [ - "qase-python-commons~=4.0.0", + "qase-python-commons~=4.0.1", "pytest>=7.4.4", "filelock~=3.12.2", "more_itertools", diff --git a/qase-pytest/src/qase/pytest/conftest.py b/qase-pytest/src/qase/pytest/conftest.py index 34570d3a..a00f1146 100644 --- a/qase-pytest/src/qase/pytest/conftest.py +++ b/qase-pytest/src/qase/pytest/conftest.py @@ -190,6 +190,18 @@ def setup_config_manager(config): config_manager.config.testops.set_status_filter( [status.strip() for status in config.option.__dict__[option].split(',')]) + if option == "qase_status_mapping" and config.option.__dict__[option] is not None: + # Parse status mapping from CLI parameter + # Format: "source1=target1,source2=target2" + mapping_dict = {} + pairs = config.option.__dict__[option].split(',') + for pair in pairs: + pair = pair.strip() + if pair and '=' in pair: + source_status, target_status = pair.split('=', 1) + mapping_dict[source_status.strip()] = target_status.strip() + config_manager.config.set_status_mapping(mapping_dict) + if option == "qase_testops_run_external_link_type" and config.option.__dict__[option] is not None: if not config_manager.config.testops.run.external_link: from qase.commons.models.external_link import ExternalLinkConfig diff --git a/qase-pytest/src/qase/pytest/options.py b/qase-pytest/src/qase/pytest/options.py index 082e0fa1..54891c11 100644 --- a/qase-pytest/src/qase/pytest/options.py +++ b/qase-pytest/src/qase/pytest/options.py @@ -183,6 +183,14 @@ def addoptions(parser, group): help="Filter results by status. Format: 'passed,failed,skipped'" ) + QasePytestOptions.add_option( + parser, + group, + "--qase-status-mapping", + dest="qase_status_mapping", + help="Map test result statuses. Format: 'invalid=failed,skipped=passed'" + ) + QasePytestOptions.add_option( parser, group, diff --git a/qase-robotframework/changelog.md b/qase-robotframework/changelog.md index 82b82462..052ec9bb 100644 --- a/qase-robotframework/changelog.md +++ b/qase-robotframework/changelog.md @@ -1,3 +1,9 @@ +# qase-robotframework 4.0.1 + +## What's new + +- Added support for status mapping. More information about status mapping can be found in the [docs](../qase-python-commons/docs/STATUS_MAPPING.md). + # qase-robotframework 4.0.0 ## What's new diff --git a/qase-robotframework/pyproject.toml b/qase-robotframework/pyproject.toml index d0d94398..a3bdfe8b 100644 --- a/qase-robotframework/pyproject.toml +++ b/qase-robotframework/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "qase-robotframework" -version = "4.0.0" +version = "4.0.1" description = "Qase Robot Framework Plugin" readme = "README.md" authors = [{name = "Qase Team", email = "support@qase.io"}] @@ -24,7 +24,7 @@ classifiers = [ urls = {"Homepage" = "https://github.com/qase-tms/qase-python/tree/main/qase-robotframework"} requires-python = ">=3.9" dependencies = [ - "qase-python-commons~=4.0.0", + "qase-python-commons~=4.0.1", "filelock~=3.12.2", ] diff --git a/qase-tavern/changelog.md b/qase-tavern/changelog.md index 5fe06651..e13769b8 100644 --- a/qase-tavern/changelog.md +++ b/qase-tavern/changelog.md @@ -1,3 +1,9 @@ +# qase-tavern 2.0.1 + +## What's new + +- Added support for status mapping. More information about status mapping can be found in the [docs](../qase-python-commons/docs/STATUS_MAPPING.md). + # qase-tavern 2.0.0 ## What's new @@ -25,6 +31,7 @@ ## Migration Guide The plugin now provides more accurate test result reporting by distinguishing between: + - `failed`: Test failed due to assertion error (test logic issue) - `invalid`: Test failed due to non-assertion error (infrastructure/setup issue) diff --git a/qase-tavern/docs/CONFIGURATION.md b/qase-tavern/docs/CONFIGURATION.md index d933a131..0d9c8f61 100644 --- a/qase-tavern/docs/CONFIGURATION.md +++ b/qase-tavern/docs/CONFIGURATION.md @@ -38,6 +38,7 @@ and command line options override both other values. | Test run configurations | `testops.configurations.values` | `QASE_TESTOPS_CONFIGURATIONS_VALUES` | `--qase-testops-configurations-values` | None, don't add any configurations | No | Format: "group1=value1,group2=value2" | | Create configurations if not exists | `testops.configurations.createIfNotExists` | `QASE_TESTOPS_CONFIGURATIONS_CREATE_IF_NOT_EXISTS` | `--qase-testops-configurations-create-if-not-exists` | `False`, don't create configurations | No | `True`, `False` | | Filter results by status | `testops.statusFilter` | `QASE_TESTOPS_STATUS_FILTER` | `--qase-testops-status-filter` | None, don't filter any results | No | Comma-separated list of statuses | +| Map test result statuses | `statusMapping` | `STATUS_MAPPING` | `--qase-status-mapping` | None, don't map any statuses | No | Format: 'source1=target1,source2=target2' | | **Qase Report mode configuration** | | Local path to store report | `report.connection.path` | `QASE_REPORT_CONNECTION_PATH` | `--qase-report-connection-path` | `./build/qase-report` | No | Any string | | Report format | `report.connection.format` | `QASE_REPORT_CONNECTION_FORMAT` | `--qase-report-connection-format` | `json` | No | `json`, `jsonp` | diff --git a/qase-tavern/pyproject.toml b/qase-tavern/pyproject.toml index cefe49f5..fb212d66 100644 --- a/qase-tavern/pyproject.toml +++ b/qase-tavern/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "qase-tavern" -version = "2.0.0" +version = "2.0.1" description = "Qase Tavern Plugin for Qase TestOps and Qase Report" readme = "README.md" keywords = ["qase", "tavern", "plugin", "testops", "report", "qase reporting", "test observability"] @@ -28,7 +28,7 @@ classifiers = [ ] requires-python = ">=3.9" dependencies = [ - "qase-python-commons~=4.0.0", + "qase-python-commons~=4.0.1", "pytest>=7,<7.3", "filelock~=3.12.2", "more_itertools", diff --git a/qase-tavern/src/qase/tavern/conftest.py b/qase-tavern/src/qase/tavern/conftest.py index 5aa0df74..64199a91 100644 --- a/qase-tavern/src/qase/tavern/conftest.py +++ b/qase-tavern/src/qase/tavern/conftest.py @@ -132,6 +132,18 @@ def setup_config_manager(config): config_manager.config.testops.set_status_filter( [status.strip() for status in config.option.__dict__[option].split(',')]) + if option == "qase_status_mapping" and config.option.__dict__[option] is not None: + # Parse status mapping from CLI parameter + # Format: "source1=target1,source2=target2" + mapping_dict = {} + pairs = config.option.__dict__[option].split(',') + for pair in pairs: + pair = pair.strip() + if pair and '=' in pair: + source_status, target_status = pair.split('=', 1) + mapping_dict[source_status.strip()] = target_status.strip() + config_manager.config.set_status_mapping(mapping_dict) + if option == "qase_testops_run_external_link_type" and config.option.__dict__[option] is not None: if not config_manager.config.testops.run.external_link: from qase.commons.models.external_link import ExternalLinkConfig diff --git a/qase-tavern/src/qase/tavern/options.py b/qase-tavern/src/qase/tavern/options.py index 4f9e0deb..1115f387 100644 --- a/qase-tavern/src/qase/tavern/options.py +++ b/qase-tavern/src/qase/tavern/options.py @@ -183,6 +183,14 @@ def addoptions(parser, group): help="Filter results by status. Format: 'passed,failed,skipped'" ) + QasePytestOptions.add_option( + parser, + group, + "--qase-status-mapping", + dest="qase_status_mapping", + help="Map test result statuses. Format: 'invalid=failed,skipped=passed'" + ) + QasePytestOptions.add_option( parser, group,