Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

allure-playwright

Package Overview
Dependencies
Maintainers
3
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

allure-playwright

Allure Playwright integration

  • 3.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
380K
decreased by-4.45%
Maintainers
3
Weekly downloads
 
Created

What is allure-playwright?

The allure-playwright package integrates Allure reporting capabilities with Playwright, a popular end-to-end testing framework. It allows you to generate detailed and visually appealing test reports, capturing various aspects of your test execution such as steps, attachments, and test results.

What are allure-playwright's main functionalities?

Generate Allure Reports

This feature allows you to generate Allure reports by annotating your Playwright tests with labels and steps. The code sample demonstrates how to add labels and steps to a basic test.

const { test } = require('@playwright/test');
const { allure } = require('allure-playwright');

test('basic test', async ({ page }) => {
  allure.label('feature', 'Login');
  allure.label('severity', 'critical');
  await page.goto('https://example.com');
  allure.step('Navigate to example.com');
  await page.click('text=Login');
  allure.step('Click on Login button');
  // Add more steps and assertions
});

Attach Screenshots

This feature allows you to attach screenshots to your Allure reports. The code sample demonstrates how to take a screenshot during a test and attach it to the report.

const { test } = require('@playwright/test');
const { allure } = require('allure-playwright');

test('screenshot test', async ({ page }) => {
  await page.goto('https://example.com');
  const screenshot = await page.screenshot();
  allure.attachment('Screenshot', screenshot, 'image/png');
});

Attach Logs

This feature allows you to attach logs to your Allure reports. The code sample demonstrates how to attach log data to the report.

const { test } = require('@playwright/test');
const { allure } = require('allure-playwright');

test('log test', async ({ page }) => {
  await page.goto('https://example.com');
  const logs = 'Some log data';
  allure.attachment('Logs', logs, 'text/plain');
});

Other packages similar to allure-playwright

Keywords

FAQs

Package last updated on 05 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc