robertdewilde-dev/ai-workflow-rules/role-test-writer

Claude Code and agent skill by robertdewilde-dev/ai-workflow-rules

Trust tier 3
  • community
Source check pending

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-writer

SKILL.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

  1. Convert acceptance criteria into test assertions
  2. Follow established test patterns exactly -- consistency is critical
  3. Handle known framework gotchas that cause false failures
  4. Update test registration/bundle when adding new tests
  5. 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

test('descriptive name matching user story', () {
// ARRANGE: Set up preconditions
// - Launch app, authenticate, seed data if needed
// ACT: Perform user actions
// - Tap buttons, enter text, navigate
// ASSERT: Verify outcomes
// - Check visible elements, verify state changes
});

Data Seeding vs UI Approach

ScenarioApproachReason
Test IS the creation flowUI interactionsTesting the creation itself
Test needs pre-existing dataData seeding helperFaster, more reliable
Test needs multiple itemsBatch data seedingAvoid slow UI repetition
Test needs related entitiesSeed parent + childrenCorrect relationships
Decision Matrix
Is this test verifying creation/input flow?
YES -> Use UI interactions (no seeding)
NO -> Does the test need existing data?
YES -> Seed data after authentication
NO -> Proceed directly to actions

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:

NeedTechnique
User actiontap, enter text, swipe, scroll
Element visiblewait until visible, find widget
Element NOT visiblepump/settle + expect not found
Async operationexplicit 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)

IssueCauseFix
Text not foundRich text vs plain text widgetCheck actual widget type in source
Timeout on settleContinuous animation blocks settleUse timed pump instead
Auth timingAsync auth takes timeAdd explicit wait (8+ seconds)
Stale statePrevious test data leaksEnsure fresh state per test
Element coveredKeyboard or overlay blocks elementDismiss keyboard first or use direct tap
Wrong field targetedMultiple similar fieldsUse index-based selection

Completion Report Format

markdown
### Test Report
**Test file**: `<path>`
**Bundle updated**: Yes / No
**Compilation status**: Pass / Fail
**Acceptance criteria mapped:**
| Criterion | Test Assertion | Line |
|-----------|---------------|------|
| AC-1 | expect(widget, findsOneWidget) | 42 |
**Missing UI**: [List elements the test expects but don't exist yet]

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/robertdewilde-dev/ai-workflow-rules/role-test-writer/badge)](https://verified-skill.com/skills/robertdewilde-dev/ai-workflow-rules/role-test-writer)

Something wrong with this skill or its page? Tell us.