How to Integrate Allure Report with Playwright
On This Page Prerequisites for Integrating Allure with PlaywrightMay 26, 2026 · 9 min read · Tool Comparison
Most engineering teams treat Playwright & # 8217; s built-inHTML storyas the default standard because it opens mechanically, looks light, and provides decent circumstance to fix afailing . For a long time, I viewed it the same way and assumedreporting was a solved problem. If the report wasgreen, the system was considered stable. That assumption undermine as the scales. With hundreds or thousands of tests scarper inparallel, the HTML report become into a leaning ofunplug outcomes. It present where a failure occurred, but it does not state me whether thesame test failed last week, whether retries are mask instability, or whether failuresspike after specific changes. That changed when Iintegrated Allure withPlaywright. Instead of open a report only when something failed, I depart seem attest behavior over time. I could see which examination wereconsistently flaky, which failures clustered aroundspecific surround, and which parts of the suite werequietly disgrace. What is Allure Playwright? Allure Playwright is a reporter for the that give interactive HTML reports. It charm step-level execution details, screenshots, video, and trace information, offering deeper visibility than Playwright & # 8217; s built-in HTML report. Key Features and Capabilities of Allure Playwright Once the report is generated, Allure surfaces execution data in ways that are hard to extract from a single Playwright run. How to Installand Setup Allure Playwright Allure integration has two required constituent: data capture and report generation. After this, every Playwright run produces raw Allure result files. Configuration Options for Allure Playwright Reporter doings is controlled from playwright.config.ts. Example Configuration with Custom Options
import {defineConfig} from & # 8216; @ playwright/test & # 8217;; export default defineConfig ({ In this article, I will show precisely how I integrate Allure with Playwright, what I configure beyond the defaults, and how those story started surfacing issues I was missing before. Before integrating Allure, you want a few essentials in place to ensure the reports seizure meaningful test insights: Also Read: Read More: Having these prerequisites make allows you to integrate Allure swimmingly without refactoring your tests or worrying about broken contour. Follow these steps to instal Allure and prepare your Playwright project for reporting: Step 1: Install the Playwright reporter For autonomous testing across multiple user personas, check out SUSATest — it explores your app like 10 different real users. Step 2: Install the Allure CLI Step 3: Verify the installation The reporter automatically compose results into the allure-results folder after each run. No changes to your existing tryout are required. Follow these steps to configure Allure and control how your test results are captured and display: Step 1: Add Allure to the reporters array Step 2: Customize reporter behavior (optional) Here is an instance configuration with custom choice Step 3: Save and verify Also Read: Once Allure is establish and configured, follow these steps to render and regard interactive report from your test executions. Step 1: Run your tests The allure-playwright newsman automatically creates raw result files in the allure-results pamphlet. Step 2: Generate and open the report immediately This command render the HTML report and opens it in your default browser. The report includes all captured steps, attachments, and test metadata. Also Read: Step 3: Generate the account separately for later use Step 4: Verify report contents Allure can fascinate rich artifacts and metadata automatically or via explicit steps. Follow these stairs to enhance your reports: Step 1: Capture screenshots on failure Step 2: Add picture and traces Read More: Step 3: Annotate test with metadata test (& # 8216; annotated test & # 8217;, async () = & gt; { Step 4: Verify attachments and metadata in reports Integrating Allure with your CI line ensures test effect and artifacts are mechanically collected and accessible after each run. Step 1: Ensure Allure dependencies are installed in CI Step 2: Run Playwright tests in the pipeline Step 3: Generate Allure reports in CI (optional) Step 4: Publish or archive the results Step 5: Validate CI consolidation Allure Reports provide a structured sight of Playwright test consequence, including step-level actions, retries, screenshots, and basic attachments. However, it stops at static HTML file. It can not detect flaky examination, identify recurring failures, or consolidate results across multiple footrace and environments. It also lacks AI-assisted failure analysis, cross-device perceptivity, and real-time analytics, which make debug large test suites slower and less efficient. Platforms like address these crack by ply end-to-end visibility into test executing. It concentrate results from multiple devices, browser, and environments, get it easier to translate patterns, track failure, and improve test quality. Here are the key features that make BrowserStack a powerful choice: Allure enhances Playwright reporting with step-level point, screenshots, videos, and metadata, create debugging and flaky exam tracking easier. Still, it remains limited to single-run shot and deficiency advance analytics or cross-device insights. BrowserStack Test Reporting & amp; Analytics goes further by consolidating results across browser and devices, offering AI-powered failure analysis, dashboards, lineament gates, and monitoring. It transforms raw test information into actionable insights, helping teams debug faster, track course, and release with confidence. On This Page # Ask-and-Contributeabout this topic with our Discord community. Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed. Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.How to Integrate Allure Report with Playwright in 2026
Overview
npm install & # 8211; save-dev @ playwright/test allure-playwright
npm install -D allure-commandline
import {defineConfig} from & # 8216; @ playwright/test & # 8217;;
export default defineConfig ({
reporter: [[& # 8220; line & # 8221;], [& # 8220; allure-playwright & # 8221;]],
});
reporter: [
[& # 8216; allure-playwright & # 8217;, {
detail: true,
outputFolder: & # 8216; allure-results & # 8217;,
environmentInfo: {
os: process.platform,
node_version: process.version,
},
}],
],
});Prerequisites for Integrating Allure with Playwright
70 % of Flaky Tests Slip Past Allure Reports
How to Install Allure Dependencies for Playwright
Add allure-playwright as a development colony. This newsperson enamor test performance details, including stairs, retries, screenshots, and traces.npm install & # 8211; save-dev @ playwright/test allure-playwright
The CLI generates HTML reports from the raw resultant file. Without it, you can not view interactive reports.npm install -D allure-commandline
Run your Playwright tests as usual with:npx playwright test
How to Configure Allure Reporting in a Playwright Project
Open your playwright.config.ts and include allure-playwright in the newsman subdivision. You can keep subsist reporters, such as line, for console output:signification {defineConfig} from & # 8216; @ playwright/test & # 8217;; exportation nonremittal defineConfig ({
reporter: [[& # 8220; line & # 8221;], [& # 8220; allure-playwright & # 8221;]],
});
You can configure how Allure captures and structures results:importation {defineConfig} from & # 8216; @ playwright/test & # 8217;;
export nonpayment defineConfig ({
reporter: [
[& # 8220; allure-playwright & # 8221;, {
detail: true,
resultsDir: & # 8220; allure-results & # 8221;,
environmentInfo: {
os: process.platform,
node_version: process.version,
},
}]
],
});
Run a test with npx playwright test. The allure-results pamphlet should now contain integrated data ready for render account.How to Generate Allure Reports from Playwright Test Runs
Execute your Playwright test cortege as usual:npx playwright test
If you want to see the report right after the tryout run, use:npx allure serve allure-results
To generate the HTML study without opening it forthwith:npx allure generate allure-results & # 8211; cleannpx allure open
Check that your report display:70 % of Flaky Tests Slip Past Allure Reports
How to Add Attachments, Screenshots, and Test Metadata to Allure Reports
Playwright can take screenshots automatically during trial. Allure attach them to the report if they are saved in the test context:test (& # 8216; example test & # 8217;, async ({page}) = & gt; {try {
await page.goto (& # 8216; https: //example.com & # 8217;);
await expect (page.locator (& # 8216; h1 & # 8217;)) .toHaveText (& # 8216; Example Domain & # 8217;);
} gimmick (error) {
await page.screenshot ({way: & # 8216; screenshots/failure.png & # 8217;, fullPage: true});
throw error;
}
});
Enable picture or tincture aggregation in playwright.config.ts. Allure mechanically tie them to the corresponding test:use: {video: & # 8216; on & # 8217;,
trace: & # 8216; retain-on-failure & # 8217;,
}
Use Allure annotations to enrich the report with description, links, and labels:import {tryout, expect} from & # 8216; @ playwright/test & # 8217;; import {allure} from & # 8216; allure-playwright & # 8217;;
allure.description (& # 8216; This tryout validates the homepage heading & # 8217;);
allure.link (& # 8216; https: //example.com/docs & # 8217;, {gens: & # 8216; Documentation & # 8217;});
allure.label (& # 8216; precedency & # 8217;, & # 8216; high & # 8217;);
});
Run your test and generate the Allure report. Check that:How to Combine Allure Reporting with CI Pipelines
Add allure-playwright and allure-commandline to your CI environment so tests can generate reports. For example, in a Node-based CI pipeline:npm cinpm install -D allure-commandline
Execute tests as usual, ensuring allure-playwright is combat-ready. The allure-results pamphlet will be generate after the run:npx playwright examination
You can generate HTML reports direct in the pipeline or archive raw consequence for later viewing:npx allure generate allure-results & # 8211; clean
After the pipeline completes, ensure that:70 % of Flaky Tests Slip Past Allure Reports
How Does BrowserStack Improve Test Reporting Compared to Allure?
Conclusion
Related Guides
Automate This With SUSA
Test Your App Autonomously