Knowledgebase

Building API Test Suites Print

  • softwaretestingqa, software, guide, howto, solution, zillionkinghost, hosting, support
  • 0

Automating interface verification.

WHY THEY ARE THE BEST VALUE

Fast, stable, and covering real behaviour.

WHAT TO STRUCTURE BY

Resource or feature, matching the interface.

WHAT TO BUILD

A client wrapping the interface, used by tests.

WHY

It centralises authentication, headers and base addresses.

WHAT TO ASSERT

Status Structure, against a schema Specific values that matter

WHAT SCHEMA VALIDATION CATCHES

Structural changes, without asserting every field.

WHAT TO TEST FOR EVERY ENDPOINT

The success case Each validation failure Authentication missing Authorisation denied Access to another user's resource

WHAT TO AUTOMATE ACROSS ENDPOINTS

Authorisation checks, as a matrix.

WHY

It is repetitive, large, and must be rechecked constantly.

WHAT TO DO ABOUT TEST DATA

Create it through the interface, and remove it afterwards.

WHY THROUGH THE INTERFACE

It exercises creation as well as the behaviour under test.

WHAT TO BE CAREFUL WITH

Tests depending on data created by other tests Assertions on fields that legitimately vary Hard-coded identifiers

WHAT TO RUN THEM IN

The pipeline, on every change.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot