microsoft / microsoft/playwright-java
[Feature]: provide test fixtures for TestNG similar to JUnits @UsePlaywright functionality
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 298
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 14
Description
🚀 Feature Request
Please provide test fixtures for TestNG testing framework which would work similarly as in JUnit framework.
This could work similarly to @UsePlaywright, reducing boilerplate code.
In other words a similar funcitonality to Junit one provided here:
https://playwright.dev/java/docs/junit
Example
Example is to use annotation like suggested in : https://playwright.dev/java/docs/junit
@UsePlaywright
public class TestExample {
@Test
void shouldClickButton(Page page) {
page.navigate("data:text/html,<script>var result;</script>Go");
page.locator("button").click();
assertEquals("Clicked", page.evaluate("result"));
}
Motivation
Motivation is a fact that TestNG is also broadly used
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing JUnit @UsePlaywright functionality and the linked Playwright Java JUnit documentation, then identify the corresponding TestNG integration points. Done means TestNG users can apply an equivalent fixture to the provided TestExample pattern with Playwright objects supplied and boilerplate reduced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100