Setup Allure Report
1. Make sure Allure Report is installed. If it's not, follow the installation [instructions(https://allurereport.org/docs/install/). Note that Allure Report requires Java.
Install the Allure Playwright adapter and make sure that the Playwright framework itself is also listed in the project's dependencies.
npm install --save-dev @playwright/test allure-playwright
In the
playwright.config.ts
file, add Allure Playwright as a reporter.
export default defineConfig({
// ...
reporter: [["line"], ["allure-playwright"]],
});
Run Test
npx playwright test
Finally, run Allure to convert the test results into an HTML report. This will automatically open your browser to view the report.
allure serve allure-results
Last updated