Skip to content

Reporting the test results of one pytest using different configs to different Tests in XRAY #100

@lkamln

Description

@lkamln

Lets say I have a pytests like

def test_foo():
    assert foo(3) == 4

and a test that is being parametrized like

@pytest.mark.parametrize("a, b, expected", [
    (1, 2, 3),      # Test case 1: 1 + 2 = 3
    (0, 0, 0),      # Test case 2: 0 + 0 = 0
])
def test_add(a, b, expected):
    assert add(a, b) == expected

For both types of tests it seems sufficient for now to only report the overall result to XRAY, marking above tests with the Test(XRAY) ID and then use pytest --jira-xray --execution TestExecutionId to upload results to existing test execution.

If there is now the need to run test_foo using different configs like
pytest test_foo --config configA --jira-xray --execution TestExecutionId
and then
pytest test_foo --config configB --jira-xray --execution TestExecutionId
would it be possible to report the test result to two different Test(XRAY) IDs?
Potentially having --test cmd line option or in some other way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions