Allure Reports with Pytest-BDD


Allure Reports with Pytest-BDD

Reporting plays a crucial role in any comprehensive test automation framework. Accurate test execution reports are essential for obtaining a clear overview of the outcomes, including passed, failed, and broken tests. When looking for a reliable open-source reporting tool that delivers well-organized reports for your testing framework, Allure seems to be the optimal choice. Allure offers seamless integration with a wide range of frameworks and programming languages, making it an ideal solution for generating visually appealing and informative reports.


To integrate the Allure reporting framework with your test suite, you will need to have the following installations as prerequisites.

  1. Python (3.x versions and above)
  2. Pytest (versions 3.x and later)
  3. Pytest-BDD (7.x or higher)
  4. JDK (8 or higher)

Allure is written in Java and uses the JDK to generate its reports. If you’re using Allure with pytest-bdd, you need to have a compatible JDK installed to generate Allure reports.


1.Install the Allure for pytest-BDD using the command:
pip install allure-pytest-bdd

Make sure you do not have any version of Allure reports already installed. In case of any, uninstall the previous version and then install the package for allure-pytest-bdd. If you are only using pytest then you can install the allure for pytest using the command.
pip install allure-pytest

2.Once the package is successfully installed, you can run the following command.
allure generate

This will create a folder for allure reports in your project directory.


3.To generate your test execution results in an elegant allure report, you can specify the directory where you wish to store the results.


4.Once the tests are executed, you can view the allure report in the browser by running the following command. 


USA408 365 4638


1301 Shoreway Road, Suite 160,

Belmont, CA 94002

Contact us

Whether you are a large enterprise looking to augment your teams with experts resources or an SME looking to scale your business or a startup looking to build something.
We are your digital growth partner.

Tel: +1 408 365 4638
Support: +1 (408) 512 1812