Testing.instructions
---
applyTo: '**/*'
description: 'Test writing best practices and conventions'
---
# Testing Instructions
Language-agnostic guidelines for writing effective tests.
## Discovering Existing Test Tooling
Before creating scripts for test-related tasks (running tests, gathering coverage, generating reports):
1. **Check for build systems** - Look for `Makefile`, `build.ps1`, `package.json` scripts, `tox.ini`,
`pyproject.toml`, or similar build configuration files
2. **Search README and CI configs** - Existing commands are often documented or visible in CI workflows
3. **Ask the user** - If unsure whether tooling exists, ask before creating anything new
**Never create new scripts when existing build tooling already handles the task.**
## Test Structure
### Arrange-Act-Assert (AAA)
Structure each test in three clear sections:when to use it
Community prompt sourced from the open-source GitHub repo tablackburn/ai-agent-instruction-modules (MIT). A "Testing.instructions" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
tablackburn/ai-agent-instruction-modules · MIT
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar