In a world where software systems are rapidly becoming ever more distributed, knowing how to test and write automation for APIs is quickly becoming an indispensable skill for any modern software tester.

There are a lot of tools and libraries out there that can help you write and run tests for APIs, in various programming languages. Using the pytest unit testing framework and the requests HTTP library in Python is among the most tried and tested approaches for creating versatile and powerful API tests.

Get started with Python:

  • Set up your development project
  • Write and run your first API tests in Python
  • Asserting on status codes, response headers and response body elements
  • Create data-driven tests
  • Work with JSON and XML request and response payloads
  • Run your tests as part of a CI/CD pipeline