This a pet project to test Playwright Java features.
It comes with integration with the Allure Framework for basic reporting
Clone the project
git clone git@github.com:mikomatic/playwright-demo.git
Go to the project directory
cd playwright-demo
Run maven and allure plugin
# "clean test" & "allure:report" goals can be done separately
./mvnw clean test allure:report
Playwright tests should be launched and report generated at target/site/allure-maven-plugin
.
You can also serve the report directly via the command
# "clean test" & "allure:serve" goals can be done separately
./mvnw clean test allure:serve
A specific test TracingTest.java
showcases how to record a trace.
It should be available by running the command:
mvn exec:java -e "-Dexec.mainClass=com.microsoft.playwright.CLI" "-Dexec.args=show-trace target/trace.zip"`
Or by uploading the file target/trace.zip
to https://trace.playwright.dev (only Chrome/Chromium compatible it seems)
The generated report is also available as a github page https://mikomatic.github.io/playwright-demo/