30 Days of API Testing Day 7: Complete Exercise 1

Welcome to exercise one, for day seven of 30 days of API Testing.

Goal

Execute some simple API calls using as many tools as possible!

Objectives

  1. Send a GET and POST request
  2. Gain exposure to many API testing tools

Exercise

Choose an API testing tool such as API Fortress, Postman, SoapUI, Paw or perhaps a different one.

Complete a GET and POST call on a test API. Many test APIs have been posted for challenge 5.

Example

Using https://automationintesting.online created by Mark Winteringham and myself, do the following:

{
	"username": "admin",
	"password": "password"
}

Share

Post your experiences with the tools you use below.
If you used a different API post the calls you did so others can try them.

5 Likes

I chose the SoapUI for my tool, I found it very user friendly and easy to comprehend. Here is a snapshot of my results of the first exercise

2 Likes

I am able to do GET and POST using “Advanced Rest Client” Google Chrome Plugin and received the result.
Attached the screenshots.

1 Like

I tested the InfoService from this SOAP API: http://zero.webappsecurity.com/web-services/, using the SoapUI and JMeter.

SoapUI

  • I got all supported requests generated by the tool, as it reads from the WSDL
  • I couldn’t find a way to change the generated requests, so I couldn’t change the method (WSDL allows only POST)

JMeter

  • intended for performance testing, but a colleague recommended it to me for API testing as well
  • it cannot generate requests from WSDL, so I had to setup the headers and body manually
  • I tested POST and GET for this API, where POST was successful and GET returned error 500 for the same request, as it is not supported

2 Likes

I used Katalon Studio to do this exercise:

  1. GET call

  2. POST call

  3. Simple automation script to verify responses’ content
    Exercise1

8 Likes

Cypress (cypress.io) though primarily used for UI testing , can also be used for API tests.

3 Likes

I had no problems in Postman:

I tried Curl for windows, and that was an altogether different story. I had to look at several stackoverflow articles, use way too many escape characters, and ultimately got:

image

In other words - nothing! I’ll keep at it…

-Dave K

2 Likes

In the past I have used Advanced Rest Client, Jmeter and trialled Soap UI.
Currently Postman would be tool of choice.
When creating automated checks in python, my favourite library was http://docs.python-requests.org/en/master/

For the exercise today i decided to try API Fortress.
I found the client easy to use for the post and get in the exercise.
I noticed the tools provides other functionality such as loading testing, mocking and gadgets (encoding, crypto etc.)
I did notice if i specify a room that does not exist in the database, it returns a 500, guessing it should be a 404(not found).



2 Likes

I used Postman, first time doing it!

2 Likes

I’ve already experienced both Postman and SoapUI. So I decided to try JMETER. The only difficulty I’ve faced during the task is that for auth request you are required to set Content Type header via HTTP Header Manager :wink:! Otherwise, server returns 415 unsupported media type :confused:

3 Likes

I am using PostMan for this exercise, and I found one sample api online “https://jsonplaceholder.typicode.com” to practice, it will be helpful for beginners.

Here the api documentation “https://github.com/typicode/jsonplaceholder#how-to”,

and below are the screenshots for GET and POST using PostMan

3 Likes

Anyone using a paid edition of the Jetbrains suite of tools (such as Intellij) could try with the REST tool window: https://www.jetbrains.com/help/idea/rest-client-tool-window.html

Can’t do so right myself right now…

I’ve been having a look via Fiddler at the moment - and have also tried using Postman. Both have plus points so happy using either to be honest. I guess a lot of it is down to personal preference: how easy is the tool to use, how easy to amend and resend requests etc.

1 Like

I completed this exercise using the given example API in both Rest Assured and Postman.

Rest Assured is great if you know a bit of Java.

Postman is good for playing around with APIs, and for API testing where all data/states possible on the API is controlled through the API itself.

Thanks Helena, your post was just what I needed!

Needed a nudge - I couldn’t remember where the raw JSON could be entered!

1 Like

I can complete this challenge using Postman.

Thanks @oceannguyen about the Katalon introduction. Need some time to figure it out, but for a tool that can do Automation Testing for Web, Mobile and API, it is definitely a great tool! :+1:

Thanks @conorfi for introduce Requests. Now I can do more thing with Python :smiley:
Because of new user’s limitation, I can upload only 1 image. So this is my results:

All of you guys are so great! Congrat!!

5 Likes

Look like, the Katalon is perfect tool for automation testing
I will try this tool this week and let you all know my real feeling.
Again, thanks @oceannguyen for sharing.

Below is one SOAP services ( using public API) testing using SOAP UI.

5 Likes

I am using Postman and Katalon to complete this Exercise 1. Postman is great but now I prefer Katalon because of its UI and layout.

6 Likes

Used postman, was really comfortable doing this whereas before this 30 days I may not have been !

1 Like