Generate synthetic test data with edge cases for ETL pipeline testing.
View on GitHubmajesticlabs-dev/majestic-marketplace
majestic-data
plugins/majestic-data/skills/test-fixture-generator/SKILL.md
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/majesticlabs-dev/majestic-marketplace/blob/main/plugins/majestic-data/skills/test-fixture-generator/SKILL.md -a claude-code --skill test-fixture-generatorInstallation paths:
.claude/skills/test-fixture-generator/# Test Fixture Generator
Generate test fixtures matching schema specifications with automatic edge case injection.
## Core Generator
```python
def generate_fixtures(
schema: dict,
count: int = 100,
edge_cases: bool = True
) -> pd.DataFrame:
"""Generate test data matching schema."""
data = {}
for col, spec in schema.items():
if spec['type'] == 'integer':
data[col] = generate_integers(count, spec)
elif spec['type'] == 'string':
data[col] = generate_strings(count, spec)
elif spec['type'] == 'date':
data[col] = generate_dates(count, spec)
elif spec['type'] == 'float':
data[col] = generate_floats(count, spec)
elif spec['type'] == 'boolean':
data[col] = generate_booleans(count)
elif spec['type'] == 'enum':
data[col] = generate_enums(count, spec['values'])
df = pd.DataFrame(data)
if edge_cases:
df = add_edge_cases(df, schema)
return df
```
## Edge Case Injection
```python
def add_edge_cases(df: pd.DataFrame, schema: dict) -> pd.DataFrame:
"""Add rows with boundary and edge case values."""
edge_rows = []
# Null row (where nullable)
null_row = {
col: None if spec.get('nullable', True) else df[col].iloc[0]
for col, spec in schema.items()
}
edge_rows.append(null_row)
# Boundary values per column
for col, spec in schema.items():
base_row = df.iloc[0].to_dict()
if spec['type'] == 'integer':
edge_rows.append({**base_row, col: spec.get('min', 0)})
edge_rows.append({**base_row, col: spec.get('max', 2147483647)})
elif spec['type'] == 'string':
edge_rows.append({**base_row, col: ''}) # Empty string
edge_rows.append({**base_row, col: 'a' * spec.get('max_length', 255)}) # Max length
elif spec['type'] == 'float':
edge_rows.append({**base_row, col: 0.0})
edge_ro