how to customize allure report with Allure-behave

424 Views Asked by At

I'm using allure-behave to use as a GUI for the test result of a behave selenium project. The generation ad view of the report is fine however there is always a lot of blank areas in the allure server.

for example, there is there is nothing in the 'trend' section on the overview, the category or environment sections. this always makes it look incomplete....

I know in the pytest-allure you can use things like:

@allure.title("Test Authentication") @allure.tag("NewUI", "Essentials", "Authentication") @allure.severity(allure.severity_level.CRITICAL) @allure.label("owner", "John Doe")

however, in behave it is unable to parse them.

ParserError: Failed to parse "Calculator.feature": tag: Authentication") (line: @allure.title("Test Authentication")) at line 4

so my question is how to you add the metadata to behave test to fill out all the sections in the allure server?

1

There are 1 best solutions below

0
On

perhaps this will help https://github.com/allure-framework/allure-python/tree/master/allure-behave/examples Notice that the notation you are using is for pytest allure, not behave hence the difference. No need to mark everything with @allure, you should mark stuff like this:

@critical @Authentication @allure.label.author:John_Doe
@allure.label.epic="something"
@alllure.label.story="something_else" 

This should work