How to generate screenshots on test failure with Allure report

In the latest test automation project I have been working, I integrated Allure report to visualize my test executions, although Allure…