Skip to content

Commit

Permalink
updated readme (#77)
Browse files Browse the repository at this point in the history
* updated readme

* updated codeql version to v2

* disabled file upload test
  • Loading branch information
mfaisalkhatri authored Aug 10, 2023
1 parent 1843bc6 commit d8d2fd4
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 47 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ name: "CodeQL Analysis"
on:
push:
branches:
- master
- issue-*
- master
- issue-*

schedule:
- cron: '20 16 * * 1'
Expand Down Expand Up @@ -46,31 +46,31 @@ 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.
# By default, queries listed here will override any specified in a config file.
# 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
uses: github/codeql-action/analyze@v2
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
/.idea/
/allure-results/
/allure-report/
/.allure/
/.allure/
/*.iml
52 changes: 24 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand All @@ -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
- [Medium Blogs](https://medium.com/@iamfaisalkhatri)
- [LambdaTest Blogs](https://www.lambdatest.com/blog/author/mfaisalkhatri/)
- [My Website](https://mfaisalkhatri.github.io)
4 changes: 2 additions & 2 deletions test-suite/fileuploadsuite.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="File upload Example Test Suite" >
<test name="Upload file example" >
<suite name="File upload Example Test Suite">
<test name="Upload file example" enabled="false">
<classes>
<class name="fileupload.MultiPartFileUploadTest"/>
</classes>
Expand Down

0 comments on commit d8d2fd4

Please sign in to comment.