Back to Skills

test-data-generator

verified

Creates test fixtures, mock data, and test scenarios for unit and integration tests. Use when setting up test data, creating mocks, or generating test fixtures.

View on GitHub

Marketplace

fastagent-marketplace

armanzeroeight/fastagent-plugins

Plugin

testing-toolkit

Testing & Quality

Repository

armanzeroeight/fastagent-plugins
20stars

plugins/testing-toolkit/skills/test-data-generator/SKILL.md

Last Verified

January 21, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/armanzeroeight/fastagent-plugins/blob/main/plugins/testing-toolkit/skills/test-data-generator/SKILL.md -a claude-code --skill test-data-generator

Installation paths:

Claude
.claude/skills/test-data-generator/
Powered by add-skill CLI

Instructions

# Test Data Generator

Generate test data, fixtures, and mocks for testing.

## Quick Start

Create a simple fixture:
```javascript
const mockUser = {
  id: 1,
  name: 'Test User',
  email: 'test@example.com'
}
```

## Instructions

### Factory Functions

Create reusable data generators:

```javascript
function createUser(overrides = {}) {
  return {
    id: Math.floor(Math.random() * 1000),
    name: 'Test User',
    email: 'test@example.com',
    role: 'user',
    createdAt: new Date().toISOString(),
    ...overrides
  }
}

// Usage
const admin = createUser({ role: 'admin', name: 'Admin User' })
const regularUser = createUser()
```

```python
def create_user(**kwargs):
    defaults = {
        'id': random.randint(1, 1000),
        'name': 'Test User',
        'email': 'test@example.com',
        'role': 'user',
        'created_at': datetime.now()
    }
    return {**defaults, **kwargs}

# Usage
admin = create_user(role='admin', name='Admin User')
```

### Builder Pattern

For complex objects:

```javascript
class UserBuilder {
  constructor() {
    this.user = {
      id: 1,
      name: 'Test User',
      email: 'test@example.com',
      role: 'user',
      preferences: {}
    }
  }
  
  withId(id) {
    this.user.id = id
    return this
  }
  
  withName(name) {
    this.user.name = name
    return this
  }
  
  withRole(role) {
    this.user.role = role
    return this
  }
  
  withPreferences(preferences) {
    this.user.preferences = preferences
    return this
  }
  
  build() {
    return this.user
  }
}

// Usage
const user = new UserBuilder()
  .withId(123)
  .withName('John Doe')
  .withRole('admin')
  .withPreferences({ theme: 'dark' })
  .build()
```

### Test Fixtures

**JavaScript/TypeScript**:
```javascript
// fixtures/users.js
export const users = {
  admin: {
    id: 1,
    name: 'Admin User',
    email: 'admin@example.com',
    role: 'admin'
  },
  regular: {
    id: 2,
    name: 'Regular User',
    email: 'user@example.com',
    role: 'user'
  

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
6655 chars