allure-framework / allure-framework/allure-python
Excluding allure-labels in pytest run
- Ngôn ngữ chính
- Python
- Star
- 814
- Fork
- 260
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
#### 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách lần theo cách adapter pytest phân tích tham số CLI --allure-label và so sánh tham số đó với các giá trị từ decorator allure.manual. Kiểm tra hành vi bao gồm hiện có và xác định biểu diễn phù hợp cho một biểu thức loại trừ như "not ALLURE_MANUAL=True". Được xem là hoàn tất khi các label có giá trị boolean hoạt động nhất quán và các label khớp có thể được loại khỏi lần chạy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- cli, testing
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100