Home Ask Login Register

Developers Planet

Your answer is one click away!

nijha_p February 2016

Customize Allure Report using pytest-allure-adaptor

I want to customize my allure test report using pytest adaptor. For e.g adding Environment details on the Overview Page. Changing the Report Name on the Overview screen.

I tried adding the environment details in conftest.py as suggested in the documentation, but it do not work for me

def pytest_configure(config):
    allure.environment(test_server='testserver', report='My Test Report')

I also tried adding environment.properties in the allure-report folder but that also didn't work. Please let me know if I am doing something wrong here and how can I resolve this problem.


volkovs February 2016

I never tried pytest adapter. But you convert XML report to HTML with the same tool whatever adapter is. So environment.properties should work. You can test it with https://github.com/allure-examples/allure-testng-example:

  1. mvn test
  2. create target/allure-results/environment.properties "testserver=My Test Report"
  3. mvn site
  4. open target/site/allure-maven-plugin/index.html in FireFox enter image description here

If it doesn't, please check Allure version right in HTML report. enter image description here

Post Status

Asked in February 2016
Viewed 2,646 times
Voted 9
Answered 1 times


Leave an answer

Quote of the day: live life