Skip to content

Show passed quality gate rules in the report (fixes #806) - #928

Open
d-braun wants to merge 4 commits into
allure-framework:mainfrom
d-braun:feat/806-quality-gate-show-passed-rules
Open

Show passed quality gate rules in the report (fixes #806)#928
d-braun wants to merge 4 commits into
allure-framework:mainfrom
d-braun:feat/806-quality-gate-show-passed-rules

Conversation

@d-braun

@d-braun d-braun commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Context

Fixes #806.

The Quality Gate tab only ever showed failed rules. A run that passed every rule rendered
"No quality gate results available", which reads as if no quality gate was configured at all, and a
run with one failing rule out of many hid the rules that were validated successfully. Report readers
had no way to see which quality criteria were actually evaluated.

QualityGate.validate() dropped passed rules with an early continue, so they never reached the
store and never made it into widgets/quality-gate.json. This changes the validation to report every
evaluated rule and makes the report render passed and failed rules side by side.

Core (@allurereport/core, @allurereport/plugin-api)

  • QualityGate.validate() now returns every evaluated rule, each carrying its success flag.
    fastFail still triggers on failures only.
  • New filterFailedQualityGateResults() helper. stringifyQualityGateResults() and
    convertQualityGateResultsToTestErrors() filter internally, so terminal output and test errors keep
    reporting failures only.
  • QualityGateRule gained an optional successMessage. All built-in rules provide one; custom rules
    without it fall back to a generic message.

CLI (allure)

  • The exit code of allure quality-gate and allure run is now derived from the number of failed
    rules instead of the length of the result list. Passed rules are sent to the report but are not
    printed to the terminal.

Report (@allurereport/web-awesome)

  • Passed rules render with a green check icon and a green "Success" block; failed rules are unchanged.
  • TrError accepts an optional title so the block header can read "Success" instead of "Error".
  • The tab counter keeps its previous meaning and counts failed rules only, so it stays red only when
    something actually failed, while the tab itself lists every evaluated rule.
  • Added the ui.success key to all 21 locales.

No changes to the shape of widgets/quality-gate.json beyond the additional entries: passed rules
appear as regular entries with "success": true, so existing consumers keep working.

Checklist

Bildschirmfoto 2026-09-03 um 13 39 05 Bildschirmfoto 2026-09-03 um 13 39 13

Resolve the conflict in ReportQualityGateResults: keep the upstream rename of
AwesomeQualityGateValidationResult to ReportQualityGateValidationResult and the
useI18n("ui") hook the passed-rule "Success" header needs.
Konflikte in der Quality-Gate-Logik aufgelöst:
- QualityGateRule: `successMessage` uebernommen und auf den neuen
  generischen `actual: K` aus main umgestellt
- allTestsContainEnv: numerisches `actual` per String() formatiert,
  successMessage beibehalten
- Tests: beide neuen describe-Bloecke (success messages, metric rules)
  vereinigt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quality Gate - Show Passed Rules

1 participant