Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allure Report Screenshots #985

Answered by mdmintz
sebtechni asked this question in Q&A
Discussion options

Hello,

In the readme, there's a section about Allure report (https://github.com/seleniumbase/SeleniumBase#allure-reports).

I tried it but screenshots are not attached. With my tests that are not using SeleniumBase, it works.

How can I add screenshots of failed tests in a Allure report using SeleniumBase?

Thanks!

You must be logged in to vote

Hello @sebtechni, the Allure integration is a stand-alone pytest plugin integration. By default SeleniumBase saves screenshots to pytest-html reports (after all tests complete) and to the latest_logs/ folder (for failing tests). If you want screenshots to appear in Allure reports, you'll need to create a custom tearDown() method and send a request in there for the screenshots to appear in Allure reports. For instructions on creating a custom tearDown() method that doesn't override the existing SeleniumBase tearDown() method, see: https://github.com/seleniumbase/SeleniumBase/blob/master/examples/boilerplates/base_test_case.py

Replies: 1 comment 1 reply

Comment options

Hello @sebtechni, the Allure integration is a stand-alone pytest plugin integration. By default SeleniumBase saves screenshots to pytest-html reports (after all tests complete) and to the latest_logs/ folder (for failing tests). If you want screenshots to appear in Allure reports, you'll need to create a custom tearDown() method and send a request in there for the screenshots to appear in Allure reports. For instructions on creating a custom tearDown() method that doesn't override the existing SeleniumBase tearDown() method, see: https://github.com/seleniumbase/SeleniumBase/blob/master/examples/boilerplates/base_test_case.py

You must be logged in to vote
1 reply
Comment options

Thanks a lot @mdmintz, I'll take a look into that!

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /