We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I researched this topic and saw a similar question in https://github.com/allure-framework/allure-jasmine/issues/10 and But I wonder if this is something jest do or allure, or... jest-allure? Is there some sort of each test on error event can be utilized in each description / it scope when onError without building another custom reporter? I know I can take a screenshot by building another reporter (https://stackoverflow.com/questions/48388206/how-to-run-function-when-any-test-fails-jest)... but is that the only way to go in this case?
jest-allure
onError
Thanks!
The text was updated successfully, but these errors were encountered:
@adamchenwei i'm using puppeeteer, i use to try / catch every puppeteer method in a helper library and then i add a screenshot in the catch
for example
try { const selectorScreenshot = await selectorImage.screenshot() await expect(selectorScreenshot).toMatchImageSnapshot({ failureThreshold: 0, failureThresholdType: "percent", diffDirection: "vertical" }) } catch (error) { const selectorScreenshot = await selectorImage.screenshot() reporter.addAttachment("imageShouldToBe", selectorScreenshot, "image/png"); throw new Error(`unable to take screenshot ` + error) }
Sorry, something went wrong.
No branches or pull requests
I researched this topic and saw a similar question in https://github.com/allure-framework/allure-jasmine/issues/10 and
But I wonder if this is something jest do or allure, or...
jest-allure
?Is there some sort of each test on error event can be utilized in each description / it scope when
onError
without building another custom reporter?I know I can take a screenshot by building another reporter (https://stackoverflow.com/questions/48388206/how-to-run-function-when-any-test-fails-jest)... but is that the only way to go in this case?
Thanks!
The text was updated successfully, but these errors were encountered: