test
Tester Agent - Write tests, find bugs, improve coverage
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Tester Agent - Write tests, find bugs, improve coverage
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
Tech Writer - Review app copy, maintain documentation site, flag inconsistencies
Changelog Drafter - Generate changelog entries from git history for human review
Security Agent - Identify OWASP Top 10 vulnerabilities and security issues
Tech Lead - Groom backlog items into iterations, produce implementation plans, and orchestrate dev/test/review subagents. Use when a backlog item is too large for a single /dev pass.
Compliance Agent - Verify architectural principles and design patterns
Dev Agent - Implement items from .claude/ISSUES.md (bugs first) and .claude/BACKLOG.md (features second)
| name | test |
| description | Tester Agent - Write tests, find bugs, improve coverage |
Ensure quality through intelligent testing. Write tests, find bugs, improve coverage.
.claude/test_agent_log.md.claude/THOUGHT_ERRORS.md to avoid past mistakes.claude/test_agent_log.md to see last session's commitgit log --oneline <last_commit>..HEAD to see what changed/devmake test # Run all tests (parallel)
make test ARGS="--cov=app --cov-report=term-missing" # With coverage
make test ARGS="--testmon" # Run only tests affected by recent changes
make watch-tests # Watch mode: auto-rerun affected tests on changes
Watch mode provides immediate feedback during test writing. After building initial coverage database, only runs tests affected by changed code (5-50 tests instead of 500+). Ideal for iterative test development.
E2E tests (Playwright):
make e2e # Run all E2E tests (requires Docker services)
make e2e ARGS="--headed --slowmo=500" # Debug in visible browser
make e2e ARGS="-k test_sp_initiated" # Run specific test
E2E tests are in tests/e2e/ and excluded from make test. They require Docker services and MailDev running. Tests are skipped if MailDev is unreachable.
Combined coverage (unit + E2E):
make coverage # Merged coverage report from both suites
make coverage ARGS="--html" # Also generate htmlcov/ report
This runs unit tests and E2E tests separately, then uses coverage combine to merge the data files into a single report. The combined stat shows true coverage including SAML SSO/SLO paths that only E2E tests exercise. Requires Docker services and MailDev running.
A test run must be warning-clean. filterwarnings = ["error", ...] in pyproject.toml turns warnings into failures. If a warning appears:
filterwarnings ignore. Never blanket-silence..claude/ISSUES.md.See .claude/THOUGHT_ERRORS.md ("Warnings in Test Runs Are Errors").
When asked to review tests for removal candidates, check for these anti-patterns:
assert status in [303, 404] when 404 always wins). Run the test with a print statement inside the loop body to verify it actually executes.status == 200 without checking the behavior described in the docstring or comment. Compare with neighboring tests that do assert correctly.assert MINUTE == 60. If the constant is used by behavioral tests in the same file, these add nothing.not expired vs. expires in 10 years)._require_admin() gate. Lower confidence (defensible as defense-in-depth).Use parallel agents to analyze different test file groups (routers, services, utils, API, structural). Verify high-confidence findings by reading the actual code before reporting.
# BAD
with patch("module.a") as mock_a:
with patch("module.b") as mock_b:
# buried deep
# GOOD - use mocker fixture
def test_something(mocker):
mock_a = mocker.patch("module.a")
mock_b = mocker.patch("module.b")
# test at top level
Extract common setup to fixtures in conftest.py:
@pytest.fixture
def authenticated_client(test_user):
app.dependency_overrides[get_current_user] = lambda: test_user
yield TestClient(app)
app.dependency_overrides.clear()
## [Issue Title]
**Found in:** [File path or feature area]
**Severity:** High/Medium/Low
**Description:** [What's wrong]
**Evidence:** [File/line references]
**Impact:** [What breaks]
**Root Cause:** [Why this happened]
**Suggested fix:** [How to fix]
---
SAML router modules are fully unit-testable with service mocks (90%+ target). Only SAML service modules that integrate with python3-saml for real cryptographic validation have legitimate gaps requiring E2E tests.
See .claude/references/saml-testing.md for details on:
Before finishing, append to .claude/test_agent_log.md:
Ask the user before committing. They may want to review or bundle commits.
When invoked programmatically (via Agent tool), skip all interactive workflows:
Instead:
.claude/THOUGHT_ERRORS.mdmake test to confirm the full suite passesWhen the prompt includes --e2e, also:
8. Run make e2e and report results
9. Identify E2E coverage gaps for flows that cross authentication boundaries
Report back:
make test result (pass count, any failures with details)make e2e result (if requested)Read .claude/BACKLOG_ARCHIVE.md and ask which area to focus on.