GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — allure-karate: afterScenario hook failures can leave scenarios reported as passed · Issue #1446 · allure-framework/allure-java Open Open Copy link DescriptionWhat happened?A Karate scenario with a passing body and a failing The 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. Steps to reproduceThe repository already contains this reproduction feature: Feature: Scenario and feature cleanup failures Background: * configure afterScenario = function(){ throw new Error('scenario cleanup failed') } * configure afterFeature = function(){ throw new Error('feature cleanup failed') } Scenario: Scenario with both cleanup hooks * match 1 == 1 Run the existing test through Allure agent mode: npx --yes [email protected] agent --report off \ --results-dir allure-karate/build/allure-results \ --expect-tests 1 \ --expect-prefix io.qameta.allure.karate. \ -- ./gradlew --no-daemon :allure-karate:cleanTest :allure-karate:test \ --tests io.qameta.allure.karate.AllureKarateGlobalErrorsTest.shouldReportOnlyFeatureHookFailuresAsGlobals Open the generated agent 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. Actual behaviorThe captured Allure scenario result has these relevant fields: {
"name": "Scenario with both cleanup hooks",
"status": "passed"
}There are no status details or failed teardown steps for The separate Expected behavior
InvestigationIn Karate 2.1.2, the relevant order in
In The 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. A 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. Regression 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. What Allure Integration are you using?allure-karate What version of Allure Integration you are using?3.1-SNAPSHOT, development revision What version of Allure Report you are using?3.17.0. The incorrect outcome is already present in the captured Allure result JSON, before report rendering. Duplicate checkSearched open and closed issues for Karate, Code of Conduct
ActivityMetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |