Free API Sites To Do Self Practice | Simple Practical Demo of API Methods | Introduction of API Testing
Hello Dear Friends,
I hope you are doing well.
So guys in this article we are going to learn what an API is and what are the different methods or operations available to perform the API testing and are there any free or dummy APIs list available to do the self practice?
So we will be seeing all above questions answer one by one and to watch practical demo click on mentioned link Practical Demo
I hope you are doing well.
So guys in this article we are going to learn what an API is and what are the different methods or operations available to perform the API testing and are there any free or dummy APIs list available to do the self practice?
So we will be seeing all above questions answer one by one and to watch practical demo click on mentioned link Practical Demo
Below are the questions which we are going to discuss in this article:
1) What is an API?
2) What are the methods available to do the API testing.
3) Free dummy API sites to do the self practice
4) What is postman used for?
1) What is an API?
- API stands for Application Programming Interface.
- An API is a software intermediary that allows two applications to talk to each other.
- In other words, an API is the messenger that delivers your request to the provider that you're requesting it from and then delivers the response back to you.
2) What are the methods available to do the API testing.
- GET
- POST
- PUT
- DELETE
3) Free dummy API sites to do the self practice
- I will explain this point taking one simple example of an Employee and will perform below operations.
- Create Employee
- Get employee details
- Update employee details
- Delete employee details
Create Employee :
- Open the Postman
- Select the request type as a POST
- To create employee we have to copy and paste below base URI in Postmanhttp://dummy.restapiexample.com/api/v1/create
- To send the Employee details go to Body->raw-Text->JSON
- Then paste the below JSON code and click on send button{"name" : "TestUser","salary" : "50000","age" : "26"}
- And finally check the status code in response whether it is 200 or not, if you will get 200 OK it means you have successfully created an employee.
Get employee details:
- Open the Postman
- Select the request type as a GET
- To get employee details we have to use below base URI in Postmanhttp://dummy.restapiexample.com/api/v1/employee/?
- In question mark we have to send the employee id and to get employee id use below base URIhttp://dummy.restapiexample.com/api/v1/employees
- Copy any id from list and pass the copied id in place of ? as mentioned belowhttp://dummy.restapiexample.com/api/v1/employee/1
Update employee details:
- Open the Postman
- Select the request type as a PUT
- To update employee details we have to use below base URI in Postmanhttp://dummy.restapiexample.com/api/v1/update/?
- In question mark we have to send the employee id and to get employee id use below base URIhttp://dummy.restapiexample.com/api/v1/employees
- Copy any id from list and pass the copied id in place of ? as mentioned belowhttp://dummy.restapiexample.com/api/v1/update/1
- To update the Employee details go to Body->raw-Text->JSON
- Then paste the below JSON code and click on send button{"name" : "TestUser","salary" : "70000","age" : "42"}
Delete employee details:
- Open the Postman
- Select the request type as a DELETE
- To update employee details we have to use below base URI in Postmanhttp://dummy.restapiexample.com/api/v1/delete/?
- In question mark we have to send the employee id and to get employee id use below base URIhttp://dummy.restapiexample.com/api/v1/employees
- Copy any id from list and pass the copied id in place of ? as mentioned belowhttp://dummy.restapiexample.com/api/v1/delete/1
So guys we have successfully completed the basic API article here in next article will see RestAssured testing API.
To watch practical demo of above article please click on link Practical Demo
Let me know if you have any suggestions, questions or comments.
Thanks!!!
:)
Comments
Post a Comment