0% found this document useful (0 votes)
28 views7 pages

Why API Testing - Why Testing - by Keith Vanderpool - Medium

Uploaded by

dung pham anh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views7 pages

Why API Testing - Why Testing - by Keith Vanderpool - Medium

Uploaded by

dung pham anh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

8/31/2021 Why API Testing?. Why Testing?

| by Keith Vanderpool | Medium

Get started Open in app

Keith Vanderpool
10 Followers About Follow

Why API Testing?


Keith Vanderpool Jan 1, 2018 · 4 min read

Why Testing?

You know you should be doing it. Everyone talks about doing it. Maybe you’re doing it
in some fashion or to a limited extent. Why? How? Where?

In the beginning

Software development for the web used to be “easy”. Create some html files. Upload
them to a server (usually running Apache and typically transferring the files to the

https://medium.com/@keithvanderpool/why-api-testing-a07f52c0cf3a 1/7
8/31/2021 Why API Testing?. Why Testing? | by Keith Vanderpool | Medium

server using FTP. Oh such great security 😱 ). Pat yourself on the back and then you’re
done. Time to see about getting that site listed in yahoo 😉 .
Get started Open in app

And then the technologies came and kept coming and will continue
coming…
(not an exhaustive list)

HTML form submissions

cgi gateway

Javascript

CSS

perl

Oracle databases

Access databases

Microsoft SQL databases

Server farms

.COM components

Classic ASP

Server farms

Java sevlets

PHP

.NET

SOAP

XML

Blogger

WordPress

Ruby
https://medium.com/@keithvanderpool/why-api-testing-a07f52c0cf3a 2/7
8/31/2021 Why API Testing?. Why Testing? | by Keith Vanderpool | Medium

node.js
Get started Open in app
NoSQL databases

Virtualization

Load balanced servers

RESTful API

JSON

The “Cloud”

.NET Core

AWS

Angular

React

Azure

and so much more…

What does it mean to test an application?


Typical SPA (Single Page Application aka a web site) contains
Browser — SPA application runs within it. It could be Angular, React, or something
else

API — Webserver that serves as the endpoint to load data into the SPA and process
user actions initiated by the SPA

https://medium.com/@keithvanderpool/why-api-testing-a07f52c0cf3a 3/7
8/31/2021 Why API Testing?. Why Testing? | by Keith Vanderpool | Medium

Backend Stuff — databases, other services, infrastructure. Stuff that makes the
Get started Open in app
API function but is largely hidden by the API layer

What does this mean from a testing perspective?

https://medium.com/@keithvanderpool/why-api-testing-a07f52c0cf3a 4/7
8/31/2021 Why API Testing?. Why Testing? | by Keith Vanderpool | Medium

Get started Open in app

The user wants the application to do whatever it does. It needs the API to function in a
way to allow the user to perform those actions.

The API is the contract. This contract needs to function and be consistent with what
the consumer (aka the browser) expects. The contract means I give you X you give me
y. Specific example would be: I provide you a username and password. You give me a
response whether I am authorized. If I am authorized you give me a token that allows
me to do things with the API now that I’m authorized.

https://medium.com/@keithvanderpool/why-api-testing-a07f52c0cf3a 5/7
8/31/2021 Why API Testing?. Why Testing? | by Keith Vanderpool | Medium

Get started Open in app

For purposes of API testing the box in red is the only area of concern

If the API doesn’t work as the application (code) in the browser expects; the application
isn’t going to work. The user is sad and complains to your boss if you’re running an
application within the enterprise. Then you need to figure out what’s broken and fix it.
Or if it’s a public site users become frustrated and stop using your application. Then you
go out of business.

So get to the point…

As developers and a development team we need to be able to test and change the API as
the application is initially developed and after it is running in production. Doing this
by hand (manual testing) is not a sustainable approach.No really. Get to the point.

Postman (https://www.getpostman.com/) is a tool that allows you to make http


requests APIs from an interactive interface. And also has a command line tool called

https://medium.com/@keithvanderpool/why-api-testing-a07f52c0cf3a 6/7
8/31/2021 Why API Testing?. Why Testing? | by Keith Vanderpool | Medium

newman
Get started Open in app
(https://www.getpostman.com/docs/postman/collection_runs/command_line_integr
ation_with_newman) that allows you to run these requests from the commandline. The
ability to run it from a command line means it can be automated.

So to finally get to the point… Automated testing of RESTful APIs from the
commandline. You need this. You may not realize why and how yet.

What’s Next
How to use postman

How to run it from the commandline

How to structure and manage postman collections

How to use it in continuous integration

How to use it in continuous deployment

Web Development Postman Restful Api Continuous Integration Software Testing

About Write Help Legal

Get the Medium app

https://medium.com/@keithvanderpool/why-api-testing-a07f52c0cf3a 7/7

You might also like