Skip to content

Testing guides ​

How to test an API so that you can trust it: what to check, how to organise the checks, and how to do each kind of test with ApiWorkbench and Mock Studio. The guides teach the method first and the buttons second, so they stay useful whatever tool you use later.

Where to start ​

Kinds of test ​

GuideThe question it answersPractise in
Functional testingDoes each endpoint do its job for valid input?Todo API
Negative testingDoes it refuse bad input properly?Todo API
Testing authenticationIs it locked to the right people?Shop API
Workflow testingDoes a whole user journey work, step after step?Shop API
Data-driven testingDoes it hold for many inputs, including the edges?Shop API
Testing with mocksHow do I test when the real API is missing or awkward?All three
Resilience testingWhat happens when the API is slow, failing or down?Flaky Payments
Load testingHow does it behave with many users at once?Shop API
MonitoringIs it still working right now?Any
Automating in CIHow do the tests run by themselves on every change?Any

The two tools, and what each is for ​

ApiWorkbenchMock Studio
Plays the part ofThe client: it sends requestsThe server: it answers them
You use it toCheck that an API behaves correctlyStand in for an API, and misbehave on demand
Key features for testingTests, captures, scripts, the runner, data files, load testing, a command-line runnerRules, sequences, random answers, latency, faults, flows, proxy and record

Used together they make a complete practice ground: Mock Studio is the API, ApiWorkbench tests it, and nothing needs the internet. The sample projects are exactly that.

A sensible learning order ​

  1. Fundamentals, then the Todo API lab.
  2. Test cases, functional and negative testing.
  3. Authentication, workflows and data-driven testing, with the Shop API lab.
  4. Mocks and resilience, with the Flaky Payments lab.
  5. Load, monitoring and CI.