Alerts Where Developers Look - 2026-10-22¶
Part of the mainstream-adoption work (Specs & ADRs).
Context¶
A run's results reached people in two places: the dashboard, which someone has to remember to open, and the job summary / pull request comment from the GitHub Action. Tools teams adopt also post to chat, mark failures on the diff, and file flaky tests as work. The testbeats reporter already posted to Slack and Teams, but only counts, on every run, with no failing test names and nothing about what changed.
Decision¶
- One message, built from run history.
qasight/services/run_alerts.pybuilds the alert from the sameRunSummaryasqasight report markdown(failing tests, per-test changes since the previous run) plusnewly_flaky_tests(). It lists new regressions, newly flaky tests, failing tests and fixes, 10 names each. Any recorded run can be sent again. - Two entry points, same code.
slackandteamsreporters send it right afterqasight run(reporters run after the run is recorded, socontext.run_idis set).qasight notify --to slack|teamssends it later, which is what the GitHub Action and any other CI call.testbeatsstays as it was. - Quiet by default.
when: failuresends only for a red run or a newly flaky test;changesends when the result flipped or a test regressed, got fixed or became flaky;alwayssends every run. - "Newly flaky" means this run made it flaky: flaky in the window ending at the run and not in the window ending at the run before. A flaky test is announced once, not on every run.
- Webhook URLs are secrets. They come from
TESTO_SLACK_WEBHOOK_URL/TESTO_TEAMS_WEBHOOK_URLor a${env:…}reporter option, never a CLI flag, and errors never include them. The action takes them asslack-webhook/teams-webhookinputs fed from repository secrets. - Annotations use workflow commands, not the Checks API.
qasight report annotationsprints::error file=…,line=…::lines; GitHub attaches them to the job's check run and shows them on the diff. That needs no token or permission and works on fork pull requests, so the action does it by default. The line is the first stack-trace frame inside the workspace (pytestpath:line:and PythonFile "…", line Nframes), tried against each stage'starget_repobecause runners print paths relative to it. GitHub keeps 10 error annotations per step, so the rest are counted in one notice. - Flaky issues are opt-in action code.
flaky-issues: "true"readsqasight flaky --new --jsonand opens one issue per test, titledFlaky test: <name> (<cycle>)and labelledflaky-test, skipping titles that already have an open issue. It needsissues: write, so it is off by default. Like the comment, it is standard libraryurlliband never changes the step's exit code.
Consequences¶
- Alerts, "newly flaky" and "since the previous run" need history from earlier runs; in CI that means a cached or shared database, the same as the PR comment.
- Annotations only land on a line when the runner writes a stack trace into the Allure results (pytest, Behave). Others are still annotated, just without a file.
- Usage: Command Reference § qasight notify, CI-CD Pipeline Setup.