andreaswasita/copilot-agents-dojo/test-writing
Claude Code and agent skill by andreaswasita/copilot-agents-dojo
- community
Checking that the SKILL.md file is still in the repository.
Writes meaningful tests that actually catch bugs.
Install
npx vskill@latest install andreaswasita/copilot-agents-dojo/test-writingSKILL.md
Test Writing Skill
Produces tests that fail when the code is wrong — not tests that exist for coverage theatre. Covers happy path, edge cases, error paths, and state transitions. Does NOT chase 100% coverage as a goal; chases meaningful coverage that catches real regressions.
When to Use
- Writing tests for new code or features.
- Adding coverage to an untested area before changing it.
- A bug slipped through that tests should have caught.
- Practicing test-driven development.
- The
verify-before-doneskill flagged missing coverage. - NOT when the user explicitly asked for a spike or throwaway script.
Prerequisites
- A test framework installed for the stack (pytest, vitest, jest, go test, xUnit, JUnit).
- Ability to run the test suite via the
powershelltool. - The
view,edit, andgreptools to read existing patterns. - A baseline run of the existing suite passing.
How to Run
Quick Reference
| Stack | Framework | Run command | |
|---|---|---|---|
| TypeScript | Vitest / Jest | npm test or npx vitest | |
| Python | pytest | pytest or python -m pytest | |
| Java | JUnit 5 | mvn test or gradle test | |
| Go | testing | go test ./... | |
| .NET | xUnit | dotnet test |
| Scenario type | Must cover | |
|---|---|---|
| Happy path | Valid input → expected output | |
| Edge case | Empty, null, boundary, maximum size | |
| Error case | Invalid input, dependency failure, timeout | |
| State transition | Stateful object moves between valid states |
Procedure
Step 1: Read the Existing Pattern
Use grep for test_* or *.spec.* files and view one of them. Match the project's naming, location, fixtures, and assertion style. Do not introduce a second testing dialect.
Step 2: Enumerate Scenarios
For the code under test, list:
- Happy path inputs.
- Edge cases (empty, null, boundary, max).
- Error cases (invalid input, dependency failure).
- State transitions, if stateful.
Step 3: Write Arrange-Act-Assert
Name tests as documentation: test_login_with_expired_token_returns_401, not test_login.
Step 4: For Bug Fixes — Test First
- Write a test that reproduces the bug.
- Run it. Confirm it fails for the right reason.
- Implement the fix.
- Run it. Confirm it passes.
- Run the full suite — no regressions.
Step 5: Run and Record
Run the suite via the powershell tool. Capture pass/fail counts and paste them into the tasks/todo.md Verification Results block (per verify-before-done).
Pitfalls
- DO NOT write tests that cannot fail (
assert user is not Noneon a freshly constructed object). - DO NOT test implementation details (e.g. mocking that
quicksortwas called). Test the behavior. - DO NOT mock the world. Prefer real collaborators where the cost is acceptable.
- DO NOT ignore a flaky test — fix it or delete it. A flaky test erodes trust in the whole suite.
- DO NOT chase 100% coverage as a target. Coverage is a metric, not a mission.
Verification
- [ ] Every new test was observed to fail before it passed (TDD) OR a deliberate mutation was introduced to confirm it fails.
- [ ] The full suite is green after the change.
- [ ] Test names describe scenario + expected behavior.
- [ ] Each bug fix has a regression test that would have caught the original bug.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/test-writing/SKILL.md
Popularity
- Repository stars
- 32
- Repository forks
- 12
- 7-day trend score
- 17
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 29 Apr 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/andreaswasita/copilot-agents-dojo/test-writing)