04-testing

A testing guide for an agent server, covering unit tests, integration tests, and end-to-end tests. Unit tests check small pieces, integration tests check connected parts such as a database, and end-to-end tests check complete workflows.

In plain words
What is it for?
Use it to run all tests, select a specific test group, create coverage reports, test staging or production deployments, and use the interactive test menu.
Why use it?
It explains how to run the right checks locally or on deployed environments. This reduces guesswork when verifying whether the agent server works correctly.

Agent

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/jazzmind/busibox/04-testing
Clone the repo
git clone --depth 1 https://github.com/jazzmind/busibox
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,640 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00014 $0.02640
Opus 5 $0.00007 $0.01320
Sonnet 5 $0.00003 $0.00528
Haiku 4.5 $0.00001 $0.00264

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

Security

Grade A, and why

04-testing scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://authz-lxc:8080/.well-known/jwks.json
docs/developers/services/agents/04-testing.md · 443 lines

How it starts

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

Agent Server Testing Guide

Overview

The agent server has comprehensive test coverage with unit, integration, and e2e tests. Tests can be run locally during development or on deployed infrastructure.

Quick Start

Local Testing

# Setup virtual environment (first time only)
cd /Users/wessonnenreich/Code/sonnenreich/busibox/srv/agent
bash scripts/setup-venv.sh
source venv/bin/activate

# Run all tests
make test

# Run specific test suites
make test-unit           # Fast, isolated unit tests
make test-integration    # Integration tests with DB
make test-cov            # Tests with coverage report

Deployed Testing (via MCP)

# From busibox/provision/ansible directory

# Test environment
make test-agent INV=inventory/staging
make test-agent-unit INV=inventory/staging
make test-agent-integration INV=inventory/staging
make test-agent-coverage INV=inventory/staging

# Production environment
make test-agent
make test-agent-unit
make test-agent-integration
make test-agent-coverage

# Interactive test menu
make test-menu

Test Structure

tests/
├── conftest.py              # Shared fixtures (DB, auth, agents)
├── test_health.py           # Smoke test
├── unit/                    # Fast, isolated tests
│   ├── test_auth_tokens.py  # JWT validation, claims
│   ├── test_token_service.py # Token caching/exchange
│   ├── test_busibox_client.py # HTTP client
│   ├── test_agents_core.py  # Agent validation
│   ├── test_run_service.py  # Run execution logic
│   ├── test_dispatcher.py   # Dispatcher schema validation
│   ├── test_dynamic_loader.py # Dynamic agent loading
│   ├── test_scheduler.py    # Scheduled runs
│   ├── test_workflow_engine.py # Workflow execution
│   └── test_scorer_service.py # Performance evaluation
└── integration/             # Tests with real DB
    ├── test_api_runs.py     # Runs API endpoints
    ├── test_api_streams.py  # SSE streaming
    ├── test_api_agents.py   # Agent CRUD
    ├── test_api_schedule.py # Scheduling API
    ├── test_api_workflows.py # Workflow API
    ├── test_api_scores.py   # Scoring API
    ├── test_personal_agents.py # Personal agent filtering
    ├── test_dispatcher_routing.py # Query routing
    ├── test_tool_crud.py    # Tool CRUD operations
    ├── test_workflow_crud.py # Workflow CRUD
    └── test_evaluator_crud.py # Evaluator CRUD

Read the full file on GitHub · 443 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 · 443 lines · 14 tokens per session scan A 5480b7f3a604

Subscribe to this mod's changes

04-testing is an agent published in the GitHub repository jazzmind/busibox (7 stars, last pushed 5d ago), licensed MIT. It adds 14 tokens to every session and 2,640 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

test-engineer

Test strategy, integration/e2e coverage, flaky test hardening, TDD workflows. Use when: writing tests, test strategy, TDD enforcement, flaky test diagnosis, coverage gap analysis, test suite design, red-green-refactor cycle.

zereight/gitlab-mcp · 53 tokens

qa-tester

Writes tests, builds test suites, and discovers edge cases across unit, integration, and E2E levels.

Doorman11991/smallcode · 26 tokens

nodejs-testing-expert

Node.js testing specialist. Knows when to mock vs. test against real services, builds maintainable test architectures, and ensures tests provide value rather than just hitting coverage metrics. Use for test strategy, writing tests, and debugging test failures.

adcontextprotocol/adcp · 54 tokens

test-engineer

Testing expert for .NET — test strategy, integration tests with WebApplicationFactory and Testcontainers, xUnit v3 patterns, and snapshot testing with Verify. Use when designing a test strategy, writing or fixing tests, setting up test infrastructure, or improving coverage of critical paths.

codewithmukesh/dotnet-claude-kit · 59 tokens

TESTING_GUIDE

How to test the Copilot plugin across three layers — unit, integration, and end-to-end. Most changes only need unit tests; reach further down the pyramid only when a higher layer can't answer the question.

logancyang/obsidian-copilot · 0 tokens

coverage-analyst

Test coverage analysis expert. Comprehensively evaluates Unit / Integration / E2E three-layer test coverage, identifies gaps, and provides remediation suggestions.

sd0xdev/sd0x-harness · 34 tokens