$npx -y skills add PramodDutta/qaskills --skill allure-report-generatorConfigure and generate rich Allure test reports with test categorization, historical trends, environment details, and CI/CD integration for comprehensive test visibility
| 1 | # Allure Report Generator |
| 2 | |
| 3 | Allure is an open-source test reporting framework that produces rich, interactive HTML reports from test execution results. Unlike basic test reporters that show pass/fail summaries, Allure provides detailed test categorization, step-by-step execution breakdowns, attachment support for screenshots, logs, and videos, historical trend tracking across builds, and environment metadata. This skill guides AI coding agents through configuring Allure reporters for popular testing frameworks, annotating tests with meaningful metadata, integrating with CI/CD pipelines, and establishing report hosting strategies that give teams comprehensive test visibility. |
| 4 | |
| 5 | ## Core Principles |
| 6 | |
| 7 | 1. **Reports Serve Multiple Audiences**: A good test report provides quick pass/fail summaries for managers, detailed failure analysis for developers, trend data for QA leads, and categorized views for test strategists. Allure's multi-view design supports all these personas from a single report. |
| 8 | |
| 9 | 2. **Annotations Are Documentation**: Test step annotations, severity labels, and feature/story categorization serve as living documentation of test intent. Well-annotated tests in Allure reports communicate what is being tested and why without requiring code access. |
| 10 | |
| 11 | 3. **Attachments Accelerate Debugging**: Screenshots, DOM snapshots, network logs, and video recordings attached to test steps eliminate the need to reproduce failures locally. Every failure should carry sufficient attachments for diagnosis from the report alone. |
| 12 | |
| 13 | 4. **History Reveals Patterns**: A single test run is a snapshot. Historical trend data across builds reveals flaky tests that oscillate between pass and fail, degrading tests with gradually increasing failures, and regression patterns that correlate with specific changes. |
| 14 | |
| 15 | 5. **Categories Group Failures by Root Cause**: Allure categories classify failures by type (product defect, test defect, infrastructure issue) rather than by test name. This grouping accelerates triage by surfacing the most common failure modes across the entire suite. |
| 16 | |
| 17 | 6. **Environment Context Is Non-Negotiable**: Test results without environment information (browser version, OS, API version, deployment target) are incomplete. The same test can produce different results across environments, and the report must capture this context. |
| 18 | |
| 19 | 7. **Reports Must Be Accessible**: Test reports that exist only on a developer's local machine provide no team value. Reports must be published to a shared location where all stakeholders can access them without technical setup. |
| 20 | |
| 21 | ## Project Structure |
| 22 | |
| 23 | ``` |
| 24 | project-root/ |
| 25 | ├── tests/ |
| 26 | │ ├── e2e/ |
| 27 | │ │ ├── checkout.spec.ts |
| 28 | │ │ ├── search.spec.ts |
| 29 | │ │ └── user-management.spec.ts |
| 30 | │ ├── integration/ |
| 31 | │ │ ├── api-orders.test.ts |
| 32 | │ │ └── api-users.test.ts |
| 33 | │ └── fixtures/ |
| 34 | │ └── allure-fixture.ts |
| 35 | ├── allure-results/ # Raw test results (JSON + attachments) |
| 36 | │ ├── *-result.json |
| 37 | │ ├── *-container.json |
| 38 | │ └── *-attachment.* |
| 39 | ├── allure-report/ # Generated HTML report |
| 40 | │ ├── index.html |
| 41 | │ ├── data/ |
| 42 | │ └── widgets/ |
| 43 | ├── config/ |
| 44 | │ ├── playwright.config.ts |
| 45 | │ ├── jest.config.ts |
| 46 | │ ├── allure-categories.json |
| 47 | │ └── allure-environment.properties |
| 48 | ├── scripts/ |
| 49 | │ ├── generate-report.sh |
| 50 | │ ├── publish-report.ts |
| 51 | │ └── setup-history.sh |
| 52 | ├── .github/ |
| 53 | │ └── workflows/ |
| 54 | │ └── test-and-report.yml |
| 55 | └── package.json |
| 56 | ``` |
| 57 | |
| 58 | ## Allure Reporter Setup for Playwright |
| 59 | |
| 60 | ### Installation and Configuration |
| 61 | |
| 62 | ```bash |
| 63 | npm install --save-dev allure-playwright allure-commandline |
| 64 | ``` |
| 65 | |
| 66 | ```typescript |
| 67 | // config/playwright.config.ts |
| 68 | import { defineConfig, devices } from '@playwright/test'; |
| 69 | |
| 70 | export default defineConfig({ |
| 71 | testDir: './tests/e2e', |
| 72 | timeout: 30000, |
| 73 | retries: 1, |
| 74 | |
| 75 | reporter: [ |
| 76 | // Console output for local development |
| 77 | ['list'], |
| 78 | |
| 79 | // Allure reporter for rich reports |
| 80 | [ |
| 81 | 'allure-playwright', |
| 82 | { |
| 83 | detail: true, |
| 84 | outputFolder: 'allure-results', |
| 85 | suiteTitle: true, |
| 86 | |
| 87 | // Attach environment info |
| 88 | environmentInfo: { |
| 89 | 'Node Version': process.version, |
| 90 | OS: process.platform, |
| 91 | 'Test Environment': process.env.TEST_ENV || 'local', |
| 92 | 'Base URL': process.env.BASE_URL || 'http://localhost:3000', |
| 93 | Browser: 'Chromium', |
| 94 | 'Playwright Version': require('@ |