-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
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
[BUG] Regression: missing snapshot attachment #47
Comments
This definitely seems like a regression since version I've been able to narrow the problem down a bit further. It seems that the snapshot attachments aren't being displayed unless there are other attachments added after them. Most of my tests are running with an auto fixture to attach code coverage on tests and that's why I didn't notice this sooner. I've updated the tests in the edumserrano/playwright-bug-vrt-diff/tree/monocart-reporter on the The test this shows attachments well works well and produces the snapshot and code coverage attachments but only because the code coverage attachment is added after the snapshot attachment. The test this only shows code coverage only shows code coverage. Note that here the code coverage is attached to the test before the snapshots. The test this does not show any attachment doesn't show any attachment even though it has a This was actually hard for me to figure out but hopefully the above info helps you quickly narrow down the problem and fix it. Let me know if you need more details @cenfun |
ok, it should be a bug since image diff feature adding. I will check it. |
I also found what I believe is a related bug. See image below, note that the test failed, there are only 3 images generated from the test failure in the test results folder but the tabs for snapshot attachments are duplicated. I believe (not sure) the way to reproduce this is to have the test fail and have a export default defineConfig({
...
retries: 2,
...
}); In this scenario I had 2 retries and I think what is happening is that we would get the tabs 3x, as in 3xDiff, 3xActual and 3xExpected, but we got the tabs 2x because one of the original bug reported here which is when it fails with no retries there isn't even any attachment showing. So overall this bug report is probably:
|
@edumserrano it should be fixed in monocart-reporter@1.6.34 |
@zhukovsv I think your issue is different. It looks like the problem described here #34. If you read #34, you probably have the same issue in that you can't configure the path for your reporter like you did. Try to change the In short, the index.html for your monocart-reporter must be at the same directory as your test results directory. |
@cenfun it's almost fixed. I've pushed a small commit in in the edumserrano/playwright-bug-vrt-diff/tree/monocart-reporter on the monocart-reporter branch to show the problem that still occurs with retries. I've updated to version export default defineConfig({
...
retries: 2,
...
}); and when you run
|
- fixed retry issue #47 - added retry for attachments
it should be fixed, see version |
Hi @cenfun, Config info: If test file contains test suites:
BUT if test file does not contains test suites: Bug: If test file contains test suite or parent + child test suites Actual and Expected snapshots are not shown. Could you look into this issue? |
@zhukovsv Are there any special characters in the suite title? |
test.describe('DT BASE: ', () => { const testData: Array<[number, string]> = [ for (const [testCaseId, toolTitle] of testData) {
}); Hope it will help. |
@cenfun
Everything is fine. Is it possible that the problem in path length? file:///D:/_AG/VSTS_Tests/pw-dxxxx-txxxxxxx-tests-dev/e2e/test-results/p-w-report/a-g-project-tests-dxxx-txxxxxxx-smoke-01-base--ec2be-BASE-2-Dxxx-Cxxxxxx-ASIA-page-should-be-opened--Chrome-Stable/DxxxTxxxxxxx-BASE-2-Dxxx-Cxxxxxx-ASIA-page-should-be-opened-1-actual.png I will short names in my scrips and check |
I don't think is path length problem. |
I have code like this and it raise the issue: for (const [testCaseId, toolTitle] of testData) {
} Then I shorten names |
@cenfun test.describe('DT BASE: ', () => { for (const [testCaseId, toolTitle, shortName] of testData) { page = app.setPageByName(toolTitle, userCredential); await page.get(); const pageTitle = await page.getTitle(); Path Length? Do you still need console logs? |
the error message is
the image url will be over the |
npx monocart show-report test-results\multiple-html\index.html |
I made this because of conflict PW and HTML report. I will made changes as you say and remove html report. 2 minutes please |
Short Names is correct in both cases:
I am runing long names. Please wait 2-3 minutes |
Good to know short names will works, but it's unreasonable, because your url should not great than 2k, chrome should support 32k length url, see infomation about max url length here |
My reports are automatically saved to a network share at night. I usually just launch them in the morning and review them. Do you have any idea how to fix a report launched by double-clicking? Sorry I need to go. It not urgent. So I can help you with testing tomorrow. PS. Thanks a lot for your report and your time. |
ok im going to sleep. one more option, can you share the folder |
I will do it 2-3 hours later. |
Please find prepared test-results folder: |
@cenfun I can confirm the issues I raised are now fixed. Didn't test on version |
@zhukovsv |
Hi @cenfun,
Something has happened and the attachments aren't displaying properly, at least for snapshots. From version
1.6.31
until latest what I get when a test fails is the following images:When I downgrade to version
1.6.30
the attachments start showing:I've re-used a demo playwright project I had to show the bug. You can go to edumserrano/playwright-bug-vrt-diff/tree/monocart-reporter and checkout the
monocart-reporter
branch.Then from the root of the repo just do:
This will give you the result above where no attachments are shown. Any ideas what might be going wrong? I don't understand how this was working and suddenly stopped.
The text was updated successfully, but these errors were encountered: