- Notifications
You must be signed in to change notification settings - Fork39
vinaykumarvvs/api-automation-tutorial
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
In this tutorial you are going to learnHow to Automate the REST API's in Java usingRESTAssured Library
The tech stack used for this tutorial are:
- JAVA as the programming language for writing test code
- TestNg as the framework
- Gradle as the build tool
- IntelliJ as the preferred IDE for writing java code.
Setup your machine.
- Install JDK 1.8
- Install IntelliJ (Community edition is fine)
- Install Gradle
- Clone the project from
git clone https://github.com/vinaykumarvvs/api-automation-tutorial.git
- Import the project (api-automation-tutorial) in IntelliJ
File -> New -> Project from Existing Sources -> Browse Project Location -> build.gradle
- Now click on
auto import -> Ok
wait until the IntelliJ downloads all the dependencies
Note:
For 2nd & 3rd steps, you need to follow this wayOpenTerminal/CMD -> cd <change-to-project-location>
- You can run the tests directly from the IntelliJ, by right-clicking andRun test.
- For Linux/Mac users:
gradle clean build runTests
orgradle clean build test
- For Windows users:
gradlew clean build runTests
orgradlew clean build test
Throughout this tutorial, I am going to usePetStore-Swagger.PetStore - Swagger is the open source project which has very good documentation with the various number of examples.
Chapter 1 :: Send a GET Request and validate the Response
- Test-1: Send a get Request of an API and validate the body
- Test-2: Send a get Request of an API by passing the Query Parameters in the URL itself
- Test-3: Send a get Request of an API and retrieve the data from the body
- Test-4: Send a get Request of an API and store the Response
Chapter 2 :: Abstracting the code
- Test-1: Abstracting the Requests for maintenance and readability
Chapter 3 :: POST Request creation and validating the Response Code
- Test-1: Creating the POST Request and validating the Response Code
Chapter 4 :: POST Request creation and validating RequestBody & ResponseBody
- Test-1: Creating the POST Request and validating the RequestBody & ResponseBody
Chapter 5 :: Chaining the API's
- Test-1: Chaining Requests and validate Response Body
About
Learn how to automate REST API's in Java using RESTAssured library
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published