Learn Everything

Module · Claude Engineer

Testing with Claude Code

Tests written first, failures read properly, and the regression that never comes back.

2 topics4 interactive tasks

TOPIC 01

Write the Test

The test is the specification, and the agent should meet it rather than write it after.

What you'll practice

  • Ask for the Failing Test First — guided · beginner
  • Scope a Test Properly — practice · intermediate

A command you'll meet

cat ~/.claude/testing/brief.md

A test written after the code proves the code matches itself. Open the task below for the full walkthrough.

TOPIC 02

Fix the Failure

Read the error, fix the cause, and keep the regression from coming back.

What you'll practice

  • Read a Failing Test Before Fixing It — practice · intermediate
  • Guard the Regression — challenge · advanced

A command you'll meet

cat ~/.claude/testing/failures.md

The error message is the most precise specification you will ever be given. Open the task below for the full walkthrough.