{"id":16376760,"url":"https://github.com/mfaisalkhatri/api-testing-playwright-java-testng","last_synced_at":"2025-03-16T15:33:57.216Z","repository":{"id":113514629,"uuid":"607659381","full_name":"mfaisalkhatri/api-testing-playwright-java-testng","owner":"mfaisalkhatri","description":"This repository has example codes related to API Testing using Playwright with Java and TestNG.","archived":false,"fork":false,"pushed_at":"2024-10-09T09:11:56.000Z","size":57,"stargazers_count":24,"open_issues_count":0,"forks_count":16,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-10-12T03:26:02.162Z","etag":null,"topics":["api-testing","hacktoberfest","java","playwright","rest-api","testautomation","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mfaisalkhatri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-28T12:29:00.000Z","updated_at":"2024-10-11T13:41:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8369a80-3221-4a26-b8d3-707fcb5f71b0","html_url":"https://github.com/mfaisalkhatri/api-testing-playwright-java-testng","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfaisalkhatri%2Fapi-testing-playwright-java-testng","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfaisalkhatri%2Fapi-testing-playwright-java-testng/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfaisalkhatri%2Fapi-testing-playwright-java-testng/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfaisalkhatri%2Fapi-testing-playwright-java-testng/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfaisalkhatri","download_url":"https://codeload.github.com/mfaisalkhatri/api-testing-playwright-java-testng/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221665670,"owners_count":16860295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-testing","hacktoberfest","java","playwright","rest-api","testautomation","tutorial"],"created_at":"2024-10-11T03:26:03.627Z","updated_at":"2024-10-27T10:52:49.707Z","avatar_url":"https://github.com/mfaisalkhatri.png","language":"Java","readme":"![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Java CI with Maven](https://github.com/mfaisalkhatri/api-testing-playwright-java-testng/actions/workflows/maven.yml/badge.svg)](https://github.com/mfaisalkhatri/api-testing-playwright-java-testng/actions/workflows/maven.yml)\n\n## Don't forget to give a :star: to make the project popular.\n\n## :question: What is this Repository about?\n\nThis project is the outcome of my self-learning about the API Testing Automation framework - [Playwright with Java](https://playwright.dev/java/docs/api-testing#writing-api-test)\n\n## :briefcase: What does this repo contain?\n- This repo contains example codes of API Tests using Playwright with Java.\n- [TestNG](https://testng.org) is used as Test Runner and for performing assertions in the test.\n- `Log4j` is used to capture logs.\n- [Lombok](https://projectlombok.org/) has been used to generate Getter and Setters automatically for post body requests.\n- FAKE Rest APIs on [Reqres.in](https://reqres.in/) has been used for testing.\n- End to End scenarios have been added for the [restful booker APIs](https://restful-booker.herokuapp.com/apidoc/index.html).\n- Happy and Sad Path Scenarios have been added for the [restful-ecommerce APIs](https://github.com/mfaisalkhatri/restful-ecommerce)\n\n## :hammer_and_wrench: Talking more about the Scenarios Covered in this project:\nYou will get the answers to the following questions and its respective working code example with [Playwright Java](https://playwright.dev/java/docs/api-testing#writing-api-test) framework in this repository:\n- How to write tests for `GET` requests?\n- How to write tests for `POST` requests?\n- How to write tests for `PUT` requests?\n- How to write tests for `PATCH` requests?\n- How to write tests for `DELETE` requests?\n- How to handle the `authentication` requests?\n- How to verify the Response Body?\n- How to verify the Response Status Code?\n- How to extract value from Response Body?\n- How to create `POJO` for passing values to request body?\n- How to use `Lombok` to generate `Getters` and `Setters`?\n- How to use `Lombok` for writing the builder pattern code?\n- How to use Builder Pattern for test data generation using [Data Faker](https://github.com/datafaker-net/datafaker)?\n- How to write end-to-end api tests?\n- How to write Happy Path scenarios for the APIs?\n- How to write Sad Path scenarios for the APIs? \n- How to log the Response ?\n\n## :writing_hand: Blog Links\n- [What is API Testing?](https://mfaisalkhatri.github.io/2020/08/08/apitesting/)\n- [How to perform End to End API Testing using Playwright with Java and TestNG](https://medium.com/@iamfaisalkhatri/how-to-perform-end-to-end-api-testing-using-playwright-with-java-and-testng-26b318927115)\n- [Playwright Java API Testing | How to test POST requests?](https://medium.com/@iamfaisalkhatri/playwright-java-api-testing-how-to-test-post-requests-4c9102d3ab03)\n- [Playwright Java API Testing | How to test GET requests?](https://medium.com/@iamfaisalkhatri/playwright-java-api-testing-how-to-test-get-requests-c036b984cc6d)\n- [Playwright Java API Testing | How to test PUT requests?](https://medium.com/@iamfaisalkhatri/playwright-java-api-testing-how-to-test-put-requests-d6b1d054d64b)\n- [Playwright Java API Testing | How to test PATCH requests?](https://medium.com/@iamfaisalkhatri/playwright-java-api-testing-how-to-test-patch-requests-f6b0867d91e7)\n- [Playwright Java API Testing | How to test DELETE requests?](https://medium.com/@iamfaisalkhatri/playwright-java-api-testing-how-to-test-delete-requests-2ff77feb0383)\n\n## :question: Need Assistance?\n\n- Discuss your queries by writing to me @ `mohammadfaisalkhatri@gmail.com`\n  OR ping me on any of the social media sites using the below link:\n   - [Linktree](https://linktr.ee/faisalkhatri)\n\n## :computer: Paid Trainings\n\nContact me for Paid trainings related to Test Automation and Software Testing, \nmail me @ `mohammadfaisalkhatri@gmail.com` or ping me on [LinkedIn](https://www.linkedin.com/in/faisalkhatri/)\n\n## :thought_balloon: Checkout the blogs related to Testing on [my website](https://mfaisalkhatri.github.io) and [medium](https://medium.com/@iamfaisalkhatri)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfaisalkhatri%2Fapi-testing-playwright-java-testng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfaisalkhatri%2Fapi-testing-playwright-java-testng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfaisalkhatri%2Fapi-testing-playwright-java-testng/lists"}