@qa-guru/allure-notifications-plugin
v6.2.2
Published
Allure 3 plugin — thin wrapper over core + CLI messengers (Phase 5).
Maintainers
Readme
@qa-guru/allure-notifications-plugin
Allure 3 plugin for line 6.0.* — thin wrapper over @qa-guru/allure-notifications-core + CLI messengers.
Runs in the Allure 3 done hook (etalon: @allurereport/plugin-slack). Same collage + messenger pipeline as the CLI; CLI remains the primary consumer path.
Install
npm add allure @qa-guru/allure-notifications-plugin
# workspace: already in pnpm packages/pluginnpm:
@qa-guru/allure-notifications-plugin— use ≥6.0.9 (mainentry required for Allure resolve; skip 6.0.6). Workspacepackages/pluginfor monorepo dogfood.
allurerc
Full copy-paste example: examples/allurerc.notifications.mjs.
GitHub Actions (plugin path): examples/github-actions/ — copy-paste plugin-notify.yml; runnable dogfood .github/workflows/example-plugin-notify.yml.
import { defineConfig } from "allure";
export default defineConfig({
name: "Allure Report",
output: "./allure-report",
plugins: {
awesome: {},
notifications: {
import: "@qa-guru/allure-notifications-plugin",
options: {
// Same JSON schema as: npx allure-notifications send --config …
config: "./config/notifications.json",
mode: "dry-run", // "dry-run" | "mock" | "live" — default dry-run
// out: "./collage.png",
},
},
},
});npx allure generate ./allure-results -o ./allure-report
npx allure generate ./allure-results --config ./examples/allurerc.notifications.mjsGenerate twice for plugin path: Allure calls
donebeforesummary.jsonis on disk. First generate writes the report; second generate (withallurerc) lets the plugin read it. Prefer CLIsendwhen you only need a post-step. GH example:examples/github-actions/.
Options
| Option | Type | Default | Role |
|--------|------|---------|------|
| config | string \| object | required | Path to config.json (cwd-relative) or inline object — same schema as CLI send --config |
| mode | "dry-run" \| "mock" \| "live" | dry-run | Messenger delivery mode (see below) |
| out | string | — | Write collage PNG to disk |
| allureFolder | string | context.output if unset in config | Report dir for summary.json |
| allureResultsFolder | string | from config | Results for analytics |
| reportFile | string \| false | allure-notifications-collage.png | Attach PNG into the report; false to skip |
Pipeline in done: parseConfig → loadReportAnalytics / renderCollagePng (core, @napi-rs/canvas) → deliver (CLI messengers). No network unless mode: "live".
dry-run vs live (and CLI)
| Path | Safe default | Live Telegram |
|------|--------------|---------------|
| CLI (primary) | npx allure-notifications send --config … --dry-run | explicit --live + TELEGRAM_* |
| Plugin (alternate) | mode: "dry-run" (default) | mode: "live" + same env |
| mode | Behavior |
|--------|----------|
| dry-run | Render PNG; list messengers that would send; no network |
| mock | Render PNG; record mock deliveries; no network |
| live | Live Telegram sendPhoto (ADR 008); needs TELEGRAM_BOT_TOKEN / TELEGRAM_CHAT_ID / TELEGRAM_TOPIC_ID |
Equivalent CLI:
# after allure generate (no plugin)
npx allure-notifications send --config ./config/notifications.json --dry-run
npx allure-notifications send --config ./config/notifications.json --liveDogfood / credentials: docs/telegram-dogfood.md. CI cookbook: docs/ci-cookbook.md.
Verify
pnpm --filter @qa-guru/allure-notifications-plugin test
pnpm --filter @qa-guru/allure-notifications-plugin typecheck