allure-framework / allure-framework/allure-python

Precondition and expected results decorators

Abierto
#775 3 comentarios 10 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
814
Forks
260
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

#### 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:

![image](https://github.com/allure-framework/allure-python/assets/11450769/005cfdcb-abc4-4412-bec3-53acf78af443)

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
)

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comience examinando los decoradores de pytest existentes, como @allure.title y @allure.description, y cómo se representan sus metadatos. Determine cómo deben exponerse por separado de la descripción las precondiciones repetidas y un resultado esperado; después, añada cobertura para el comportamiento solicitado del decorador y verifique que el informe generado muestre estos campos.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
testing
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.