GuideIntermediate

Testing Backend Applications Guide

Learn backend testing in Python end to end: pytest 9 with fixtures, parametrize and conftest; mocking with unittest.mock and pytest-mock; integration tests against a real PostgreSQL with SQLAlchemy 2.1, testcontainers and factory_boy; E2E tests for FastAPI with TestClient and AsyncClient; coverage with pytest-cov, the TDD cycle, and CI with GitHub Actions. You finish with a production-grade test suite at 80% coverage or more.

lessons
48
modules
6
available in
English · Spanish
certificate
Yes
access
Free
Outcomes

What you'll be able to do

  • Pytest Fundamentals: Fixtures, parametrize, markers, conftest.py, plugins
  • Unit Testing: Functions, classes, dependency isolation, advanced assertions
  • Mocking: unittest.mock, pytest-mock, patching, side effects, spec
  • Integration Testing: Test databases, SQLAlchemy fixtures, factories with factory_boy
  • E2E Testing: FastAPI TestClient, full workflows, auth testing
  • Coverage: pytest-cov, coverage reports, thresholds, branch coverage
  • TDD: Red → Green → Refactor, test-first development
  • CI: GitHub Actions, test pipeline, automated coverage checks
Before you start

What you need to bring

Requirements and materials

  • FastAPI Fundamentals and Advanced completed (#6-#7)
  • PostgreSQL & SQLAlchemy Guide completed (#8)
  • Authentication & Authorization Guide completed (#9)
  • A working API with endpoints, models and auth
Content

The syllabus, module by module

Open any of them to see its lessons.

Bootcamps

Keep going with the full bootcamp.

At your own pace or 1:1, whichever you need.

Common questions

What people usually ask

Start whenever you like

Reviews

What students say

These reviews are from enrolled students who completed at least 50% of the course. We moderate reviews only on content grounds (spam, offensive language, personal data), never for being critical or negative.

No approved reviews yet.

Be the first to share your experience!