allure-framework / allure-python

Allure integrations for Python test frameworks
https://allurereport.org/
Apache License 2.0
713 stars 233 forks source link

Precondition and expected results decorators #775

Open joaonc opened 8 months ago

joaonc commented 8 months ago

I'm submitting a ...

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:

Other information

[//]: # ( . e.g. detailed explanation, stacktraces, related issues, suggestions . how to fix, links for us to have more context, eg. Stackoverflow, Gitter etc )