Using one @allure.epic decorator in a test file

Viewed 237

I want to use allure tags to order my tests. So I try to mark them using allure.epic and allure.feature tags. I found out that I had to mark all the tests (I don't have test classes). Is it possible to mark with @allure.epic("") a test file just one time instead of putting decorators to every tests?

@allure.epic("critical_tests")
@pytest.mark.run(order=1901)
@pytest.mark.dependency()
def test_open_page(app):

    page = AnalyticChart(app)
    page.open_page()


@allure.epic("critical_tests")
@pytest.mark.run(order=1902)
@pytest.mark.dependency(depends=['test_open_page'])
def test_select_sdo(app):

    select_sdo_by_name(sdo_name, app.wd)
1 Answers

Try to create allure.properties file or yaml file with this line in it allure.label.epic=critical_tests

Related