<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: avin singhal</title>
    <description>The latest articles on DEV Community by avin singhal (@avin_singhal).</description>
    <link>https://dev.to/avin_singhal</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2802128%2F87d9ae8b-e08b-4835-ae6b-37cc002f8b70.png</url>
      <title>DEV Community: avin singhal</title>
      <link>https://dev.to/avin_singhal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/avin_singhal"/>
    <language>en</language>
    <item>
      <title>Powerful Reporting with Allure + Playwright</title>
      <dc:creator>avin singhal</dc:creator>
      <pubDate>Sat, 26 Apr 2025 17:14:44 +0000</pubDate>
      <link>https://dev.to/avin_singhal/powerful-reporting-with-allure-playwright-4o9d</link>
      <guid>https://dev.to/avin_singhal/powerful-reporting-with-allure-playwright-4o9d</guid>
      <description>&lt;p&gt;Tired of staring at plain console logs after test execution?&lt;/p&gt;

&lt;p&gt;Upgrade your test reporting with Allure + Playwright for visual, structured, and insightful results!&lt;/p&gt;

&lt;p&gt;I recently integrated Allure Reports with Playwright, and the outcome is impressive—especially for both UI and API automation&lt;/p&gt;

&lt;h2&gt;
  
  
  ✅ Get Started with These Prerequisites
&lt;/h2&gt;

&lt;p&gt;Add the following devDependencies to your package.json:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"@playwright/test": "^1.51.1",&lt;br&gt;
"@types/node": "^22.14.0",&lt;br&gt;
"allure-commandline": "^2.33.0",&lt;br&gt;
"allure-js": "^0.0.1-security",&lt;br&gt;
"allure-js-commons": "^3.2.1",&lt;br&gt;
"allure-playwright": "^3.2.1"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In your playwright.config.ts or playwright.config.js, include:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;reporters: [&lt;br&gt;
 ['list'],&lt;br&gt;
 ['allure-playwright']&lt;br&gt;
]&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Configure Allure CLI globally if needed:&lt;br&gt;
&lt;code&gt;npm install -g allure-commandline --save-dev&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧪 Sample Test File with Allure Integration&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  ./e2e/allure-test.sepc.js
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { test } = require('@playwright/test')
import * as allure from "allure-js-commons";

test.describe('Allure Integration Example', () =&amp;gt; {
 test('Login functionality test', async ({ page }) =&amp;gt; {
 allure.owner('Automation User');
 allure.epic('User Authentication');
 allure.feature('Login Feature');
 allure.story('Valid Login Test');
 allure.severity('critical');
 allure.tag('smoke', 'login');
 allure.description('This test validates successful login with valid credentials');
 allure.testCaseId('TC-LOGIN-001');
 await allure.step('Open Login Page', async () =&amp;gt; {
 await page.goto('https://example.com/login');
 await expect(page).toHaveTitle(/Login/);
 });
 await allure.step('Enter credentials', async () =&amp;gt; {
 await page.fill('hashtag#username', 'testuser');
 await page.fill('hashtag#password', 'Password123');
 await page.click('button[type="submit"]');
 });

 await allure.step('Validate dashboard redirection', async () =&amp;gt; {
 await expect(page).toHaveURL(/dashboard/);
 const screenshot = await page.screenshot();
 allure.attachment('Dashboard Screenshot', screenshot, 'image/png');
 });
 });
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📸 Generate and View the Report
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx playwright test
allure generate --single-file allure-results --clean -o ./allure-reports
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Then open: ./allure-reports/index.html&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>playwright</category>
      <category>allure</category>
      <category>automation</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
