liveBook · Manning

Test-driven development

Test-driven development is a software development practice in which tests are written before implementation and guide incremental coding and refactoring.

How 15 Manning books explain it

Effective Platform Engineering

Test-driven development is a software development approach in which tests are written to specify expected behavior before implementing the corresponding code.

How it is used
Uses tests to verify infrastructure requirements after deployment and detect configuration drift in nightly checks.
How deep it goes
Works through the failing-test, implementation, and refactoring cycle, then distinguishes module integration tests from acceptance-criteria checks.
Examples
Uses Karpenter subnet tags as acceptance criteria and proposes a fitness function that rejects service layers lacking tests.
What you can do after
Practice/perform it by writing a failing infrastructure test, applying code until it passes, and retaining the test for later checks.

Read how Effective Platform Engineering explains test-driven development →

The Art of Unit Testing 3e

A development technique in which a failing test is written before the production code that makes it pass, followed by refactoring or another test.

How it is used
Guides incremental implementation by making a failing test the starting point for each small behavior.
How deep it goes
Explains the fail-pass-refactor loop and its limits, while deferring detailed refactoring practice.
Examples
Illustrates the practice with the repeating failing-test, passing-code, and refactoring cycle diagram.
What you can do after
Practice/perform it by proving missing behavior with a failing test, implementing it, and refactoring under test coverage.

Read how The Art of Unit Testing 3e explains test-driven development →

Web Components in Action

Test-driven development is a software development methodology in which tests are written alongside or before the implementation they validate.

How it is used
Uses tests alongside component implementation to verify discrete behavior and meaningful browser-visible outcomes.
How deep it goes
Explains unit-oriented testing, browser execution, test suites, assertions, and failing boundary cases without surveying testing broadly.
Examples
Tests a slider's initial value, JavaScript updates, rendered position, and maximum and minimum boundaries.
What you can do after
Apply TDD with Web Component Tester by organizing suites, writing assertions, and exposing missing component behavior.

Read how Web Components in Action explains test-driven development →

Learn Rust in a Month of Lunches

Test-driven development is a software development technique in which tests are written before implementation code and guide the implementation toward passing behavior.

How it is used
Uses tests written before implementation to guide a Rust calculator toward specified behavior.
How deep it goes
Works through failing tests and successive corrections, but defers refactoring and returning a Result instead of panicking.
Examples
Uses a string-input subtraction calculator with five tests for arithmetic, consecutive minus signs, trailing characters, and invalid input.
What you can do after
Practice/perform it by writing failing behavior tests, implementing corrections, and rerunning tests after changes.

Read how Learn Rust in a Month of Lunches explains test-driven development →

Build Financial Software with Generative AI (From Scratch)

Test-driven development is a software-development practice in which tests are written before or alongside implementation and guide short implementation cycles.

How it is used
Guides verification of generated and hand-written payment-processing code through short test-and-code cycles.
How deep it goes
Works through failing-to-passing unit and API tests, while leaving load testing and extensive UI testing largely unrevisited.
Examples
Uses ACH file line and record tests, an initially missing batches API, and database-backed exception validation.
What you can do after
Practice/perform it: write a failing test, add focused logic, rerun it, and strengthen tests for release pipelines.

Read how Build Financial Software with Generative AI (From Scratch) explains test-driven development →

BDD in Action, Second Edition

Test-driven development is a software development technique in which automated tests are created before the implementation they verify.

How it is used
Uses tests written before implementation to specify, design, and verify component behavior while making changes safer.
How deep it goes
Details the failing-test, minimal-code, refactor cycle and shows test names, but does not walk through a complete implementation.
Examples
Contrasts broad bank-account test names with tests specifying particular transfer and fee behaviors.
What you can do after
Practice/perform it by writing a failing unit test, making it pass with minimal code, and refactoring.

Read how BDD in Action, Second Edition explains test-driven development →

Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools

Test-driven development is a software-development practice in which automated tests are written before the implementation they specify.

How it is used
Uses automated tests as executable specifications for designing tools and adding features before implementation.
How deep it goes
Explains the test-first cycle and regression value, but stops short of naming a testing framework or showing test code.
Examples
Uses Get-MachineInfo usage forms and optional failure logging as concrete specifications for command behavior.
What you can do after
Apply it via automated tests that define a feature, expose its initial failure, and guide implementation until behavior passes.

Read how Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools explains test-driven development →

Unit Testing Principles, Practices, and Patterns

Test-driven development is a software development process in which tests guide incremental implementation and refactoring.

How it is used
Guides each implementation change through a failing test, minimal passing code, and refactoring.
How deep it goes
Defines a repeatable three-stage loop and extends it to outside-in system design with mocks.
Examples
Uses failing tests, minimal implementations, passing-test protection, and collaborator expectations as concrete artifacts.
What you can do after
Build it incrementally through failing tests, minimal implementations, and protected refactoring.

Read how Unit Testing Principles, Practices, and Patterns explains test-driven development →

The AI Pocket Book

A development practice where tests are written for small units of behavior before or alongside code implementation.

How it is used
Positions validation as a central, tightly coupled part of delivering robust software.
How deep it goes
Explains units, edge cases, tests, passing implementations, and scope tradeoffs, but stops short of tools or frameworks.
Examples
Uses individual tests and persistent replacements for print-statement checks as practical examples.
What you can do after
Practice/perform TDD by turning anticipated failures and ad hoc checks into lasting tests.

Read how The AI Pocket Book explains test-driven development →

Go in Action, Second Edition

A test-driven workflow is a development process that begins with failing automated tests and incrementally implements code until the tests pass.

How it is used
Uses failing tests to define APIs, guide implementation, and enforce behavioral contracts.
How deep it goes
Demonstrates API design, failure-first tests, implementation steps, and passing verification, while stopping short of broader TDD theory.
Examples
Uses a Go Calculator, invalid operations, division by zero, stored results, and go test failure and success output.
What you can do after
Build it from scratch by specifying a Go API, writing failing tests, implementing behavior, and confirming the result with go test.

Read how Go in Action, Second Edition explains test-driven development →

Software Testing with Generative AI

Test-driven development is a software development practice in which failing checks are created before production code, code is added to make them pass, and the code is then refactored while checks remain passing.

How it is used
Uses unit checks to guide incremental development and build quality into products.
How deep it goes
Explains the red/green/refactor procedure and its rationale, but stops short of detailed implementation code.
Examples
Demonstrates a timesheet manager feature involving projects, half-hour units, required inputs, and user-specific visibility.
What you can do after
Apply it to build incrementally testable features while preserving passing checks during refactoring.

Read how Software Testing with Generative AI explains test-driven development →

100 Java Mistakes and How to Avoid Them

Test-driven development is a software development methodology in which tests are written before the implementation code.

How it is used
Uses failure-first testing to validate that tests are active before implementation is considered correct.
How deep it goes
Defines the test-before-code rule and failure check, but does not develop a complete TDD workflow.
Examples
Uses missing @Test annotations, absent IDE Run icons, and weak assertNotNull or assertNotEquals calls as failure modes.
What you can do after
Diagnose ineffective tests by forcing failures and checking test recognition and assertion strength.

Read how 100 Java Mistakes and How to Avoid Them explains test-driven development →

Django in Action

Test-driven development is a software development approach in which tests are written before the implementation they verify.

How it is used
Uses tests to define a function’s interface and guide implementation before production code is written.
How deep it goes
Defines the test-first loop and completion rule, but does not provide implementation code or detailed testing procedures.
Examples
Uses function interfaces, unit tests, integration tests, behavioral tests, and UI tests as its concrete artifacts.
What you can do after
Apply TDD by writing a function’s tests first and implementing until those tests pass.

Read how Django in Action explains test-driven development →

Pro ASP.NET Core 7, Tenth Edition

Test-driven development is a software development practice in which tests are written before the implementation they verify.

How it is used
Uses tests to define feature behavior before implementation and guide incremental application development.
How deep it goes
Explains the rationale and red-to-green cycle, but stops short of presenting detailed TDD variations or a complete test-first feature build.
Examples
Uses an ASP.NET Core controller, Product objects, IDataSource, and a fake data source to illustrate isolated tests.
What you can do after
Practice/perform test-first development with explicit success criteria and progressively broader feature coverage.

Read how Pro ASP.NET Core 7, Tenth Edition explains test-driven development →

Tiny Python Projects: Learn coding and testing with puzzles and games

Test-driven development is a software development practice in which tests are written before implementation and repeatedly run to guide development and detect regressions.

How it is used
Uses a test suite as an integral part of writing programs and checking minimum correctness.
How deep it goes
Defines the red-green-refactor cycle and demonstrates it with a small function, but defers how to write tests generally.
Examples
Uses an add1() function, assertion cases for zero and signed values, and a Pytest test run.
What you can do after
Apply it via Pytest to implement small functions, verify expected behavior, and refactor with regression protection.

Read how Tiny Python Projects: Learn coding and testing with puzzles and games explains test-driven development →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.