# How do I start API automation test?

**URL:** <https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007>\
**Category:** Archive\
**Tags:** automation, process, api-testing\
**Created:** [7 September 2021 03:41 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007 "2021-09-07T03:41:54Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![ms.salona](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/ms.salona/32/9406_2.png) [@ms.salona](https://club.ministryoftesting.com/u/ms.salona)\
**Post date:** [7 September 2021 03:41 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/1 "2021-09-07T03:41:54Z")

</div>

I started UI automation with selenium nearly 2 years back. And now I’m thinking to start API automation as well. Is it really helpful and necessary to do API automation? And what are the major things we automate in APIs? Any suggestions on starting this API automation journey?

---

<div class="post-metadata">

**Author:** ![musaffir](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@musaffir](https://club.ministryoftesting.com/u/musaffir)\
**Post date:** [7 September 2021 05:18 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/2 "2021-09-07T05:18:13Z")

</div>

Hi @ms.salona

- Is it really helpful and necessary to do API automation - **truly it is**

- what are the major things we automate in APIs - **purely depends on the application business context**

- Please read the below article which clearly says it is important to start asking WHY first before thinking about WHAT to automate -

- [Test automation: start with the &#39;why?&#39;](https://www.linkedin.com/pulse/test-automation-start-why-bas-dijkstra/)

- I have written couple of articles on LinkedIn that gives idea about Test automation pyramid and **what we should really focus on API testing**. Please read

- [Test Automation Pyramid in practice - Part 1](https://www.linkedin.com/pulse/test-automation-pyramid-practice-part-1-musaffir-lp/)

- [Test Automation Pyramid in practice - Part 2](https://www.linkedin.com/pulse/test-automation-pyramid-practice-part-2-musaffir-lp/)

Reading and learning can definitely take time, but what you learn is going to be yours. please see

Warm Regards,

---

<div class="post-metadata">

**Author:** ![kristof](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/kristof/32/10839_2.png) [@kristof](https://club.ministryoftesting.com/u/kristof)\
**Post date:** [7 September 2021 06:16 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/3 "2021-09-07T06:16:49Z")

</div>

> [@musaffir](#):
>
> Is it really helpful and necessary to do API automation - **truly it is**

Ow yea, you will love it @ms.salona

I made a racket about it: How to hunt for Bugs on the API: [https://racket.com/kristof\_vk/rbH7b](https://racket.com/kristof_vk/rbH7b)  
What to test on an API (happy & unhappy flows):

- JSON Values
- Headers
- HTTP Codes
- Response time
- Cookies
- Cache
- Authorization
- Authentication
- IDORs
- Race conditions

---

<div class="post-metadata">

**Author:** ![pmichielsen](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/pmichielsen/32/8959_2.png) [@pmichielsen](https://club.ministryoftesting.com/u/pmichielsen)\
**Post date:** [7 September 2021 06:56 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/4 "2021-09-07T06:56:14Z")

</div>

And, if you want to learn about the technologies and tools, the [Test Automation University](https://testautomationu.applitools.com/) has got some great resources:

- Learning paths on API for both [Python](https://testautomationu.applitools.com/learningpaths.html?id=api-python-path) or [Java](https://testautomationu.applitools.com/learningpaths.html?id=api-java-path)
- And recently released, [API test automation with PostMan](https://testautomationu.applitools.com/postman-tutorial/index.html)

---

<div class="post-metadata">

**Author:** ![ms.salona](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/ms.salona/32/9406_2.png) [@ms.salona](https://club.ministryoftesting.com/u/ms.salona)\
**Post date:** [7 September 2021 07:13 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/5 "2021-09-07T07:13:00Z")

</div>

Thank you so much for the links. I’ll start reading them first. It really looks helpful. 😊

---

<div class="post-metadata">

**Author:** ![ms.salona](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/ms.salona/32/9406_2.png) [@ms.salona](https://club.ministryoftesting.com/u/ms.salona)\
**Post date:** [7 September 2021 07:14 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/6 "2021-09-07T07:14:05Z")

</div>

Thank you so much 😊. I’ll check them and try to understand.

---

<div class="post-metadata">

**Author:** ![ms.salona](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/ms.salona/32/9406_2.png) [@ms.salona](https://club.ministryoftesting.com/u/ms.salona)\
**Post date:** [7 September 2021 07:15 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/7 "2021-09-07T07:15:09Z")

</div>

Yes i do need to understand the tools and technologies. This looks helpful. I’ll check them. Thank you somuch 😊

---

<div class="post-metadata">

**Author:** ![kristof](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/kristof/32/10839_2.png) [@kristof](https://club.ministryoftesting.com/u/kristof)\
**Post date:** [7 September 2021 07:39 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/8 "2021-09-07T07:39:01Z")

</div>

> [@ms.salona](#):
>
> I’ll check them and try to understand.

If you have any questions, let us know! 😛

---

<div class="post-metadata">

**Author:** ![anthony\_odonnell](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/anthony_odonnell/32/7835_2.png) [@anthony\_odonnell](https://club.ministryoftesting.com/u/anthony_odonnell)\
**Post date:** [7 September 2021 09:55 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/9 "2021-09-07T09:55:59Z")

</div>

Great blog post here on this subject

> **[API, Web Services & Microservices Testing Pathway](http://katrinatester.blogspot.com/2015/09/api-web-services-microservices-testing.html)**
>
> This pathway is a tool to help guide your self development in API, web services and microservices testing. It includes a variety of steps th...

---

<div class="post-metadata">

**Author:** ![simon\_tomes](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/simon_tomes/32/14009_2.png) [@simon\_tomes](https://club.ministryoftesting.com/u/simon_tomes)\
**Post date:** [7 September 2021 10:20 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/10 "2021-09-07T10:20:20Z")

</div>

Congrats on starting your journey, @ms.salona. 🎉

Is the following Ask Me Anything on your radar?

**[Testing Ask Me Anything - API Testing - Hilary Weaver-Robb](https://www.ministryoftesting.com/dojo/lessons/testing-ask-me-anything-api-testing-hilary-weaver-robb)**

Hilary Weaver-Robb shares _so much_ useful information! And this is [the treasure trove of the Club post](https://club.ministryoftesting.com/t/ask-me-anything-api-testing/38408) that supports the video. There is a whole tonne of stuff to explore.

Good luck on your adventures.

---

<div class="post-metadata">

**Author:** ![ms.salona](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/ms.salona/32/9406_2.png) [@ms.salona](https://club.ministryoftesting.com/u/ms.salona)\
**Post date:** [7 September 2021 12:04 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/11 "2021-09-07T12:04:38Z")

</div>

Will definitely check out. Thank you 😊

---

<div class="post-metadata">

**Author:** ![ms.salona](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/ms.salona/32/9406_2.png) [@ms.salona](https://club.ministryoftesting.com/u/ms.salona)\
**Post date:** [7 September 2021 12:05 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/12 "2021-09-07T12:05:10Z")

</div>

yes this can be helpful too. Thank you 😊

---

<div class="post-metadata">

**Author:** ![somanathgaikwad](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@somanathgaikwad](https://club.ministryoftesting.com/u/somanathgaikwad)\
**Post date:** [13 September 2021 14:41 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/13 "2021-09-13T14:41:59Z")

</div>

Yes, Automating APIs are really helpful and necessary because whatever you see on UI are mainly sent/responded to by API’s so you can find more bugs with the help of API testing at an early stage itself. If you’re automating API’s then you can put only 20% of effort into GUI/UI testing using selenium.  
API testing involves testing the application directly and as part of integration testing to determine if they meet expectations for functionality, reliability, performance, and security. In API testing you mainly have to test API requests and check/validate their responses, status code, token, etc with the help of HTTP methods.  
To start with API testing, first, you must have a basic understanding of APIs, HTTP methods, how API works, etc. Once you understand these then you can start doing API testing manually with POSTMAN or any other tools. Once you’re familiar with POSTMAN then you can choose your own programming language to automate APIs using rest assured.  
If you know all these things then Automating APIs with Rest assured will be easy, you can find various videos or courses on youtube and udemy regarding API automation using Rest Assured. You will explore more on API testing on your own once you start using it in real-time projects.

Happy Testing!!

---

<div class="post-metadata">

**Author:** ![ms.salona](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/ms.salona/32/9406_2.png) [@ms.salona](https://club.ministryoftesting.com/u/ms.salona)\
**Post date:** [14 September 2021 04:29 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/14 "2021-09-14T04:29:36Z")

</div>

Hey, thank you for so much of information. I really appreciate this. And yes i have been doing API test manually through POSTMAN, nothing too vague though. I’ll consider everything you mentioned. Have a good day 😊

---

<div class="post-metadata">

**Author:** ![phillipe](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/phillipe/32/8250_2.png) [@phillipe](https://club.ministryoftesting.com/u/phillipe)\
**Post date:** [15 September 2021 01:04 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/15 "2021-09-15T01:04:19Z")

</div>

This is an amazing question and timely for me. Things that you should automate in API tests would

- Data Verification - Does the request return the correct data, is the data in the expected format
- Required Fields - Does the request return the correct error code when missing field information that is required? Do requests missing required fields return an error at all?
- Variable Types and Values - Do request that accept integers accept any other type, should it accept that alternative type? Do requests that accept strings allow special characters?
- Performance - Do HTTP requests return data in an expected amount of time?
- Destructive Testing - Can we get the software to fail in an unexpected way - Using things like large payloads, malformed data, and testing the API when the System is under heavy load

One interesting type testing that can be used at all levels of testing is Chaos Testing also known as monkey testing. It takes test cases and randomly switches the input data to see how the tests handle the unexpected condition or removes services, resources from the system to see how the system fails. It is more of an advanced topic but I enjoyed reading about it. Check out this article on LinkedIn that is a general introduction to the practice [Building resilient APIs with chaos engineering](https://www.linkedin.com/pulse/building-resilient-apis-chaos-engineering-joyce-lin/)

---

<div class="post-metadata">

**Author:** ![ms.salona](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/ms.salona/32/9406_2.png) [@ms.salona](https://club.ministryoftesting.com/u/ms.salona)\
**Post date:** [15 September 2021 07:19 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/16 "2021-09-15T07:19:15Z")

</div>

Thanks for these details. However monkey testing is a new term for me. I’ll definitely go through the link you shared. Much appreciated. 😊

---

<div class="post-metadata">

**Author:** ![testertina](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@testertina](https://club.ministryoftesting.com/u/testertina)\
**Post date:** [17 September 2021 13:37 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/17 "2021-09-17T13:37:13Z")

</div>

+1 this blog post, it is very detailed and allows you to do your own research as you read it.

---

<div class="post-metadata">

**Author:** ![vishaldutt](https://avatars.discourse-cdn.com/v4/letter/v/5f9b8f/32.png) [@vishaldutt](https://club.ministryoftesting.com/u/vishaldutt)\
**Post date:** [17 November 2021 16:54 UTC](https://club.ministryoftesting.com/t/how-do-i-start-api-automation-test/53007/18 "2021-11-17T16:54:30Z")

</div>

API Integration testing is the future of Integration testing. Basically an Application Programming Interface, or API, is the interface that helps facilitate connectivity and communication between two or more software applications. So, API layer of any application is the channel that connects client to server. API Integration refers to the connectivity that helps business organizations to automate the processes and embed/share data between system and application. So, API Integration testing basically involves testing the programming interface directly, as well as running integration tests to determine the functionality, reliability and security of the application.  
**API automation testing** should cover at least following testing methods:

**Discovery testing:** The test group should manually execute the set of calls documented in the API

**Usability testing:** This testing verifies whether the API is functional and user-friendly.

**Security testing:** This testing includes what type of authentication is required and whether sensitive data is encrypted over HTTP or both

**Automated testing:** API testing should culminate in the creation of a set of scripts or a tool that can be used to execute the API regularly

**Documentation:** The test team has to make sure that the documentation is adequate and provides enough information to interact with the API. Documentation should be a part of the final deliverable
