-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --allure-label
command line option to filter test cases by custom labels (implements #725)
#690
Add --allure-label
command line option to filter test cases by custom labels (implements #725)
#690
Conversation
The current filter options like |
Yes. I am aware of it. I just wanted to provide solution that allows user to filter tests by any label. This thing seems to be working fine although it has some different syntax. |
Hello, How we can specify selected tests through custom labels now? I see methods just through default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @betapl3b !
Thank you for your PR! You did great! This is a nice feature to have.
Even more, the plan is to obsolete all other filters and to replace them with more generic label-based filtering mechanism. The details are in this issue: #725.
I have some suggestions. Please, see my review comments.
I also want to discuss the name. Maybe we should name the parameter as --allure-label
(i.e., in singular)? A thing that follows the parameter is a value (or multiple values) for a single label only, so it sounds a little bit more precise to me.
--allure-labels
command line option to filter test cases by custom labels--allure-labels
command line option to filter test cases by custom labels (implements #725)
…of `cf_type` method.
…ed with Python 3.8 (Python 3.7 incompatibility)
Speaking about naming, I think it depends on definition of label. I think your option is closer to the way regular allure user thinks of labels and it increases readability, so I decided to rename it. Thank you for your effort! |
--allure-labels
command line option to filter test cases by custom labels (implements #725)--allure-label
command line option to filter test cases by custom labels (implements #725)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go!
…om labels (implements allure-framework#725) (allure-framework#690) Co-authored-by: Sergey Khomutinin <31664571+skhomuti@users.noreply.github.com>
…om labels (implements allure-framework#725) (allure-framework#690) Co-authored-by: Sergey Khomutinin <31664571+skhomuti@users.noreply.github.com>
Context
This PR is adding
--allure-labels
cmdline option for pytest plugin. It filters test cases by any custom labels.Usage examples:
pytest --allure-labels label_name=value1,value2
pytest --allure-labels label_name=value1,value2 --allure-labels other_label_name=value3,value4
pytest --allure-labels=layer=ui
pytest --allure-labels "other_label_name=value 1 with spaces,value 2 with spaces"
Checklist