allure-playwright-java
adds Playwright actions as steps inside
an Allure Report.
- Java 8+
- Playwright 1.18+
-
Configure Allure for your test framework by following the instructions in the Allure documentation.
allure-playwright-java
should work with any test runner but has been tested with JUnit4, Junit5, and TestNG. -
Add
allure-playwright-java
as a dependency.
<dependency>
<groupId>io.github.uchagani</groupId>
<artifactId>allure-playwright-java</artifactId>
<version>LATEST_VERSION</version>
</dependency>
- Run tests as you normally would.
- Run
allure serve
to generate and launch report.
In order to avoid polluting the report, allure-playwright-java
currently only adds steps for action methods. These
include:
Page
methods: "check", "click", "close", "dblclick", "dragAndDrop", "fill", "focus", "goBack", "goForward", "navigate", "hover", "selectOption", "setInputFiles", "type", "uncheck"
Locator
methods: "check", "click", "dblclick", "dragTo", "fill", "focus", "hover", "press", "selectOption", "setInputFiles", "tap", "uncheck"
APIRequestContext methods: "delete", "fetch", "get", "head", "patch", "post", "put"
If you would like steps generated for other classes/methods please create an issue.