Udemy Playwright: Web Automation Testing From Zero to Hero: Difference between revisions
Jump to navigation
Jump to search
Udemy Playwright: Web Automation Testing From Zero to Hero (view source)
Revision as of 04:43, 12 June 2024
, 12 June→Reporting
m (→Reporting) |
|||
Line 1,991: | Line 1,991: | ||
=== Reporting === | === Reporting === | ||
Configure reporters in <code>playwright.config.ts</code> as per | |||
<nowiki> | |||
... | |||
export default defineConfig<TestOptions>({ | |||
... | |||
reporter: [ | |||
["json", { outputFile: "test-results/jsonReport.json" }], | |||
["junit", { outputFile: "test-results/junitReport.xml" }], | |||
['allure-playwright'] | |||
], | |||
...</nowiki> | |||
==== Allure ==== | |||
Setup for windows | |||
* [https://www.java.com/en/download/ java download] (FYI: I did not need to set JAVA_HOME) | |||
* [https://scoop.sh/ Scoop] | |||
<nowiki> | |||
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser | |||
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression</nowiki> | |||
* [https://allurereport.org/docs/install-for-windows/ Allure report install for windows] | |||
<nowiki>scoop install allure</nowiki> | |||
* [https://www.npmjs.com/package/allure-playwright/v/2.15.1 npm:allure-playwright] | |||
<nowiki> | |||
npm i -D @playwright/test allure-playwright --force</nowiki> | |||
Now you can run some tests followed by | |||
<nowiki> | |||
allure generate allure-results -o allure-report --clean | |||
allure open allure-report</nowiki> | |||
Don't forget to add <code>allure-results</code> and <code>allure-report</code> to <code>.gitignore</code> | |||
Allure looks cool but also looks like a bit of a learning curve ... | |||
=== Visual Testing === | === Visual Testing === | ||
=== Playwright with Docker Container === | === Playwright with Docker Container === | ||
=== Github Actions and Argos CI === | === Github Actions and Argos CI === |