René's URL Explorer Experiment


Title: AllureSelenide attaches Screenshot and Page source once per nesting level of SelenideLogger.step · Issue #1453 · allure-framework/allure-java · GitHub

Open Graph Title: AllureSelenide attaches Screenshot and Page source once per nesting level of SelenideLogger.step · Issue #1453 · allure-framework/allure-java

X Title: AllureSelenide attaches Screenshot and Page source once per nesting level of SelenideLogger.step · Issue #1453 · allure-framework/allure-java

Description: What happened? Summary AllureSelenide.afterEvent attaches Screenshot and Page source on every SelenideLogger event with status FAIL. It never checks whether the same failure was already captured, so a single failure inside nested steps p...

Open Graph Description: What happened? Summary AllureSelenide.afterEvent attaches Screenshot and Page source on every SelenideLogger event with status FAIL. It never checks whether the same failure was already captured, s...

X Description: What happened? Summary AllureSelenide.afterEvent attaches Screenshot and Page source on every SelenideLogger event with status FAIL. It never checks whether the same failure was already captured, s...

Opengraph URL: https://github.com/allure-framework/allure-java/issues/1453

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"AllureSelenide attaches Screenshot and Page source once per nesting level of SelenideLogger.step","articleBody":"### What happened?\n\n## Summary\n\n`AllureSelenide.afterEvent` attaches `Screenshot` and `Page source` on *every* SelenideLogger\nevent with status `FAIL`. It never checks whether the same failure was already captured, so a\nsingle failure inside nested steps produces one pair of attachments per nesting level.\n\n## Why it happens\n\n`afterEvent` captures unconditionally on FAIL:\n\n```java\npublic void afterEvent(final LogEvent event) {\n    if (event.getStatus().equals(LogEvent.EventStatus.FAIL)) {\n        lifecycle.getCurrentExecutableKey().ifPresent(owner -> {\n            if (saveScreenshots) { ... addAttachment(owner, \"Screenshot\", ...) }\n            if (savePageHtml)   { ... addAttachment(owner, \"Page source\", ...) }\n```\n\n`SelenideLogger.step(...)` is itself a SelenideLogger event, and `SelenideLogger.wrap()`\ncommits it as FAIL again while the exception propagates outwards:\n\n```java\ncatch (RuntimeException | Error e) {\n    SelenideLogger.commitStep(log, e);   // -> afterEvent(FAIL) -> another screenshot\n    throw e;\n}\n```\n\nSo the number of attachment pairs is (number of enclosing `SelenideLogger.step` calls) + 1.\n\n## How to reproduce\n\n```java\nSelenideLogger.addListener(\"allure\", new AllureSelenide().screenshots(true));\nSelenideLogger.step(\"outer step\", () -> SelenideLogger.step(\"inner step\", () -> $(\"#missing\").shouldBe(visible)));\n```\n\n### Actual\n\nThree `Screenshot` + `Page source` pairs for one failure:\n\n\n- [failed] $(\"outer step\") \u003c- Screenshot, Page source\n- - [failed] $(\"inner step\") \u003c- Screenshot, Page source\n- - - [failed] $(\"#missing\") should be(visible) \u003c- Screenshot, Page source\n\n### Expected\n\nOne `Screenshot` and one `Page source`, attached to the innermost step where the failure\nactually happened.\n\n## Impact\n\nThe duplicates are not copies — each one is a separate `getScreenshotAs` + `getPageSource`\nround trip to the driver. On a mobile/Appium setup that costs seconds per failure, and the\nlater screenshots are taken after the Selenide timeout has already elapsed, so they show a\ndifferent (less useful) state than the one that caused the failure. The report also becomes\nnoticeably harder to read: the reader has to figure out which of the identical-looking\nattachments is the relevant one.\n\nReproduces on 2.24.0 as well — the body of `afterEvent` is unchanged between 2.24.0 and\n3.0.0, only the lifecycle API around it has moved.\n\n## Note on the obvious workaround\n\nSkipping attachments for step wrappers (for example when `event.getSubject()` is empty) is\nnot sufficient. When non-Selenide code fails inside a `step()` — an assertion, an NPE, an API\nor messaging error — the wrapper's FAIL event is the *only* one, and that is exactly the case\nwhere a screenshot is most valuable. Deduplicating by the `Throwable` instead handles both\ncases, because `SelenideLogger.wrap()` rethrows the same instance (walking the `getCause()`\nchain also covers failures that get wrapped on the way out).\n\nI have a working implementation of this as a subclass in our own project, with tests for all\nfour cases (Selenide failure through a wrapper, wrapped-in-cause failure, assertion failure\ninside a wrapper, two distinct failures in one test).\n\n## Question before I send a PR\n\nWhich direction would you prefer?\n\n1. **Fix the default** — one attachment pair per failure, no new API. Cleaner, but changes\n   behaviour for everyone on upgrade.\n2. **Add an opt-in** `deduplicateAttachments(boolean)`, default `false`. Safe, but users have\n   to discover it.\n\nI'm ready to send a PR with unit tests for either — just let me know which one you'd accept.\n\nRelated: #1439 / #1440 touch `getScreenshotBytes()` in the same method, so there may be a\nsmall conflict; happy to rebase on top of that PR.\n\n### What Allure Integration are you using?\n\nallure-selenide\n\n### What version of Allure Integration you are using?\n\n3.0.0\n\n### What version of Allure Report you are using?\n\n2.19.0\n\n### Code of Conduct\n\n- [x] I agree to follow this project's Code of Conduct","author":{"url":"https://github.com/mikashee","@type":"Person","name":"mikashee"},"datePublished":"2026-10-09T14:44:34Z","url":"https://github.com/allure-framework/allure-java/issues/1453"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d9a56878-3e41-0891-c3aa-08b73bd03083
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA584:30AF58:2813121:37B5C64:6AFD481E
html-safe-noncefb08dd14bf9719824bd1485ff0c6cc6b255eb7660a3f630ca08bb6bfc4030a69
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTg0OjMwQUY1ODoyODEzMTIxOjM3QjVDNjQ6NkFGRDQ4MUUiLCJ2aXNpdG9yX2lkIjoiMzY5MTUzNjY3NjMxMzQ1MDUyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac670aab33ffd37247ae3c3cbf015aa47605aad6413e6f4bb86b1f10201cd81b0a
hovercard-subject-tagissue:5779973930
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/allure-framework/allure-java/1453/issue_layout
twitter:imagehttps://opengraph.githubassets.com/957fe2561dbf0f6590add386202f4a24af8af1e55ae82609510befb4db88c7c2/allure-framework/allure-java/issues/1453
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/957fe2561dbf0f6590add386202f4a24af8af1e55ae82609510befb4db88c7c2/allure-framework/allure-java/issues/1453
og:image:altWhat happened? Summary AllureSelenide.afterEvent attaches Screenshot and Page source on every SelenideLogger event with status FAIL. It never checks whether the same failure was already captured, s...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemikashee
hostnamegithub.com
expected-hostnamegithub.com
Nonebdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474
turbo-cache-controlno-preview
go-importgithub.com/allure-framework/allure-java git https://github.com/allure-framework/allure-java.git
octolytics-dimension-user_id5879127
octolytics-dimension-user_loginallure-framework
octolytics-dimension-repository_id80822758
octolytics-dimension-repository_nwoallure-framework/allure-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id80822758
octolytics-dimension-repository_network_root_nwoallure-framework/allure-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release556dd37bb0aceffb25724e151b5d858b3265b40b
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/allure-framework/allure-java/issues/1453#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fallure-framework%2Fallure-java%2Fissues%2F1453
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fallure-framework%2Fallure-java%2Fissues%2F1453
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=allure-framework%2Fallure-java
Reloadhttps://github.com/allure-framework/allure-java/issues/1453
Reloadhttps://github.com/allure-framework/allure-java/issues/1453
Reloadhttps://github.com/allure-framework/allure-java/issues/1453
allure-frameworkhttps://github.com/allure-framework
allure-javahttps://github.com/allure-framework/allure-java
Codehttps://github.com/allure-framework/allure-java
Issues27 (27)https://github.com/allure-framework/allure-java/issues
Pull requests6 (6)https://github.com/allure-framework/allure-java/pulls
Actionshttps://github.com/allure-framework/allure-java/actions
Security and qualityhttps://github.com/allure-framework/allure-java/security
Insightshttps://github.com/allure-framework/allure-java/insights
https://github.com/allure-framework/allure-java
New issuehttps://github.com/login?return_to=https://github.com/allure-framework/allure-java/issues/1453
New issuehttps://github.com/login?return_to=https://github.com/allure-framework/allure-java/issues/1453
Bughttps://github.com/allure-framework/allure-java/issues?q=type:"Bug"
#1505https://github.com/allure-framework/allure-java/pull/1505
AllureSelenide attaches Screenshot and Page source once per nesting level of SelenideLogger.stephttps://github.com/allure-framework/allure-java/issues/1453#top
#1505https://github.com/allure-framework/allure-java/pull/1505
https://github.com/mikashee
mikasheehttps://github.com/mikashee
on Oct 9, 2026https://github.com/allure-framework/allure-java/issues/1453#issue-5779973930
#1439https://github.com/allure-framework/allure-java/issues/1439
#1440https://github.com/allure-framework/allure-java/pull/1440
mikasheehttps://github.com/mikashee
Bughttps://github.com/allure-framework/allure-java/issues?q=type:"Bug"
on Oct 9, 2026https://github.com/allure-framework/allure-java/issues/1453#event-32884562079
Sign up for freehttps://github.com/signup?return_to=https://github.com/allure-framework/allure-java/issues/1453
Sign in to commenthttps://github.com/login?return_to=https://github.com/allure-framework/allure-java/issues/1453
Bughttps://github.com/allure-framework/allure-java/issues?q=type:"Bug"
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.