allure-framework / allure-js

Allure integrations for JavaScript test frameworks
https://allurereport.org/
Apache License 2.0
229 stars 124 forks source link

[Bug?] Screenshot is not added in generated allure reported #1131

Open lynn57blocks opened 2 months ago

lynn57blocks commented 2 months ago

Describe the bug When I run my playwright tests with allure-playwright, below is allure-playwright config playwright.config.ts: ["allure-playwright",{ detail: true, outputFolder: "./allure-results", suiteTitle: true, autoAttachScreenshots: true, categories: [{ name: "Outdated tests", messageRegex: ".FileNotFound.", }, ], }, ] Before generate allure report, I can see the screenshot under directory: allure-results. 截屏2024-09-05 下午5 14 11

After I run commands "allure generate ./allure-results -o ./allure-report", and then open the allure report, I can't find any screenshot.

截屏2024-09-05 下午5 31 39

Expected behavior The screenshot should be added to generated allure report automatically. Is there a way to add screenshot when generate allure report after playwright running?

Desktop (please complete the following information):

mikicymulate commented 2 months ago

I have the same problem reporter: [ ["allure-playwright", {outputFolder: "./allure-results/"}], ["line"] ], use: { trace: "retain-on-failure", headless: false, screenshot: { mode: "only-on-failure", fullPage: true, } }

mikicymulate commented 2 months ago

image It seems that the files are not saved in the right place. Can it be fixed?

asi4 commented 2 months ago

very annoying

jmoses commented 1 month ago

I also see this. It also seems to attach screenshots so the last "step" (eg: test.step(() => { ... })) if a failure occurs inside one, instead of hosting the screenshot to the top level.

neighborhoodhacker commented 1 month ago

I am seeing this issue as well. My screenshot is under the afterHooks for playwright integration

kamilulianowski-aqa commented 1 week ago

I also have that issue, it started to occur after I updated allure-playwright to version 3.x.x, is there any workaround to fix it?

ivan-krupskyi commented 1 week ago

@baev