Back to Skills

test-data-management

verified

Test data management with fixtures and factories. Use when creating test data strategies, implementing data factories, managing fixtures, or seeding test databases.

View on GitHub

Marketplace

orchestkit

yonatangross/skillforge-claude-plugin

Plugin

ork-testing-core

testing

Repository

yonatangross/skillforge-claude-plugin
33stars

plugins/ork-testing-core/skills/test-data-management/SKILL.md

Last Verified

January 25, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/yonatangross/skillforge-claude-plugin/blob/main/plugins/ork-testing-core/skills/test-data-management/SKILL.md -a claude-code --skill test-data-management

Installation paths:

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

Instructions

# Test Data Management

Create and manage test data effectively.

## Factory Pattern (Python)

```python
from factory import Factory, Faker, SubFactory, LazyAttribute
from app.models import User, Analysis

class UserFactory(Factory):
    class Meta:
        model = User

    email = Faker('email')
    name = Faker('name')
    created_at = Faker('date_time_this_year')

class AnalysisFactory(Factory):
    class Meta:
        model = Analysis

    url = Faker('url')
    status = 'pending'
    user = SubFactory(UserFactory)

    @LazyAttribute
    def title(self):
        return f"Analysis of {self.url}"

# Usage
user = UserFactory()
analysis = AnalysisFactory(user=user, status='completed')
```

## Factory Pattern (TypeScript)

```typescript
import { faker } from '@faker-js/faker';

interface User {
  id: string;
  email: string;
  name: string;
}

const createUser = (overrides: Partial<User> = {}): User => ({
  id: faker.string.uuid(),
  email: faker.internet.email(),
  name: faker.person.fullName(),
  ...overrides,
});

const createAnalysis = (overrides = {}) => ({
  id: faker.string.uuid(),
  url: faker.internet.url(),
  status: 'pending',
  userId: createUser().id,
  ...overrides,
});

// Usage
const user = createUser({ name: 'Test User' });
const analysis = createAnalysis({ userId: user.id, status: 'completed' });
```

## JSON Fixtures

```json
// fixtures/users.json
{
  "admin": {
    "id": "user-001",
    "email": "admin@example.com",
    "role": "admin"
  },
  "basic": {
    "id": "user-002",
    "email": "user@example.com",
    "role": "user"
  }
}
```

```python
import json
import pytest

@pytest.fixture
def users():
    with open('fixtures/users.json') as f:
        return json.load(f)

def test_admin_access(users):
    admin = users['admin']
    assert admin['role'] == 'admin'
```

## Database Seeding

```python
# seeds/test_data.py
async def seed_test_database(db: AsyncSession):
    """Seed database with test data."""
    # Create users
    users = [
      

Validation Details

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