API testing is a core part of modern testing and delivery pipelines, yet it is often misunderstood or introduced too late. This session provides a practical introduction to REST API automation using Python, focusing on what to test, how to structure tests, and how API tests fit into a modern testing infrastructure.
The workshop starts with a short overview of API testing fundamentals and common use cases. As a practical part, we'll have a hands-on walkthrough where we write REST API tests covering basic CRUD operations. Attendees will work with Python and the Requests library against a real service with well-documented APIs.
I will provide a basic test framework, and we will extend it together by adding and improving tests during the session.
Prerequisites for Attendees:Attendees should bring a laptop if they want to write test code during the workshop. The OS doesn't matter; they will have to install the required software:
- Python 3.12 or higher (it's important not to rely on the default Python installation, for example, on macOS, it's still version 2.7)
- Create an account on "https://taiga.io" and create a project
- Clone the git repo with the skeleton for the test framework: https://github.com/onikiforov/NTD-python-101
- Create ".env" file in project directory with the following info:
```
TAIGA_BASE_URL=https://api.taiga.io/api/v1
TAIGA_USERNAME=their_username
TAIGA_PASSWORD=their_password
TAIGA_PROJECT_ID=their_project_id - instructions to get it are in the README in the repo
Optional:
- Node.js (https://nodejs.org/en) and Allure: `npm install -g allure` - optional for Allure reports, as the tasks can be done without this tool
- any proxy tool (mitmproxy, Charles, Burp Suite) - optional to work with proxy tools for debugging
Key Takeaways:- Understand the role of API tests within a modern testing and automation infrastructure
- Learn the strengths, limitations, and common pitfalls of REST API testing
- Gain practical knowledge on evolving API tests from basic checks to more advanced approaches, including data classes and JSON schema validation