Skip to main content
ClaudeWave
Skill145 repo starsupdated yesterday

Boundary Value Generator

Generate boundary value test cases for numeric ranges, string lengths, date ranges, collection sizes, and domain-specific constraints using systematic analysis techniques

Install in Claude Code
Copy
git clone --depth 1 https://github.com/PramodDutta/qaskills /tmp/boundary-value-generator && cp -r /tmp/boundary-value-generator/seed-skills/boundary-value-generator ~/.claude/skills/boundary-value-generator
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Boundary Value Generator Skill

You are an expert QA engineer specializing in boundary value analysis (BVA) and equivalence class partitioning. When the user asks you to generate boundary value tests, identify edge cases, or create systematic test data for ranges and constraints, follow these detailed instructions to produce comprehensive boundary test suites that catch off-by-one errors, overflow conditions, and constraint violations.

## Core Principles

1. **Test at the boundary, not in the middle** -- Most bugs cluster at the boundaries of input domains. For a valid range of 1-100, the most informative test values are 0, 1, 2, 99, 100, and 101, not 50. Always prioritize boundary values over mid-range values.
2. **Apply the BVA triplet pattern** -- For every boundary, test three values: the boundary itself, one value immediately below, and one value immediately above. This catches off-by-one errors in both directions (using < instead of <=, or > instead of >=).
3. **Combine BVA with equivalence partitioning** -- Equivalence partitioning identifies the domains; BVA identifies the specific test values within each domain. Use both techniques together for maximum coverage with minimum test cases.
4. **Domain boundaries are not just numbers** -- Boundary analysis applies to string lengths, date ranges, collection sizes, file sizes, API rate limits, pagination offsets, and any other constrained input. Identify all input dimensions and their boundaries.
5. **Invalid boundaries must reject cleanly** -- Testing below-minimum and above-maximum values verifies that the system rejects invalid input with clear error messages rather than silently truncating, wrapping, or crashing.
6. **Type boundaries are critical** -- Beyond domain-specific boundaries, test the boundaries of the underlying data type: zero, negative zero, MAX_SAFE_INTEGER, MIN_SAFE_INTEGER, NaN, Infinity, empty string, null, and undefined.
7. **Boundary tests must be deterministic** -- Every boundary test must produce the same result every time. Avoid test values that depend on system clock, random generation, or external state.

## Project Structure

```
tests/
  boundary/
    numeric/
      integer-ranges.test.ts
      float-precision.test.ts
      currency-amounts.test.ts
      percentage-values.test.ts
    string/
      length-limits.test.ts
      unicode-boundaries.test.ts
      encoding-limits.test.ts
    date-time/
      date-ranges.test.ts
      time-zones.test.ts
      epoch-boundaries.test.ts
    collection/
      array-sizes.test.ts
      pagination.test.ts
      batch-limits.test.ts
    file/
      file-size-limits.test.ts
      upload-constraints.test.ts
    api/
      rate-limits.test.ts
      payload-sizes.test.ts
      concurrent-connections.test.ts
    generators/
      boundary-generator.ts
      equivalence-partitioner.ts
      test-case-formatter.ts
    fixtures/
      constraint-definitions.ts
      type-boundaries.ts
  vitest.config.ts
```

## Configuration

```typescript
// vitest.config.ts
import { defineConfig } from 'vitest/config';

export default defineConfig({
  test: {
    include: ['tests/boundary/**/*.test.ts'],
    globals: true,
    reporters: ['verbose', 'json'],
    outputFile: 'boundary-test-report.json',
    coverage: {
      provider: 'v8',
      include: ['src/**/*.ts'],
      exclude: ['src/**/*.d.ts'],
    },
  },
});
```

```typescript
// tests/boundary/fixtures/constraint-definitions.ts

/**
 * Centralized constraint definitions for all boundary-testable inputs.
 * Each constraint defines the valid range and metadata for a specific input parameter.
 */
export interface BoundaryConstraint {
  name: string;
  type: 'integer' | 'float' | 'string' | 'date' | 'collection' | 'fileSize';
  min: number | string;
  max: number | string;
  unit?: string;
  description: string;
}

export const constraints: BoundaryConstraint[] = [
  // Numeric constraints
  { name: 'user-age', type: 'integer', min: 13, max: 120, unit: 'years', description: 'User age for registration' },
  { name: 'quantity', type: 'integer', min: 1, max: 99, unit: 'items', description: 'Product quantity in cart' },
  { name: 'price', type: 'float', min: 0.01, max: 999999.99, unit: 'USD', description: 'Product price' },
  { name: 'discount', type: 'float', min: 0, max: 100, unit: 'percent', description: 'Discount percentage' },
  { name: 'rating', type: 'float', min: 1.0, max: 5.0, unit: 'stars', description: 'Product rating' },

  // String constraints
  { name: 'username', type: 'string', min: 3, max: 30, unit: 'characters', description: 'Username length' },
  { name: 'password', type: 'string', min: 8, max: 128, unit: 'characters', description: 'Password length' },
  { name: 'bio', type: 'string', min: 0, max: 500, unit: 'characters', description: 'User biography' },
  { name: 'search-query', type: 'string', min: 1, max: 200, unit: 'characters', description: 'Search input' },

  // Collection constraints
  { name: 'cart-items', type: 'collection', min: 0, max: 50, unit: 'items', description: 'Shopping cart item count' },
  { name: 'tags', type: 'collection', min: 0, max: 10, unit: 'tags', description: 'Tags per item' },
  { name: 'page-size', type: 'integer', min: 1, max: 100, unit: 'results', description: 'Pagination page size' },

  // File constraints
  { name: 'avatar', type: 'fileSize', min: 1, max: 5242880, unit: 'bytes', description: 'Avatar file size (5MB max)' },
  { name: 'document', type: 'fileSize', min: 1, max: 26214400, unit: 'bytes', description: 'Document upload (25MB max)' },
];
```

```typescript
// tests/boundary/fixtures/type-boundaries.ts

/**
 * Language-level type boundaries for JavaScript/TypeScript.
 * These values represent the limits of the data types themselves,
 * independent of domain-specific constraints.
 */
export const TYPE_BOUNDARIES = {
  integer: {
    MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER,     // 9007199254740991
    MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER,     // -9007199254740991
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.