How to generate Allure HTML report using playwright/test runner?

Install

npm i -D @playwright/test allure-playwright

Run

npx playwright test --reporter=line,allure-playwright
allure generate ./allure-result --clean
allure open ./allure-report

or

// playwright.config.ts
import { PlaywrightTestConfig } from '@playwright/test';

const config: PlaywrightTestConfig = {
  reporter: 'allure-playwright',
};
export default config;

You can specify target folder using ALLURE_RESULTS_DIR environment variable. e.g.

ALLURE_RESULTS_DIR=my-allure-results npx playwright test --reporter=line,allure-playwright

For more information, see here: https://github.com/allure-framework/allure-js/blob/master/packages/allure-playwright/README.md