30 Days of API Testing Day 16: Complete Exercise 2

Welcome to exercise two, for day sixteen of 30 days of API Testing.

Goal

Execute some simple API calls using some tools with automated execution capabilities or in code using an API testing framework.

Objectives

  1. Send a GET and POST request
  2. Gain exposure to many some API testing automation frameworks or tools that support API automation.

Exercise

Choose an API testing automation framework or tool, some suggestions below:

Complete a GET and POST call on a test API. Many test APIs have been posted for challenge 5. Ensure to include an assertion and see if you can get them to run automatically one after another.

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.

doing this slightly early because I skipped a few I’m currently unable to do

I used the snippets from postman to be able to do this,

image

I’m not sure if I did it completely correctly, I did make my tests fail first to make sure I was on the right lines with them though.

I used Katalon Studio to complete this exercise.

1 Like

I used PostMan with newman for this exercise.
Below is the screenshot for newman html report.

Day16-newman-run-report

I used Postman for this exercise. Fun and easy to play around with!

1 Like

On postman performed create, get, put, post and delete against http://dummy.restapiexample.com/
Some screenshots below…

Wondering if anyone has used the free trial from API Fortress for this exercise?

From the twitterverse

3 Likes

I’ve signed up for a trial of API Fortress as bonus challenge but I’m still waiting for approving join request from company :blush:

2 Likes

It’s my first experience with Postman&Newman :slightly_smiling_face: Very usefull tools!

2018-11-25_01-04-10%20(2)

3 Likes

I use my own framework to complete exercise 2:

  • Send a GET and POST requests
  • Assert responses

4 Likes

My exercise 2 is:

  1. GET:

image
image

  1. POST OAuth 1.0:

image
image

2 Likes

The Katalon Studio is easy and powerful. I used it to practice with API. This is the cool tool. I using https://automationintesting.online/room/ to do GET call and verify the response. Then send POST call to https://automationintesting.online/auth/login and verify the token back.

GET method:

GET

POST method:

POST

TC:

TCs

3 Likes

I use Postman and Katalon for this exercise

GET:

image

image

POST:
image
image

3 Likes

I use Katalon to do this exercise:

3 Likes

Using postman to do this exercise and reference with small path in my project.
[GET]
Test 1: Get Method to get the value from API
Test 2: Verify the “criteria” value is in returns value
get%20method
[POST]
Test 1: Get Method to get the value from API
Test 2: Verify the “token” value is in returns value
post%20method

2 Likes

I used API Fortress for this. The UI tools, although a bit cluttered in my opinion, are really convenient after you get the hang of it, especially the if/then logic components.

58%20PM|690x387

@heather_reid, I did :slight_smile: I left my impressions and a couple screenshots on this post. Overall I found API Fortress to be very neat and was able to write these tests fairly quickly. There was a bit of a learning curve to understand how the GUI interface works though.

1 Like

Made a full series on this API ( 80% done) and added it all to youtube.

You can find videos on the below operations all performed on the Restfull Booker API

  • Get Booking
  • Post Bookingg
  • Put Booking
  • Delete Booking
  • Validation of Json Format
  • Write Response to File
  • Asserts on different properties

All with Java and Rest Assured, and all the code is public

1 Like

Is automating API tests using the Robot framework an option? I did not see many responses that used this tool.

You can use any tool that you want. So Robot framework is also an option

1 Like