allure-framework / allure-framework/allure-python
Excluding allure-labels in pytest run
- Langage dominant
- Python
- Étoiles
- 814
- Forks
- 260
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
#### I'm submitting a ...
- [ ] feature request
#### What is the current behavior?
We have CLI param `--allure-label` and its possible to INCLUDE labels. Like `--allure-label method=AnyMethod` and it works
#### If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
But I decided to try to exclude from run tests with `@allure.manual(True)` decorator and came across a bunch of things:
1. You can't even include by label if your value (but it's default value) is a bool type. Example: if you set `--allure-label ALLURE_MANUAL=True` in CLI so it will deselect everything.
2. But I could find an interesting moment: if to write decorator like `@allure.manual('True')` and set the same `--allure-label ALLURE_MANUAL=True` in CLI -- it works and manual tests will be selected.
#### What is the expected behavior?
I want not just include labels, but also exclude. Something like `--allure-label "not ALLURE_MANUAL=True"`
#### What is the motivation / use case for changing the behavior?
We write tests as code and we dont need manual test cases in allure report. With this feature we will be able to run night tests and they will be closed automatically in allure testOps.
#### Please tell us about your environment:
- Allure version: 4.22.1
- Test framework: pytest==7.2.2
- Allure adaptor: allure-pytest==2.13.2
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par suivre la manière dont l’adaptateur pytest analyse le paramètre CLI --allure-label et le compare aux valeurs du décorateur allure.manual. Vérifiez le comportement d’inclusion existant et déterminez comment une expression d’exclusion telle que "not ALLURE_MANUAL=True" devrait être représentée. C’est terminé lorsque les labels à valeur booléenne fonctionnent de manière cohérente et que les labels correspondants peuvent être exclus de l’exécution.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- cli, testing
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100