Skip to content

Precondition and expected results decorators #775

@joaonc

Description

@joaonc

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 expected behavior?

Would be great to have the ability to add preconditions and expected results in pytest allure decorators, similar to @allure.title, @allure.description, etc.

Ex:

@allure.title('This is a test')
@allure.precondition('This is precondition 1')
@allure.precondition('This is precondition 2, or maybe it can be passed as a list to one decorator')
@allure.expected_result('At the end, it should be `1`')
def test_something():
    pass

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

When creating manual tests, we do have these features, ex:

image

We have a lot of automated tests that have visibility to other teams and separating the preconditions from the description would be very useful.

Please tell us about your environment:

  • Allure version: 2.24.1
  • Test framework: pytest@7.4.3
  • Allure adaptor: allure-pytest@2.13.2

Other information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions