Agentic Toolkit Course
Lesson 6 of 7

Lesson 6 of 7 · Individual agent

The Unit Tester agent

Unit tests are the backbone of software development. The Unit Tester can be called directly, or used by the Orchestrator in the testing stage of the larger SDLC. The Unit Tester understands the testing patterns and standards for the code being worked on, and helps create or improve tests around an implementation.

When to use the Unit Tester

How to use the Unit Tester

  1. Point the Unit Tester at the files or functions that were changed.
  2. Describe the behaviour that was added or modified.
  3. Name the test framework in use (Jest, pytest, xUnit, etc.).
  4. List expected scenarios and edge cases to cover, and any known limitations.
  5. If you're after a coverage gap-analysis rather than new tests, say which modules to focus on.
"I just added a new calculateDiscount function in
src/pricing/discounts.ts that handles percentage discounts, fixed-amount
discounts, and stacked discounts. Write unit tests covering the happy
path for each discount type, edge cases like zero amount, negative
values, and discounts exceeding the total, and verify it integrates
with the existing applyToCart function."
Where the Unit Tester fits in the Orchestrator: the Unit Tester runs as Stage 4, using the changed files and handoff notes from the Coder. If tests fail, the Orchestrator sends the failure details back to the Coder for a fix, then re-runs the Unit Tester — up to two retry cycles before escalating to you.

Things to avoid

Test your knowledge

The Unit Tester finds a function that can't be meaningfully tested as written. What does the Unit Tester do?

Source: documentation.md, "Unit Tester".

← Back: Coder agent Next: Code Reviewer agent →