allure-python
allure-python copied to clipboard
[feature requests]is there any way to add allure mark for priority and owner, show in reports and filter
is there any way to add allure mark for priority and owner, show in reports and filter?
Is custom labels what are you looking for? https://github.com/allure-framework/allure-python/blob/master/allure-pytest/examples/label/custom/custom_label.rst
@rad96 could you give more example for it? if add a lable like @allure.label("owner", "andy") how to run with it like pytest --allure-epics=epic? --allure-owner=andy? any it will show in the allure report??
@rad96 could you give more example for it? if add a lable like @allure.label("owner", "andy") how to run with it like pytest --allure-epics=epic? --allure-owner=andy? any it will show in the allure report??
I don't think it's possible currently But you can make it yourself in plugin.py
You can use pytest marks - they are automatically converted into tag labels, which are visible in the report (other labels are not):
import pytest
@pytest.mark.owner("John Doe")
def test_owner_is_john_doe():
pass

You can also implement mark-based filter by your own, see here.
Once the label-based test selection is implemented (see #725), it will be possible to filter tests like this (the syntax may change):
pytest --allure-label "TAG=owner('John Doe')" ...
I'm closing this issue, since we have a dedicated one for label-based filtering (and as I see, there is nothing else in scope of allure-pytest to implement here). If you have any suggestion on how tests should be displayed in the report, please, start an issue in allure2 repository. If you need help, you can start a discussion or use stackoverflow.