How Do I Test Thee API?

Published by Gil Zilberfeld on

Let me count the ways.

  1. Alone. In the dark, or with the light on. Does it return the expected status? Does it do what we expect it to do? You know, the absolute simple stuff.
  2. With different inputs. Different paths, different parameters, different bodies. Changing parameters is good. We can tell a lot about an API by using it with different inputs. Also, we’ll also find the behavior that’s not documented.
  3. With a document. Does it do what it actually says it should do? Does it hold information from us? Are all the things it promises actually tested? Can we trust that documentation?
  4. With friends. No API is an island. It’s also spelled differently. APIs are used in different workflows and scenarios. In the beginning, the end, and sometimes in the middle. There’s a cross-contamination or cross-pollination, when used with their API friends in a combination. There’s no social distancing with APIs.
  5. With repeats. Create a disturbance in the Force, like millions of voices suddenly decide to call the API. At the same time. Or one after another. Oh, the surprises we’ll experience.
  6. In another place. Does it speak Burmese? How does it behave when an umlaut is around? Can we call it even from Wuhan, and what would be the result?
  7. In another time. Call it on February 29th, call it coming out on Daylight Saving Time. Just look at your watch and call it. You’ll have the time of your life.
  8. In another setting. Big or small memory, locally or through a proxy, from the UI or pretending to be another computer. The options are endless. And you’ve got the time, right?

You see guys, a single API can fill up your day with just thinking about how to find out how it works. And that’s just one!

Well, that’s the job though. And I’m sure I haven’t thought about all the ways, so give us a comment if you have an idea.

If you want to take on a challenge, this is just a tip of the iceberg of what I teach in my Testing APIs With Postman course. Nobody should miss it. Call me now!

Categories: Uncategorized

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

%d bloggers like this: