René's URL Explorer Experiment


Title: allure-karate: afterScenario hook failures can leave scenarios reported as passed · Issue #1446 · allure-framework/allure-java · GitHub

Open Graph Title: allure-karate: afterScenario hook failures can leave scenarios reported as passed · Issue #1446 · allure-framework/allure-java

X Title: allure-karate: afterScenario hook failures can leave scenarios reported as passed · Issue #1446 · allure-framework/allure-java

Description: What happened? A Karate scenario with a passing body and a failing configure afterScenario hook can be reported by Allure as passed, without status details or a reported teardown failure. The hook does execute, and Karate records its exc...

Open Graph Description: What happened? A Karate scenario with a passing body and a failing configure afterScenario hook can be reported by Allure as passed, without status details or a reported teardown failure. The hook ...

X Description: What happened? A Karate scenario with a passing body and a failing configure afterScenario hook can be reported by Allure as passed, without status details or a reported teardown failure. The hook ...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"allure-karate: afterScenario hook failures can leave scenarios reported as passed","articleBody":"### What happened?\n\nA Karate scenario with a passing body and a failing `configure afterScenario` hook can be reported by Allure as **passed**, without status details or a reported teardown failure.\n\nThe hook does execute, and Karate records its exception. The Allure adapter finalizes the scenario before that exception is added to Karate's result. This is a reporting correctness problem: scenario cleanup can fail without affecting the reported scenario outcome.\n\n### Steps to reproduce\n\nThe repository already contains this [reproduction feature](https://github.com/allure-framework/allure-java/blob/813f4b90b5e8a06865473af8bea5721900e1bfd6/allure-karate/src/test/resources/testdata/global-errors/scenario-and-feature-hooks-failure.feature):\n\n```gherkin\nFeature: Scenario and feature cleanup failures\n\nBackground:\n  * configure afterScenario = function(){ throw new Error('scenario cleanup failed') }\n  * configure afterFeature = function(){ throw new Error('feature cleanup failed') }\n\nScenario: Scenario with both cleanup hooks\n  * match 1 == 1\n```\n\nRun the existing test through Allure agent mode:\n\n```sh\nnpx --yes allure@3.17.0 agent --report off \\\n  --results-dir allure-karate/build/allure-results \\\n  --expect-tests 1 \\\n  --expect-prefix io.qameta.allure.karate. \\\n  -- ./gradlew --no-daemon :allure-karate:cleanTest :allure-karate:test \\\n  --tests io.qameta.allure.karate.AllureKarateGlobalErrorsTest.shouldReportOnlyFeatureHookFailuresAsGlobals\n```\n\nOpen the generated agent `index.md`, then inspect the test's attached inner Karate `TestResult` and globals payloads.\n\n**Important:** the existing outer JUnit test checks global-error scoping and therefore passes. It does not assert that the inner scenario's teardown failure is reported correctly.\n\n### Actual behavior\n\nThe captured Allure scenario result has these relevant fields:\n\n```json\n{\n  \"name\": \"Scenario with both cleanup hooks\",\n  \"status\": \"passed\"\n}\n```\n\nThere are no status details or failed teardown steps for `scenario cleanup failed`. The configuration steps and the ordinary `match` step are reported as passed.\n\nThe separate `afterFeature` exception is correctly present in globals as `feature cleanup failed`. It is included in the reproducer to demonstrate the distinction between scenario-scoped and feature-scoped cleanup failures.\n\n### Expected behavior\n\n- A failing `afterScenario` hook must be associated with its own scenario and produce an appropriate non-passing outcome, with its exception details available in the report.\n- If the scenario body also fails, the primary failure and the additional cleanup failure should both remain visible.\n- Per-scenario hook failures must not be converted into framework-wide global errors.\n- Shared `afterFeature` and `afterScenarioOutline` failures must remain separate from the scenario outcome.\n\n### Investigation\n\nIn Karate 2.1.2, the relevant order in `ScenarioRuntime.call()` is:\n\n1. Emit `SCENARIO_EXIT`.\n2. Enter the `finally` block.\n3. Invoke `afterScenario` and append its hook result, including any exception.\n\nIn [`AllureKarate.afterScenario()`](https://github.com/allure-framework/allure-java/blob/813f4b90b5e8a06865473af8bea5721900e1bfd6/allure-karate/src/main/java/io/qameta/allure/karate/AllureKarate.java#L284-L329), the adapter removes the scenario context, reads the outcome, and calls `stopTest` and `writeTest` while handling step 1. The later hook failure therefore arrives after the Allure result has been finalized.\n\nThe feature-completion global-error handling intentionally excludes per-scenario hook results. That is the correct scope distinction, but it does not repair the premature scenario finalization.\n\nA fix needs a completion point after scenario teardown, while still separating shared-hook errors from scenario errors. Merely copying the final Karate scenario status at feature completion would also be unsafe, because Karate appends shared-hook failures to scenario results too.\n\nRegression coverage should include a passing body with failing teardown, a failing body with failing teardown, report suppression (including suppressed callees), and parallel/nested execution. Any hook logs or attachments should also be checked when changing the completion boundary.\n\n### What Allure Integration are you using?\n\nallure-karate\n\n### What version of Allure Integration you are using?\n\n3.1-SNAPSHOT, development revision `813f4b90b5e8a06865473af8bea5721900e1bfd6`, with `io.karatelabs:karate-core:2.1.2`. Observed using JDK 25. This report does not claim that every released adapter version is affected.\n\n### What version of Allure Report you are using?\n\n3.17.0. The incorrect outcome is already present in the captured Allure result JSON, before report rendering.\n\n### Duplicate check\n\nSearched open and closed issues for Karate, `afterScenario`, `SCENARIO_EXIT`, and hook/status symptoms. No matching report of this lifecycle-ordering problem was found.\n\n### Code of Conduct\n\n- [x] I agree to follow this project's Code of Conduct\n","author":{"url":"https://github.com/andrcuns","@type":"Person","name":"andrcuns"},"datePublished":"2026-09-18T14:39:15Z","url":"https://github.com/allure-framework/allure-java/issues/1446"}

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:00851a2b-42f1-de60-0529-8194f76ea39a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD56C:9905:39EA9:51C27:6AFD481E
html-safe-nonce8ff64acb1b1d8e7fb83f5d13169dd02873cb0c2fdbc87efbe6ad4915e36091b5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTZDOjk5MDU6MzlFQTk6NTFDMjc6NkFGRDQ4MUUiLCJ2aXNpdG9yX2lkIjoiMjMwOTgxNTYwNTYyNDM2MTI2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaccd7e6b4d8cd8e79bb24484fea4722136f598ceb19c587ac9cabb9bf7ebf8827f
hovercard-subject-tagissue:5500866750
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/1446/issue_layout
twitter:imagehttps://opengraph.githubassets.com/21a8bfbe56d4133141ab4a217d3e58792eef292b1262df353d333a8102f2ebf1/allure-framework/allure-java/issues/1446
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/21a8bfbe56d4133141ab4a217d3e58792eef292b1262df353d333a8102f2ebf1/allure-framework/allure-java/issues/1446
og:image:altWhat happened? A Karate scenario with a passing body and a failing configure afterScenario hook can be reported by Allure as passed, without status details or a reported teardown failure. The hook ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameandrcuns
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/1446#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fallure-framework%2Fallure-java%2Fissues%2F1446
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%2F1446
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/1446
Reloadhttps://github.com/allure-framework/allure-java/issues/1446
Reloadhttps://github.com/allure-framework/allure-java/issues/1446
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/1446
New issuehttps://github.com/login?return_to=https://github.com/allure-framework/allure-java/issues/1446
Bughttps://github.com/allure-framework/allure-java/issues?q=type:"Bug"
allure-karate: afterScenario hook failures can leave scenarios reported as passedhttps://github.com/allure-framework/allure-java/issues/1446#top
https://github.com/andrcuns
andrcunshttps://github.com/andrcuns
on Sep 18, 2026https://github.com/allure-framework/allure-java/issues/1446#issue-5500866750
reproduction featurehttps://github.com/allure-framework/allure-java/blob/813f4b90b5e8a06865473af8bea5721900e1bfd6/allure-karate/src/test/resources/testdata/global-errors/scenario-and-feature-hooks-failure.feature
AllureKarate.afterScenario()https://github.com/allure-framework/allure-java/blob/813f4b90b5e8a06865473af8bea5721900e1bfd6/allure-karate/src/main/java/io/qameta/allure/karate/AllureKarate.java#L284-L329
andrcunshttps://github.com/andrcuns
Bughttps://github.com/allure-framework/allure-java/issues?q=type:"Bug"
on Sep 18, 2026https://github.com/allure-framework/allure-java/issues/1446#event-31396681908
Sign up for freehttps://github.com/signup?return_to=https://github.com/allure-framework/allure-java/issues/1446
Sign in to commenthttps://github.com/login?return_to=https://github.com/allure-framework/allure-java/issues/1446
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.