
TL;DR
Do you use the word buzz `API` a lot, may be you are a recruiter and helping to hire someone with API testing experience, but don’t get it.
or you are a manual tester, finally rolled up your sleeves to make an entry to test automation?. Well then let’s start this super quick crash course.
With all the steps and code I shall share here, I am confident that by the end of this article, if you have never done, you would achieve your: First Test Automation !

I just need these 3 things form you:
- Positive attitude, with high spirits speak this aloud (or in your mind)
“I am going to finish this article with my first test automation and then peacefully have a sound sleep tonight.”
….this was very important, if it is your first time learning test automation. - Focus : I want your complete focus for just few minutes and. It is completely okay if you are not a coding expert or a developer.
- Internet : To stay connected with this article and machine and a computer. ( if you are reading on your smart phone or tablet, feel free to read the article and run it when you get time)
[OPTIONAL] Having a github account will make your experience great, but if don’t have one, you can still proceed.
Remember , if at any point of time if this gets overwhelming to you, jump straight forward to Step 2: THEORY
We will cover this article in 2 parts :
1. Practical : Run the automation test first.
2. Theory : Learn and understand what we did in first step.
Step1: PRACTICAL
Open : cmd (command prompt) or terminal app and run below command to download sample code.
git clone https://github.com/eaccmk/API-newman-POC.git
cd API-newman-POC
or if you don’t have any idea on what github is, just go to this website :
Download the code as displayed in image by clicking Download ZIP. Once downloaded , go to the download location and unzip it using your favourite unzipping tool !

Now that you have the code, you might have guessed it to be some kind of API Test Automation. Yes it is !
Let us Run this API automation test….

If you have used github and understand the README.md. By now you must have already : understood , ran and learnt your first API test Automation.
- I would congratulate you and ask you to stop reading this article right away. Move on to read more articles on test automation on Medium , no hard feelings.
But if you are on the other side don’t worry, continue reading..
We are going to run a test automation using a command line tool on your windows CMD or Mac/Linux Terminal. 🔲
- No fancy UI require which means no complex set-up.
- Easy to start.
- Quick to get results.
……..that’s how CLI ( command Line Interface) testing works. And is always CI (Continuous Integration) testing friendly.
Here are quick steps to setup test:
- NODE.js: Download and install it from official website nodejs.org
- newman: This is the tool we will use for API test automation, if you have installed NODE.js in above step, run command to setup newman:
npm install -g newman
Mac user’s may choose above command or using homebrew to install it :
$ brew install newman
That’s it ! You have got all the tools to run this API test automation.
Open cmd or terminal
app navigate to the folder where you cloned ( see git clone ....
above or simply said, reach the folder where you unzipped the github project on cmd or terminal
.
Run this command ( not sure what run means here… don’t worry, just copy paste and hit ENTER ) 😃
newman run api_collection.json -e environment.json -d test_data.csv
👏 CONGRATULATIONS !! 🎉🎉
you just ran your first API Automation test.
For complete details have a look at the here README.md or from the project which you just unzipped.
Step 2: THEORY
What we did above in theory is
- “We just ran a TEST API Automation framework” by hitting (a `request`) a URL and check response.
or, other option
- Hit a URL and pass on some test data with our `request` and get a response, based upon test data.
If we get the expected response. In API language a `200` or`OK
`we call it a success.
Just think if you type www.gooogle.com in your browser and it shows the google home page, it was a success response. Something like this.

Something similar we tested in our automation without launching the browser. As our AIM is to test the Web service ( or website for example) not the browser (chrome, IE, safari etc…)
So this was our result

Hope this was helpful for you to explore further and get into more theory.
✅References: