How to attach screenshots after not-Selenide assertions (JUnit in my case) to Allure Report automatically? #2728
Unanswered
VladislavShcherba
asked this question in
Questions & Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know that Selenide takes screenshot on test failure by default. But it does it only for Selenide's assertions like
shouldBe
.To solve this problem it is possible to add
@ExtendWith(ScreenShooterExtension.class)
to tests superclass. Now Selenide takes screenshots after not-Selenide (JUnit in my case) assertions.I also want to use Allure Report. In order to integrate it with Selenide I use allure-selenide library and add
to tests superclass.
As a result the Selenide's assertions screenshots are taken and attached to Allure. The non-Selenide assertions screenshots are taken but are not attached to Allure.
I wasn't able to find a built-in solution for that, so I ended up in creating my own JUnit extension.
But I wonder if it's possible to tell Allure-Selenide to attach Junit assertions screenshots to report easily?
Originally the question was asked on Selenide side.
The full code:
Beta Was this translation helpful? Give feedback.
All reactions