dev-test

from codihaus/claude-skills

Claude Skills

0 stars0 forksUpdated Jan 25, 2026
npx skills add https://github.com/codihaus/claude-skills --skill dev-test

SKILL.md

/dev-test - Implementation Testing

Skill Awareness: See skills/_registry.md for all available skills.

  • After: /dev-coding implementation complete
  • Auto-triggered: By /dev-coding after implementation
  • If fails: Loop back to fix, then re-test

Automated testing using Playwright to verify implementation works correctly.

When to Use

  • After completing feature implementation
  • After fixing bugs
  • Before code review
  • Before committing changes

Usage

/dev-test                         # Test current implementation
/dev-test UC-AUTH-001             # Test specific use case
/dev-test --url http://...        # Test specific URL
/dev-test --fix                   # Auto-fix issues found

What It Tests

CheckMethodCatches
Console Errorsbrowser_console_messagesJS errors, React errors, warnings
Network Failuresbrowser_network_requestsAPI 4xx/5xx, failed fetches, timeouts
Visual Statebrowser_snapshotRender errors, missing elements
Interactionsbrowser_click, browser_typeForm failures, broken buttons

Expected Outcome

Test report showing whether implementation works correctly.

Report includes:

  • Overall status (Pass/Fail + issue count)
  • Issues found (critical/warning with location + suggested fix)
  • Test steps executed (which passed/failed)
  • Suggested fixes or next actions

Success Criteria

  • No console errors during user flows
  • No network failures (API 4xx/5xx)
  • Expected elements render correctly
  • User interactions work as expected
  • Happy path completes successfully
  • All acceptance criteria from spec verified

What to Test

From UC spec:

  • Expected user flows (happy path)
  • Required inputs and outputs
  • Acceptance criteria
  • Error scenarios (if specified)

From recent changes:

  • Modified components/endpoints
  • New functionality added

Error Detection

CheckWhat It Catches
Console ErrorsJS errors, React errors, warnings, unhandled promises
Network FailuresAPI 4xx/5xx, failed fetches, timeouts
Visual StateRender errors, missing elements, wrong state
InteractionsForm failures, broken buttons, navigation issues

Error categories:

  • 🔴 Critical: Breaks functionality, must fix
  • 🟡 Warning: Should fix, not blocking

Test Approach

1. Prepare:

  • Identify what to test (from spec + recent changes)
  • Determine test URL (from spec or default: http://localhost:3000)
  • Verify dev server running (prompt if not)

2. Execute User Flows:

  • Navigate to page
  • Capture initial state (check page loads, no immediate errors)
  • Execute happy path (fill forms, click buttons, navigate)
  • Wait for expected results
  • Capture final state

3. Collect Errors:

  • Console messages (errors, warnings)
  • Network requests (find failures)
  • Visual issues (missing elements)

4. Report:

  • Status (pass/fail + count)
  • Issues with severity, location, suggested fix
  • Test steps executed (which passed/failed)

5. Fix Loop (if --fix):

  • For each issue: read file, identify fix, apply fix, re-test
  • Continue until fixed or max iterations (3) or needs user input
  • Re-run full test to verify

Test Patterns

Available as reference in original SKILL.md:

  • Form submission
  • Navigation flow
  • API response validation
  • Error state testing

Use Playwright MCP tools to interact with browser.

Test Patterns

Form Submission

// 1. Fill form
await browser_fill_form({
  fields: [
    { name: 'Email', type: 'textbox', ref: 'input-email', value: 'test@test.com' },
    { name: 'Password', type: 'textbox', ref: 'input-password', value: 'password123' }
  ]
});

// 2. Submit and wait
await browser_click({ element: 'Submit button', ref: 'btn-submit' });
await browser_wait_for({ text: 'Success' });

// 3. Check for errors
const errors = await browser_console_messages({ level: 'error' });

Navigation Flow

// 1. Start at page A
await browser_navigate({ url: '/dashboard' });

// 2. Click to page B
await browser_click({ element: 'Settings link', ref: 'nav-settings' });
await browser_wait_for({ text: 'Settings' });

// 3. Verify correct page
const snapshot = await browser_snapshot({});
// Check snapshot contains expected elements

API Response Validation

// 1. Trigger API call (via form submit or button)
await browser_click({ element: 'Load data', ref: 'btn-load' });
await browser_wait_for({ time: 2 });

// 2. Check network requests
const requests = await browser_network_requests({});

// 3. Find the API call
const apiCall = requests.find(r => r.url.includes('/api/data'));

// 4. Validate
if (apiCall.status >= 400) {
  // Report error
}

Error State Testing

// Test error handling by submitting invalid data
await browser_type({
  element: 'email',
  ref: 'input-email',
  text: 'invalid-email'  // No @ symbol
});

await browser_click({

...
Read full content

Repository Stats

Stars0
Forks0