From 72129cc386731ddfbf7b31dd9c7e338240655830 Mon Sep 17 00:00:00 2001 From: Fahad Khan Date: Mon, 23 Feb 2026 14:49:13 -0800 Subject: [PATCH 01/13] added --rp-launch-attributes and --rp-tests-attributes CLI args --- pytest_reportportal/plugin.py | 14 ++++++++++++-- tests/unit/test_plugin.py | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/pytest_reportportal/plugin.py b/pytest_reportportal/plugin.py index 8d8465b..8059650 100644 --- a/pytest_reportportal/plugin.py +++ b/pytest_reportportal/plugin.py @@ -590,8 +590,18 @@ def add_shared_option(name, help_str, default=None, action="store"): parser.addini("rp_oauth_client_secret", type="args", help="OAuth 2.0 client secret") parser.addini("rp_oauth_scope", type="args", help="OAuth 2.0 access token scope") - parser.addini("rp_launch_attributes", type="args", help="Launch attributes, i.e Performance Regression") - parser.addini("rp_tests_attributes", type="args", help="Attributes for all tests items, e.g. Smoke") + rp_launch_attributes_help_str = "Launch attributes, i.e Performance Regression." + parser.addini("rp_launch_attributes", type="args", help=rp_launch_attributes_help_str) + group.addoption( + "--rp-launch-attributes", dest="rp_launch_attributes", help=rp_launch_attributes_help_str, nargs="+" + ) + + rp_test_attributes_help_str = "Attributes for all tests items, e.g. Smoke." + parser.addini("rp_tests_attributes", type="args", help=rp_test_attributes_help_str) + group.addoption( + "--rp-tests-attributes", dest="rp_tests_attributes", help=rp_test_attributes_help_str, nargs="+" + ) + parser.addini("rp_log_batch_size", default="20", help="Size of batch log requests in async mode") parser.addini( "rp_log_batch_payload_limit", diff --git a/tests/unit/test_plugin.py b/tests/unit/test_plugin.py index 9912f73..d3a8f4c 100644 --- a/tests/unit/test_plugin.py +++ b/tests/unit/test_plugin.py @@ -308,6 +308,8 @@ def test_pytest_addoption_adds_correct_command_line_arguments(): "--rp-thread-logging", "--rp-launch-uuid-print", "--rp-launch-uuid-print-output", + '--rp-launch-attributes', + '--rp-tests-attributes' ) mock_parser = mock.MagicMock(spec=Parser) mock_reporting_group = mock_parser.getgroup.return_value From c375fef16a8a52738152cff4ea54ab0840dd194a Mon Sep 17 00:00:00 2001 From: "reportportal.io" Date: Fri, 20 Mar 2026 16:52:04 +0000 Subject: [PATCH 02/13] Changelog update --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b8c3d4..2425777 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## [Unreleased] + +## [5.6.1] ### Added - Config variables override by environment variables logic, by @HardNorth ### Fixed From 6ffe1ffde4f317a88c30b8e690c575884f08bcce Mon Sep 17 00:00:00 2001 From: "reportportal.io" Date: Fri, 20 Mar 2026 16:52:05 +0000 Subject: [PATCH 03/13] Version update --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 58ebab9..6f72db0 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ from setuptools import setup -__version__ = "5.6.1" +__version__ = "5.6.2" def read_file(fname): From cb4a88155a9e36a78a296de31498579b48c09e72 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Fri, 3 Apr 2026 10:34:37 +0300 Subject: [PATCH 04/13] Update dependencies --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 21bc458..ee8e119 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ dill>=0.3.6 pytest>=4.6.10 -reportportal-client~=5.7.0 -aenum>=3.1.0 +reportportal-client==5.7.1 +aenum==3.1.17 From 9fa56c7acafc9b7c0f39ed5c84c7dec250557c9c Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Fri, 3 Apr 2026 10:39:04 +0300 Subject: [PATCH 05/13] Update dependencies --- requirements-dev.txt | 4 +++- requirements.txt | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index a6ccdfb..4f1e860 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,8 @@ +dill>=0.3.6 +pytest>=4.6.10 delayed-assert pytest-cov pytest-parallel black isort -mypy +mypy==1.19.1 diff --git a/requirements.txt b/requirements.txt index ee8e119..ca2b79b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,2 @@ -dill>=0.3.6 -pytest>=4.6.10 reportportal-client==5.7.1 aenum==3.1.17 From 2f04c5d89625f76c9021a6815f329963fce408a3 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Fri, 3 Apr 2026 10:42:36 +0300 Subject: [PATCH 06/13] Fix warnings --- pytest_reportportal/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest_reportportal/plugin.py b/pytest_reportportal/plugin.py index 8d8465b..d43a0e5 100644 --- a/pytest_reportportal/plugin.py +++ b/pytest_reportportal/plugin.py @@ -86,7 +86,7 @@ def wait_launch(rp_client: RP) -> bool: :param rp_client: Instance of the ReportPortalService class """ timeout = time.time() + LAUNCH_WAIT_TIMEOUT - while not rp_client.launch_id: + while not rp_client.launch_uuid: if time.time() > timeout: return False time.sleep(1) From 5fee6b5a279a1571ddf931d3a85ecb06c8de1855 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Fri, 3 Apr 2026 11:03:07 +0300 Subject: [PATCH 07/13] `rp_launch_uuid` configuration parameter --- CHANGELOG.md | 4 ++++ pytest_reportportal/config.py | 13 +++++++++++-- pytest_reportportal/plugin.py | 6 +++++- pytest_reportportal/service.py | 10 +++++----- tests/unit/test_plugin.py | 2 +- 5 files changed, 26 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2425777..9c25dd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog ## [Unreleased] +### Added +- `rp_launch_uuid` configuration parameter, by @HardNorth +### Changed +- Client version updated on [5.7.1](https://github.com/reportportal/client-Python/releases/tag/5.7.1), by @HardNorth ## [5.6.1] ### Added diff --git a/pytest_reportportal/config.py b/pytest_reportportal/config.py index 0352fa7..5526adb 100644 --- a/pytest_reportportal/config.py +++ b/pytest_reportportal/config.py @@ -44,7 +44,7 @@ class AgentConfig: rp_bts_project: str rp_bts_url: str rp_launch: str - rp_launch_id: Optional[str] + rp_launch_uuid: Optional[str] rp_launch_attributes: Optional[list[str]] rp_tests_attributes: Optional[list[str]] rp_launch_description: str @@ -105,7 +105,16 @@ def __init__(self, pytest_config: Config) -> None: self.rp_bts_project = self.find_option(pytest_config, "rp_bts_project") self.rp_bts_url = self.find_option(pytest_config, "rp_bts_url") self.rp_launch = self.find_option(pytest_config, "rp_launch") - self.rp_launch_id = self.find_option(pytest_config, "rp_launch_id") + self.rp_launch_uuid = self.find_option(pytest_config, "rp_launch_id") + if self.rp_launch_uuid: + warnings.warn( + "Parameter `rp_launch_id` is deprecated since 5.6.2 and will be subject for removing" + "in the next major version. Use `rp_launch_uuid` argument instead.", + DeprecationWarning, + 2, + ) + self.rp_launch_uuid = self.find_option(pytest_config, "rp_launch_uuid", self.rp_launch_uuid) + self.rp_launch_attributes = self.find_option(pytest_config, "rp_launch_attributes") self.rp_tests_attributes = self.find_option(pytest_config, "rp_tests_attributes") self.rp_launch_description = self.find_option(pytest_config, "rp_launch_description") diff --git a/pytest_reportportal/plugin.py b/pytest_reportportal/plugin.py index d43a0e5..1533b2b 100644 --- a/pytest_reportportal/plugin.py +++ b/pytest_reportportal/plugin.py @@ -531,7 +531,11 @@ def add_shared_option(name, help_str, default=None, action="store"): ) add_shared_option( name="rp_launch_id", - help_str="Use already existing launch-id. The plugin won't control " "the Launch status", + help_str="DEPRECATED: Use already existing launch-id. The plugin won't control the Launch status", + ) + add_shared_option( + name="rp_launch_uuid", + help_str="Use already existing launch UUID. The plugin won't control the Launch status", ) add_shared_option( name="rp_launch_description", diff --git a/pytest_reportportal/service.py b/pytest_reportportal/service.py index 235ebc7..882f19e 100644 --- a/pytest_reportportal/service.py +++ b/pytest_reportportal/service.py @@ -74,7 +74,7 @@ except ImportError: Rule = type("dummy", (), {}) # Old pytest-bdd versions do not have Rule -from reportportal_client import RP, create_client +from reportportal_client import RP, ClientType, create_client, OutputType from reportportal_client.helpers import dict_to_payload, gen_attributes, get_launch_sys_attrs, get_package_version LOGGER = logging.getLogger(__name__) @@ -1417,10 +1417,10 @@ def start(self) -> None: self._config.rp_api_key, ) launch_id = self._launch_id - if self._config.rp_launch_id: - launch_id = self._config.rp_launch_id + if self._config.rp_launch_uuid: + launch_id = self._config.rp_launch_uuid self.rp = create_client( - client_type=self._config.rp_client_type, + client_type=self._config.rp_client_type or ClientType.SYNC, endpoint=self._config.rp_endpoint, project=self._config.rp_project, api_key=self._config.rp_api_key, @@ -1431,7 +1431,7 @@ def start(self) -> None: launch_uuid=launch_id, log_batch_payload_limit=self._config.rp_log_batch_payload_limit, launch_uuid_print=self._config.rp_launch_uuid_print, - print_output=self._config.rp_launch_uuid_print_output, + print_output=self._config.rp_launch_uuid_print_output or OutputType.STDOUT, http_timeout=self._config.rp_http_timeout, mode=self._config.rp_mode, # OAuth 2.0 parameters diff --git a/tests/unit/test_plugin.py b/tests/unit/test_plugin.py index 9912f73..6956a11 100644 --- a/tests/unit/test_plugin.py +++ b/tests/unit/test_plugin.py @@ -224,7 +224,7 @@ def test_pytest_sessionfinish(mocked_session): :param mocked_session: pytest fixture """ mocked_session.config.py_test_service = mock.Mock() - mocked_session.config._reporter_config.rp_launch_id = None + mocked_session.config._reporter_config.rp_launch_uuid = None pytest_sessionfinish(mocked_session) assert mocked_session.config.py_test_service.finish_launch.called From 8f46b4bb83c70e13953a6ec2d42f7be1ef7e26ca Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Fri, 3 Apr 2026 11:03:25 +0300 Subject: [PATCH 08/13] Fix isort --- pytest_reportportal/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest_reportportal/service.py b/pytest_reportportal/service.py index 882f19e..564ff06 100644 --- a/pytest_reportportal/service.py +++ b/pytest_reportportal/service.py @@ -74,7 +74,7 @@ except ImportError: Rule = type("dummy", (), {}) # Old pytest-bdd versions do not have Rule -from reportportal_client import RP, ClientType, create_client, OutputType +from reportportal_client import RP, ClientType, OutputType, create_client from reportportal_client.helpers import dict_to_payload, gen_attributes, get_launch_sys_attrs, get_package_version LOGGER = logging.getLogger(__name__) From 20fad3cbdea650bc3c1b77eabcbde46b948130d4 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Fri, 3 Apr 2026 11:08:01 +0300 Subject: [PATCH 09/13] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c25dd6..8beefd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [Unreleased] ### Added - `rp_launch_uuid` configuration parameter, by @HardNorth +- `rp_launch_attributes` cmd argument, by @fahadnaeemkhan ### Changed - Client version updated on [5.7.1](https://github.com/reportportal/client-Python/releases/tag/5.7.1), by @HardNorth From 938276386d39d4f44ea00c92476f171de5787849 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Fri, 3 Apr 2026 11:10:37 +0300 Subject: [PATCH 10/13] Fix tests --- tests/unit/test_plugin.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit/test_plugin.py b/tests/unit/test_plugin.py index 479a939..f12f410 100644 --- a/tests/unit/test_plugin.py +++ b/tests/unit/test_plugin.py @@ -235,6 +235,7 @@ def test_pytest_addoption_adds_correct_ini_file_arguments(): expected_argument_names = ( "rp_launch", "rp_launch_id", + "rp_launch_uuid", "rp_launch_description", "rp_project", "rp_log_level", @@ -295,6 +296,7 @@ def test_pytest_addoption_adds_correct_command_line_arguments(): "--reportportal", "--rp-launch", "--rp-launch-id", + "--rp_launch_uuid", "--rp-launch-description", "--rp-project", "--rp-log-level", @@ -308,8 +310,8 @@ def test_pytest_addoption_adds_correct_command_line_arguments(): "--rp-thread-logging", "--rp-launch-uuid-print", "--rp-launch-uuid-print-output", - '--rp-launch-attributes', - '--rp-tests-attributes' + "--rp-launch-attributes", + "--rp-tests-attributes", ) mock_parser = mock.MagicMock(spec=Parser) mock_reporting_group = mock_parser.getgroup.return_value From 799a1a465d7d4a0f403877165fd57c39b2900643 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Fri, 3 Apr 2026 11:15:44 +0300 Subject: [PATCH 11/13] Fix tests --- pytest_reportportal/service.py | 4 ++-- tests/unit/test_plugin.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pytest_reportportal/service.py b/pytest_reportportal/service.py index 564ff06..c0dff67 100644 --- a/pytest_reportportal/service.py +++ b/pytest_reportportal/service.py @@ -74,7 +74,7 @@ except ImportError: Rule = type("dummy", (), {}) # Old pytest-bdd versions do not have Rule -from reportportal_client import RP, ClientType, OutputType, create_client +from reportportal_client import RP, ClientType, create_client from reportportal_client.helpers import dict_to_payload, gen_attributes, get_launch_sys_attrs, get_package_version LOGGER = logging.getLogger(__name__) @@ -1431,7 +1431,7 @@ def start(self) -> None: launch_uuid=launch_id, log_batch_payload_limit=self._config.rp_log_batch_payload_limit, launch_uuid_print=self._config.rp_launch_uuid_print, - print_output=self._config.rp_launch_uuid_print_output or OutputType.STDOUT, + print_output=self._config.rp_launch_uuid_print_output, http_timeout=self._config.rp_http_timeout, mode=self._config.rp_mode, # OAuth 2.0 parameters diff --git a/tests/unit/test_plugin.py b/tests/unit/test_plugin.py index f12f410..f8564fd 100644 --- a/tests/unit/test_plugin.py +++ b/tests/unit/test_plugin.py @@ -296,7 +296,7 @@ def test_pytest_addoption_adds_correct_command_line_arguments(): "--reportportal", "--rp-launch", "--rp-launch-id", - "--rp_launch_uuid", + "--rp-launch-uuid", "--rp-launch-description", "--rp-project", "--rp-log-level", From d0542a1fa67e238d23157ccb91b6f4416b84cfb9 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Fri, 3 Apr 2026 11:24:09 +0300 Subject: [PATCH 12/13] Fix tests --- pytest_reportportal/config.py | 2 +- tests/unit/test_config.py | 2 +- tests/unit/test_plugin.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pytest_reportportal/config.py b/pytest_reportportal/config.py index 5526adb..0d6a702 100644 --- a/pytest_reportportal/config.py +++ b/pytest_reportportal/config.py @@ -113,7 +113,7 @@ def __init__(self, pytest_config: Config) -> None: DeprecationWarning, 2, ) - self.rp_launch_uuid = self.find_option(pytest_config, "rp_launch_uuid", self.rp_launch_uuid) + self.rp_launch_uuid = self.find_option(pytest_config, "rp_launch_uuid", self.rp_launch_uuid) self.rp_launch_attributes = self.find_option(pytest_config, "rp_launch_attributes") self.rp_tests_attributes = self.find_option(pytest_config, "rp_tests_attributes") diff --git a/tests/unit/test_config.py b/tests/unit/test_config.py index d8bf04c..c1c932a 100644 --- a/tests/unit/test_config.py +++ b/tests/unit/test_config.py @@ -43,7 +43,7 @@ def test_verify_ssl_true(mocked_config, verify_ssl, expected_result): ("RP_PROJECT", "env_project", "rp_project", "env_project"), ("RP_LAUNCH", "env_launch", "rp_launch", "env_launch"), ("RP_API_KEY", "env_api_key", "rp_api_key", "env_api_key"), - ("RP_LAUNCH_ID", "env_launch_id", "rp_launch_id", "env_launch_id"), + ("RP_LAUNCH_UUID", "env_launch_id", "rp_launch_uuid", "env_launch_id"), ("RP_MODE", "DEBUG", "rp_mode", "DEBUG"), ("RP_PARENT_ITEM_ID", "env_parent_id", "rp_parent_item_id", "env_parent_id"), ("RP_RERUN_OF", "env_rerun_of", "rp_rerun_of", "env_rerun_of"), diff --git a/tests/unit/test_plugin.py b/tests/unit/test_plugin.py index f8564fd..2b0c038 100644 --- a/tests/unit/test_plugin.py +++ b/tests/unit/test_plugin.py @@ -146,7 +146,7 @@ def test_wait_launch(time_mock): """Test wait_launch() function for the correct behavior.""" time_mock.time.side_effect = [0, 1, 2] rp_client = mock.Mock() - rp_client.launch_id = None + rp_client.launch_uuid = None assert not wait_launch(rp_client) From d07bbde1b3c19645edac77da3db31ae62dd3f072 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Fri, 3 Apr 2026 11:28:30 +0300 Subject: [PATCH 13/13] Fix black --- pytest_reportportal/plugin.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pytest_reportportal/plugin.py b/pytest_reportportal/plugin.py index dec65ad..1798b14 100644 --- a/pytest_reportportal/plugin.py +++ b/pytest_reportportal/plugin.py @@ -602,9 +602,7 @@ def add_shared_option(name, help_str, default=None, action="store"): rp_test_attributes_help_str = "Attributes for all tests items, e.g. Smoke." parser.addini("rp_tests_attributes", type="args", help=rp_test_attributes_help_str) - group.addoption( - "--rp-tests-attributes", dest="rp_tests_attributes", help=rp_test_attributes_help_str, nargs="+" - ) + group.addoption("--rp-tests-attributes", dest="rp_tests_attributes", help=rp_test_attributes_help_str, nargs="+") parser.addini("rp_log_batch_size", default="20", help="Size of batch log requests in async mode") parser.addini(