Skip to content
Open
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
14 changes: 12 additions & 2 deletions pytest_reportportal/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down