From d8d2fd4ed994d300a09159c7fc7d921a28c64909 Mon Sep 17 00:00:00 2001 From: Mohammad Faisal Khatri Date: Thu, 10 Aug 2023 23:14:27 +0530 Subject: [PATCH] updated readme (#77) * updated readme * updated codeql version to v2 * disabled file upload test --- .github/workflows/codeql-analysis.yml | 32 ++++++++--------- .gitignore | 3 +- README.md | 52 +++++++++++++-------------- test-suite/fileuploadsuite.xml | 4 +-- 4 files changed, 44 insertions(+), 47 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2982da2..87dacb7 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -14,8 +14,8 @@ name: "CodeQL Analysis" on: push: branches: - - master - - issue-* + - master + - issue-* schedule: - cron: '20 16 * * 1' @@ -46,9 +46,9 @@ jobs: java-version: "17" distribution: "temurin" - # Initializes the CodeQL tools for scanning. + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -56,21 +56,21 @@ jobs: # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language - #- run: | - # make bootstrap - # make release + #- run: | + # make bootstrap + # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 \ No newline at end of file + uses: github/codeql-action/analyze@v2 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3100fce..5e25dea 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ /.idea/ /allure-results/ /allure-report/ -/.allure/ \ No newline at end of file +/.allure/ +/*.iml \ No newline at end of file diff --git a/README.md b/README.md index 86ca019..7997ac4 100644 --- a/README.md +++ b/README.md @@ -9,21 +9,26 @@ This project is the outcome of my self-learning about the API Testing Automation framework - Rest-assured. I heard a lot about Rest-Assured and how it made the QA's life easier by helping them to run all the tedious API tests in an efficient way. -Hence, I started learning about the framework and have documented all my learnings in this repository with all +Hence, I started learning about the framework and have documented all my learnings in this repository with all example code from writing basic tests to running end to end API automation tests. ## :briefcase: What does this repo contain? + - This repo contains example codes of API Tests using Rest-Assured. - `Hamcrest Matchers` are used for assertions. -- [TestNG][testng_website] Listeners are used to capture the events in logs. +- [TestNG](https://testng.org) Listeners are used to capture the events in logs. - `Log4j` is used to capture logs. -- [Lombok][Lombok_website] has been used to generate Getter and Setters automatically for post body requests. -- FAKE Rest APIs on [Reqres.in][reqreswebsite] has been used for testing. -- End to End scenarios have been added for the [restful booker APIs][restfulbooker]. +- [Lombok](https://projectlombok.org/) is used to generate Getter and Setters automatically for post body + requests. +- FAKE Rest APIs on [Reqres.in](https://reqres.in/) is used for testing. +- End to End scenarios have been added for + the [restful booker APIs](https://restful-booker.herokuapp.com/apidoc/index.html). ## :hammer_and_wrench: Talking more about the Scenarios Covered in this project: -You will get the answers to the following questions and its respective working code example with rest-assured + +You will get the answers to the following questions and its respective working code example with rest-assured framework in this repository: + - How to write tests for `Get` requests? - How to write tests for `POST` requests? - How to write tests for `PUT` requests? @@ -39,39 +44,30 @@ framework in this repository: - How to create `POJO` for passing values to request body? - How to use `Lombok` to generate `Getters` and `Setters`? - How to use `Lombok` for writing the builder pattern code? -- How to use Builder Pattern for test data generation using [Java Faker][java_faker]? +- How to use Builder Pattern for test data generation using [Data Faker](https://github.com/datafaker-net/datafaker)? - How to write end-to-end api tests? - How to perform `JSON Schema Validation`? ## :writing_hand: Blog Links -- [What is API Testing?][blog_apitesting] -- [End to End API testing using rest-assured][e2eblog] -- [How to perform JSON Schema Validation using Rest-Assured?][jsconschemavalidationblog] -- [API Testing using RestAssured and OkHttp][blog_restassured_okhttp] + +- [What is API Testing?](https://mfaisalkhatri.github.io/2020/08/08/apitesting/) +- [End to End API testing using rest-assured](https://medium.com/@iamfaisalkhatri/end-to-end-api-testing-using-rest-assured-a58c4ea80255) +- [How to perform JSON Schema Validation using Rest-Assured?](https://medium.com/@iamfaisalkhatri/how-to-perform-json-schema-validation-using-rest-assured-64c3b6616a91) +- [API Testing using RestAssured and OkHttp](https://mfaisalkhatri.github.io/2020/05/29/restassuredokhttp/) ## :question: Need Assistance? - Discuss your queries by writing to me @ `mohammadfaisalkhatri@gmail.com` OR ping me on any of the social media sites using the below link: - - [Linktree][linktree] + - [Linktree](https://linktr.ee/faisalkhatri) ## :computer: Paid Trainings -Contact me for Paid trainings related to Test Automation and Software Testing, -mail me @ `mohammadfaisalkhatri@gmail.com` or ping me on [LinkedIn][linkedin] - -## :thought_balloon: Checkout the blogs related to Testing on my [website][] +- Contact me for Paid trainings related to Test Automation and Software Testing, + mail me @ `mohammadfaisalkhatri@gmail.com` or ping me on [LinkedIn](https://www.linkedin.com/in/faisalkhatri/) +## :thought_balloon: Checkout the blogs related to Testing written by me on the following links: -[linkedin]: https://www.linkedin.com/in/faisalkhatri/ -[linktree]: https://linktr.ee/faisalkhatri -[website]: https://mfaisalkhatri.github.io -[reqreswebsite]:https://reqres.in/ -[blog_restassured_okhttp]: https://mfaisalkhatri.github.io/2020/05/29/restassuredokhttp/ -[blog_apitesting]: https://mfaisalkhatri.github.io/2020/08/08/apitesting/ -[restfulbooker]:https://restful-booker.herokuapp.com/apidoc/index.html#api-Booking-PartialUpdateBooking -[e2eblog]: https://medium.com/@iamfaisalkhatri/end-to-end-api-testing-using-rest-assured-a58c4ea80255 -[jsconschemavalidationblog]: https://medium.com/@iamfaisalkhatri/how-to-perform-json-schema-validation-using-rest-assured-64c3b6616a91 -[Lombok_website]:https://projectlombok.org/ -[testng_website]:https://testng.org -[java_faker]: https://github.com/DiUS/java-faker \ No newline at end of file +- [Medium Blogs](https://medium.com/@iamfaisalkhatri) +- [LambdaTest Blogs](https://www.lambdatest.com/blog/author/mfaisalkhatri/) +- [My Website](https://mfaisalkhatri.github.io) diff --git a/test-suite/fileuploadsuite.xml b/test-suite/fileuploadsuite.xml index 22f87a9..4207f85 100644 --- a/test-suite/fileuploadsuite.xml +++ b/test-suite/fileuploadsuite.xml @@ -1,7 +1,7 @@ - - + +