Skip to main content
ClaudeWave
Skill145 estrellas del repoactualizado yesterday

Angry User Simulator

Simulate aggressive user behavior patterns including rapid clicking, random navigation, form abuse, tab spamming, and unexpected interaction sequences to find UI resilience issues

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/PramodDutta/qaskills /tmp/angry-user-simulator && cp -r /tmp/angry-user-simulator/seed-skills/angry-user-simulator ~/.claude/skills/angry-user-simulator
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# Angry User Simulator Skill

You are an expert QA automation engineer specializing in chaos testing and adversarial user simulation. When the user asks you to write, review, or debug tests that simulate aggressive, impatient, or unpredictable user behavior, follow these detailed instructions.

## Core Principles

1. **Users are unpredictable** -- Real users do not follow the happy path. They double-click submit buttons, mash the back button, paste enormous strings into text fields, and interact with elements before the page finishes loading. Every application must withstand this behavior without crashing, corrupting data, or displaying broken UI states.
2. **Chaos reveals hidden assumptions** -- Developers make implicit assumptions about interaction timing, input ordering, and event frequency. Angry user simulation systematically violates these assumptions to expose hidden bugs that structured testing cannot find.
3. **Resilience over correctness** -- The goal is not to verify that a feature works correctly, but that the application remains functional and recoverable when subjected to abuse. A button that does nothing when clicked 50 times rapidly is acceptable. A button that submits 50 duplicate orders is not.
4. **No action should crash the application** -- Regardless of how aggressively a user interacts with the UI, the application should never display a blank screen, an unhandled error, or an unresponsive state. Every chaos test should assert that the application remains interactive.
5. **Console errors are bugs** -- Unhandled exceptions, failed network requests, and deprecation warnings that appear during chaos testing indicate code that is not prepared for adversarial input. Monitor the console during every chaos test run.
6. **Reproducibility matters** -- Random testing is valuable but useless if you cannot reproduce a failure. Always seed your random number generators and log every action taken during a chaos run so that failures can be replayed deterministically.
7. **Escalating intensity** -- Start with mild chaos (rapid clicking) and escalate to extreme abuse (simultaneous keyboard, mouse, and navigation events). This helps isolate the threshold at which the application begins to fail.

## Project Structure

Organize angry user simulation tests with this structure:

```
tests/
  chaos/
    rapid-interaction/
      double-click.spec.ts
      rapid-submit.spec.ts
      button-mashing.spec.ts
    navigation-abuse/
      back-forward-spam.spec.ts
      random-navigation.spec.ts
      deep-link-chaos.spec.ts
    form-abuse/
      paste-bombs.spec.ts
      special-characters.spec.ts
      field-overflow.spec.ts
    keyboard-chaos/
      keyboard-mashing.spec.ts
      shortcut-abuse.spec.ts
      tab-cycling.spec.ts
    visual-chaos/
      resize-spam.spec.ts
      scroll-abuse.spec.ts
      zoom-chaos.spec.ts
    monkey-testing/
      configurable-monkey.spec.ts
      targeted-monkey.spec.ts
      full-app-monkey.spec.ts
  fixtures/
    chaos.fixture.ts
    error-monitor.fixture.ts
  helpers/
    chaos-monkey.ts
    action-logger.ts
    random-data.ts
  pages/
    any-page.page.ts
playwright.config.ts
```

## Setting Up the Chaos Test Infrastructure

### Error Monitor

Build an error monitor that captures every console error, unhandled exception, and failed network request during chaos testing:

```typescript
import { Page, ConsoleMessage, Response } from '@playwright/test';

interface ErrorEntry {
  type: 'console-error' | 'unhandled-exception' | 'network-failure' | 'crash';
  message: string;
  timestamp: number;
  url?: string;
  stack?: string;
}

export class ErrorMonitor {
  private errors: ErrorEntry[] = [];
  private readonly page: Page;
  private readonly ignoredPatterns: RegExp[];

  constructor(page: Page, ignoredPatterns: RegExp[] = []) {
    this.page = page;
    this.ignoredPatterns = ignoredPatterns;
  }

  async start(): Promise<void> {
    // Capture console errors
    this.page.on('console', (msg: ConsoleMessage) => {
      if (msg.type() === 'error') {
        const text = msg.text();
        if (!this.isIgnored(text)) {
          this.errors.push({
            type: 'console-error',
            message: text,
            timestamp: Date.now(),
            url: this.page.url(),
          });
        }
      }
    });

    // Capture unhandled exceptions
    this.page.on('pageerror', (error: Error) => {
      if (!this.isIgnored(error.message)) {
        this.errors.push({
          type: 'unhandled-exception',
          message: error.message,
          timestamp: Date.now(),
          stack: error.stack,
          url: this.page.url(),
        });
      }
    });

    // Capture network failures (5xx responses)
    this.page.on('response', (response: Response) => {
      if (response.status() >= 500) {
        this.errors.push({
          type: 'network-failure',
          message: `${response.status()} ${response.statusText()} - ${response.url()}`,
          timestamp: Date.now(),
          url: response.url(),
        });
      }
    });

    // Detect page crashes
    this.page.on('crash', () => {
      this.errors.push({
        type: 'crash',
        message: 'Page crashed',
        timestamp: Date.now(),
        url: this.page.url(),
      });
    });
  }

  private isIgnored(message: string): boolean {
    return this.ignoredPatterns.some((pattern) => pattern.test(message));
  }

  getErrors(): ErrorEntry[] {
    return [...this.errors];
  }

  getErrorsByType(type: ErrorEntry['type']): ErrorEntry[] {
    return this.errors.filter((e) => e.type === type);
  }

  hasErrors(): boolean {
    return this.errors.length > 0;
  }

  clear(): void {
    this.errors = [];
  }

  getReport(): string {
    if (this.errors.length === 0) return 'No errors detected.';

    return this.errors
      .map((e) => `[${e.type}] ${e.message} (at ${e.url || 'unknown'})`)
      .join('\n');
  }
}
```

### Action Logger

Create a logger that records every action taken during ch
axe-core Accessibility AutomationSkill

Automated accessibility testing with axe-core integrated into CI pipelines, including custom rule configuration, issue prioritization, and remediation guidance.

A/B Test ValidationSkill

Validating A/B test implementations including traffic splitting accuracy, statistical significance calculation, metric tracking, and experiment cleanup.

Accessibility A11y EnhancedSkill

Comprehensive WCAG compliance and accessibility testing covering ARIA, keyboard navigation, screen readers, color contrast, and automated a11y validation.

Accessibility AuditorSkill

Comprehensive WCAG 2.1 AA compliance testing combining automated axe-core scans with manual keyboard navigation, screen reader compatibility, and focus management verification

AFL++ Fuzzing TestingSkill

American Fuzzy Lop Plus Plus mutation-based fuzz testing for finding crashes, hangs, and security vulnerabilities in binary programs.

Agent Browser AutomationSkill

Fast Rust-based headless browser automation CLI with Node.js fallback for AI agents, featuring navigation, clicking, typing, snapshots, and structured commands optimized for agent workflows.

Agentic Testing PatternsSkill

AI-first testing methodology where autonomous agents plan, generate, execute, and maintain test suites with minimal human intervention, covering agent orchestration, feedback loops, and intelligent test prioritization.

AI Agent EvaluationSkill

Comprehensive evaluation patterns for AI agents including multi-turn conversation testing, LLM-as-judge frameworks, benchmark suites, regression detection, and systematic eval pipelines for measuring agent quality and safety.