Code: 54396942
Testing FastAPI with pytestA Practical Guide to Unit Testing, Integration Testing, API Test Automation, Database Testing, Mocking, and Test-Driven DevelopmentBuild Reliable, Secure, and Production-Ready FastAPI Applications Throug ... more
English
20.29 €
RRP: 22.51 €
You save 2.22 €
Enter your e-mail address and once book will be available,
we will send you a message. It's that simple.
You get 49 loyalty points
Book synopsis
Testing FastAPI with pytest
A Practical Guide to Unit Testing, Integration Testing, API Test Automation, Database Testing, Mocking, and Test-Driven Development
Build Reliable, Secure, and Production-Ready FastAPI Applications Through Practical Automated Testing.
Writing a FastAPI application is only the beginning. Building an API that behaves correctly, handles failures gracefully, protects sensitive operations, and remains reliable as it grows requires a solid testing strategy.
Testing FastAPI with pytest provides a practical, step-by-step approach to testing Python REST APIs using pytest, HTTPX, SQLAlchemy, and modern testing techniques. Designed for Python developers and backend engineers, this book takes you beyond basic test examples and demonstrates how to build maintainable, automated test suites for real-world FastAPI applications.
Through hands-on examples and a continuous API project, you'll learn how to:
Master pytest fundamentals: Write effective unit tests, reusable fixtures, parametrized tests, and maintainable assertions.
Test FastAPI endpoints: Use TestClient, HTTPX, and dependency overrides to validate API requests, responses, and error handling.
Implement database testing: Test SQLAlchemy repositories, database transactions, and PostgreSQL-backed applications with isolated test environments.
Verify authentication and security: Test JWT validation, protected endpoints, authorization rules, and access-control boundaries.
Apply mocking and test-driven development: Isolate external services, simulate failures, and use the red-green-refactor workflow to develop reliable features.
Automate testing workflows: Measure test coverage, investigate flaky tests, and integrate pytest with GitHub Actions for continuous integration.
The book also explores asynchronous testing, property-based testing, concurrency scenarios, troubleshooting, and practical techniques for improving long-term software quality.
Whether you're learning FastAPI testing for the first time or strengthening an existing Python backend, this guide will help you develop the skills to detect defects earlier, prevent regressions, and deliver APIs with greater confidence.
Stop relying on manual checks. Start building FastAPI applications backed by meaningful, repeatable automated tests.
Charles J. Dardar
Book details
20.29 €
EnglishOsobný odber Bratislava a 13656 dalších
Copyright ©2008-26 najlacnejsie-knihy.sk Všetky práva vyhradenéSúkromieCookies
25 miliónov titulov
Vrátenie do mesiaca
02/210 210 99 (8-15.30h)Nákupný košík ( prázdny )
Nachádzate sa: