Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

to prevent saving marks with parameters as labels → tag #817

Copy link
Copy link
@cheshi-mantu

Description

@cheshi-mantu
Issue body actions

I'm submitting a ...

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

when pytest tests are being executed the content of marks with parameters is saved to labels section as a tag.

code like

@pytest.mark.skip("skip this test")
@allure.title(TestNames.FAILING_TEST.get_name())
def test_failing_test():
    f"""{TestNames.FAILING_TEST.get_description()}"""
    assert False

will result in

"labels": [
    {
      "name": "tag",
      "value": "@pytest.mark.skip('skip this test')"
    }
<snip>
]

the tag's text will contain spaces, which will result in errors in the integrations Allure Testops has, e.g. when trying to export the data to jira we'll get

response body {"errorMessages":[],"errors":{"labels":"The label '@pytest.mark.skip('Skipping the test because the tests are using token.')' contains spaces which is invalid."}}

as most of the system do not allow creation of tags/labels with spaces.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

N/A

What is the expected behaviour?

marks with parameters aren't transferred to the *-result.json files as tags.

What is the motivation / use case for changing the behavior?

tag is a 1 word label should not contain spaces.

Please tell us about your environment:

  • Allure version: 2.1.0
  • Test framework: pytest@3.0
  • Allure adaptor: allure-pytest@2.0.0b1

Other information

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    task:improvementChange that improves some user experience but can't be considered a new featureChange that improves some user experience but can't be considered a new featuretheme:pytest

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.