Test-Driven Development with Python

$71.99

Taxes may apply at checkout.

Test-Driven Development with Python

Obey the Testing Goat: Using Django, Selenium, and JavaScript

Computer programming / software engineering Web programming Programming and scripting languages: general Software testing and verification Computer security

Author: Harry Percival

Dinosaur mascot

Language: English

Published by: O'Reilly Media

Published on: 30th October 2025

Format: LCP-protected ePub

ISBN: 9781098148676


Overview

The third edition of this trusted guide shows you how to apply test-driven development (TDD) to building real-world web applications with Python. By writing tests before building each part of your app and then creating just enough code to pass them, you'll learn how TDD leads to clean, reliable, and maintainable software.

Author and Content

Author Harry J.W. Percival takes you through a practical, end-to-end example of web development using Python 3.14 and Django 5. Along the way, you'll explore tools like Selenium, JavaScript, Git, and mocking, and discover how TDD supports better design decisions, encourages continuous improvement, and instills confidence in your codebase.

Who Is This For

Whether you're a professional developer or just transitioning into web development, this book offers hands-on experience with modern testing workflows and architecture.

Key Practices Covered

Follow the full TDD workflow, from writing tests first to refactoring with confidence. Write unit tests for core logic and functional tests for browser-based interactions. Use mock objects to isolate external systems and simplify integration. Package your application using Docker. Automate deployments and test your code in a staging environment. Validate third-party plug-ins and dependencies within your test suite. Set up continuous integration to run your tests automatically. Enrich your frontend with test-driven JavaScript.

Show moreShow less