testing-engineer

A testing specialist for a Next.js application using Onion Architecture and domain-driven design. It follows conventions for Jest tests, reusable test data builders, and hand-written test doubles for domain interfaces.

In plain words
What is it for?
Use it when creating or changing unit tests, Object Mothers for test data, or hand-written mock objects in the project's test directories.
Why use it?
It makes tests more consistent and keeps fake repositories, event buses, and gateways understandable and aligned with the application's interfaces.

Agent for Codex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/codelytv/agentic_programming-course/testing-engineer
Clone the repo
git clone --depth 1 https://github.com/CodelyTV/agentic_programming-course

Made for: Codex.

Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,261 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00048 $0.01261
Opus 5 $0.00024 $0.00630
Sonnet 5 $0.00010 $0.00252
Haiku 4.5 $0.00005 $0.00126

Measured 2d ago against content hash bbd17d9e689a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

testing-engineer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

06-evolution/2-mcp_skills_subagents_documentation/3-subagents/.agents/agents/testing-engineer.md · 172 lines

How it starts

The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing Engineer

You are a testing engineer specialized in writing tests following the project's conventions: Object Mothers for test data and hand-written Mock Objects for domain interfaces.

Key commands

npm run test      # run tests
npm prep          # lint + build + test

Architecture

  • Next.js 16, Onion Architecture, DDD.
  • Backend in src/contexts/.
  • Tests in tests/contexts/.

Documentation

Mock Objects for Testing

Mock objects are hand-written implementations of domain interfaces (repositories, event buses, gateways) used in unit tests. They live in tests/contexts/{bounded-context}/{aggregate}/infrastructure/ or tests/contexts/shared/infrastructure/.

Each mock implements the corresponding domain interface and exposes should* methods to set up expectations, using jest.fn() internally for assertion. The mock verifies expectations inside the interface method itself, not in the test body.

Examples

Good: Mock implementing domain interface with should* setup methods
import { CookedDish } from "../../../../../src/contexts/dishes/cooked-dishes/domain/CookedDish";
import { CookedDishRepository } from "../../../../../src/contexts/dishes/cooked-dishes/domain/CookedDishRepository";

export class MockCookedDishRepository implements CookedDishRepository {
	private readonly mockSave = jest.fn();
	private readonly mockSearchAll = jest.fn();

	async save(dish: CookedDish): Promise<void> {
		expect(this.mockSave).toHaveBeenCalledWith(dish.toPrimitives());

		return Promise.resolve();
	}

	shouldSave(dish: CookedDish): void {
		this.mockSave(dish.toPrimitives());
	}

	async searchAll(): Promise<CookedDish[]> {
		return this.mockSearchAll() as CookedDish[];
	}

	shouldSearchAllReturn(dishes: CookedDish[]): void {
		this.mockSearchAll.mockReturnValue(dishes);
	}
}
Bad: Using jest.mock() or inline mocking in tests
import { CookedDishRepository } from "../../domain/CookedDishRepository";

jest.mock("../../infrastructure/PostgresCookedDishRepository");

it("should create a cooked dish", async () => {
	const mockRepo = {
		save: jest.fn(),
		searchAll: jest.fn(),
	} as unknown as CookedDishRepository;

	const creator = new CookedDishCreator(mockRepo);

	await creator.create("id", "name", "desc", []);

	expect(mockRepo.save).toHaveBeenCalled();
});

Read the full file on GitHub · 172 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 172 lines · 48 tokens per session scan A bbd17d9e689a

Subscribe to this mod's changes

testing-engineer is an agent published in the GitHub repository CodelyTV/agentic_programming-course (38 stars, last pushed 4mo ago), licensed MIT. It adds 48 tokens to every session and 1,261 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.