allure-framework / allure-framework/allure-python
Precondition and expected results decorators
- Vorherrschende Sprache
- Python
- Sterne
- 814
- Forks
- 260
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
#### I'm submitting a ...
- [ ] bug report
- [x] 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:
```python
@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:

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
[//]: # (
. e.g. detailed explanation, stacktraces, related issues, suggestions
. how to fix, links for us to have more context, eg. Stackoverflow, Gitter etc
)
Beitragsleitfaden
Rechercherichtung
Beginnen Sie mit der Untersuchung der vorhandenen pytest-Dekoratoren wie @allure.title und @allure.description sowie der Darstellung ihrer Metadaten. Ermitteln Sie, wie wiederholte Vorbedingungen und ein erwartetes Ergebnis getrennt von der Beschreibung bereitgestellt werden sollten, fügen Sie dann Tests für das angeforderte Dekoratorverhalten hinzu und überprüfen Sie, dass der generierte Bericht diese Felder anzeigt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- testing
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100