robertdewilde-dev/ai-workflow-rules/role-test-writer
Claude Code and agent skill by robertdewilde-dev/ai-workflow-rules
- community
Checking that the SKILL.md file is still in the repository.
Generic test writer knowledge for AI development workflow. Covers test writing methodology, Arrange-Act-Assert pattern, data seeding vs UI approach decisions, background test execution, and completion reporting.
Install
npx vskill@latest install robertdewilde-dev/ai-workflow-rules/role-test-writerSKILL.md
The same SKILL.md was published earlier as robertdewilde-dev/ai-workflow-rules/role-test-writer.
Test Writer
Convert acceptance criteria into automated E2E tests that verify features through the actual app UI.
Core Responsibilities
- Convert acceptance criteria into test assertions
- Follow established test patterns exactly -- consistency is critical
- Handle known framework gotchas that cause false failures
- Update test registration/bundle when adding new tests
- Ensure tests are self-contained -- each starts from scratch
Running Tests
Always run tests in background -- never block the conversation waiting for results. Fire and forget, check results later.
Test Structure: Arrange-Act-Assert
Data Seeding vs UI Approach
| Scenario | Approach | Reason | |
|---|---|---|---|
| Test IS the creation flow | UI interactions | Testing the creation itself | |
| Test needs pre-existing data | Data seeding helper | Faster, more reliable | |
| Test needs multiple items | Batch data seeding | Avoid slow UI repetition | |
| Test needs related entities | Seed parent + children | Correct relationships |
Decision Matrix
Critical rule: Always seed data AFTER authentication (the seeding helper needs an authenticated user context).
Process
Step 1: Read the User Story
- Get acceptance criteria
- Identify UI elements to interact with
- Identify UI elements to assert on
Step 2: Check Existing Patterns
- Read 1-2 existing tests to match current style
- Read shared test helpers for available utilities
- Decide: does this test need pre-existing data?
Step 3: Plan the Test Flow
For each acceptance criterion:
| Need | Technique | |
|---|---|---|
| User action | tap, enter text, swipe, scroll | |
| Element visible | wait until visible, find widget | |
| Element NOT visible | pump/settle + expect not found | |
| Async operation | explicit wait with sufficient duration |
Step 4: Write the Test
- One test per file (if framework requires single-test bundles)
- Use shared authentication helper
- Use shared onboarding skip helper
- Follow Arrange-Act-Assert structure
- Add comments explaining WHY, not WHAT
Step 5: Verify Selectors
Check actual source code to confirm:
- Text labels match the widget implementation
- Widgets are findable by the selector strategy used
- Text matching is case-sensitive and exact
Step 6: Update Test Registration
After creating the test file, update any test bundle/registry as required by the framework.
Common Gotchas (Generic)
| Issue | Cause | Fix | |
|---|---|---|---|
| Text not found | Rich text vs plain text widget | Check actual widget type in source | |
| Timeout on settle | Continuous animation blocks settle | Use timed pump instead | |
| Auth timing | Async auth takes time | Add explicit wait (8+ seconds) | |
| Stale state | Previous test data leaks | Ensure fresh state per test | |
| Element covered | Keyboard or overlay blocks element | Dismiss keyboard first or use direct tap | |
| Wrong field targeted | Multiple similar fields | Use index-based selection |
Completion Report Format
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/role-test-writer/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
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/robertdewilde-dev/ai-workflow-rules/role-test-writer)