Skip to main content
skill CX Codex

test-data-management · proffesor-for-testing — Claude Code skill: data and setup

The test-data-management skill creates test datasets, anonymizes PII, and keeps test records isolated. Use it for unit, integration, performance, and boundary testing.

MIT 118 installs ★ 533 updated 2026-10-25

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add proffesor-for-testing/agentic-qe --skill test-data-management -a claude-code
Open on GitHub

What test-data-management does

The skill lays out data choices for different test types: small datasets for unit tests, realistic records for integration work, volume data for performance checks, and targeted edge cases. Generation can preserve relationships and apply constraints such as age ranges, roles, and record counts.

It covers email and card masking, pseudonymization of production snapshots, and removal of phone data. Transaction rollback isolates records after each test. Direct use of production PII is ruled out, so testing requires synthetic data or an anonymized snapshot.

Examples use qe-test-data-architect for generation, with qe-test-executor and qe-security-scanner in a sequential fleet. The memory layout aqe/test-data-management/ stores schemas, generator configs, anonymization rules, and reusable fixtures.

What it helps with

  • generate realistic datasets for integration tests
  • build volume data for performance testing
  • anonymize a production snapshot containing PII
  • preserve relationships between test entities
  • roll back database changes after each test

Example prompts for the agent

  • Generate an ecommerce dataset with 10000 users, 500 products, and 5000 orders while preserving referential integrity.
  • Anonymize production-snapshot by pseudonymizing email, phone, and ssn, while retaining its structure.
  • Set up a user registration test that begins a transaction and rolls it back after each test.

How to install test-data-management

1Skills CLI (Vercel)

npx skills add proffesor-for-testing/agentic-qe --skill test-data-management -a claude-code

2Manually: put the files in place

~/.claude/skills/test-data-management/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/test-data-management/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about test-data-management

How do I install test-data-management in Claude Code?

Run npx skills add proffesor-for-testing/agentic-qe --skill test-data-management -a claude-code, then check ~/.claude/skills/test-data-management/SKILL.md.

What does test-data-management do?

It guides synthetic test-data generation, PII anonymization, constraint-based datasets, and transaction isolation between tests.

How does the skill handle production PII?

It rules out direct use of production PII. Use generated data or anonymize a production snapshot through masking, hashing, or pseudonymization.

Source text

SKILL.md · MIT
---
name: test-data-management
description: "Strategic test data generation, management, and privacy compliance. Use when creating test data, handling PII, ensuring GDPR/CCPA compliance, or scaling data generation for realistic testing scenarios."
category: specialized-testing
priority: high
tokenEstimate: 1000
agents: [qe-test-data-architect, qe-test-executor, qe-security-scanner]
implementation_status: optimized
optimization_version: 1.0
last_optimized: 2025-12-02
dependencies: []
quick_reference_card: true
tags: [test-data, faker, synthetic, gdpr, pii, anonymization, factories]
trust_tier: 3
validation:
  schema_path: schemas/output.json
  validator_path: scripts/validate-config.json
  eval_path: evals/test-data-management.yaml
---

# Test Data Management

<default_to_action>
When creating or managing test data:
1. NEVER use production PII directly
2. GENERATE synthetic data with faker libraries
3. ANONYMIZE production data if used (mask, hash)
4. ISOLATE test data (transactions, per-test cleanup)
5. SCALE with batch generation (10k+ records/sec)

**Quick Data Strategy:**
- Unit tests: Minimal data (just enough)
- Integration: Realistic data (full complexity)
- Performance: Volume data (10k+ records)

**Critical Success Factors:**
- 40% of test failures from inadequate data
- GDPR fines up to €20M for PII violations
- Never store production PII in test environments
</default_to_action>

## Quick Reference Card

### When to Use
- Creating test datasets
- Handling sensitive data
- Performance testing with volume
- GDPR/CCPA compliance

### Data Strategies
| Type | When | Size |
|------|------|------|
| **Minimal** | Unit tests | 1-10 records |
| **Realistic** | Integration | 100-1000 records |
| **Volume** | Performance | 10k+ records |
| **Edge cases** | Boundary testing | Targeted |

---

## Data Anonymization

```javascript
// Masking
function maskEmail(email) {
  const [user, domain] = email.split('@');
  return `${user[0]}***@${domain}`;
}
// [email protected] → j***@example.com

function maskCreditCard(cc) {
  return `****-****-****-${cc.slice(-4)}`;
}
// 4242424242424242 → ****-****-****-4242

// Anonymize production data
const anonymizedUsers = prodUsers.map(user => ({
  id: user.id, // Keep ID for relationships
  email: `user-${user.id}@example.com`, // Fake email
  firstName: faker.person.firstName(), // Generated
  phone: null, // Remove PII
  createdAt: user.createdAt // Keep non-PII
}));
```

---

## Database Transaction Isolation

```javascript
// Best practice: use transactions for cleanup
beforeEach(async () => {
  await db.beginTransaction();
});

afterEach(async () => {
  await db.rollbackTransaction(); // Auto cleanup!
});

test('user registration', async () => {
  const user = await userService.register({
    email: '[email protected]'
  });
  expect(user.id).toBeDefined();
  // Automatic rollback after test - no cleanup needed
});
```

---

## Agent-Driven Data Generation

```typescript
// High-speed generation with constraints
await Task("Generate Test Data", {
  schema: 'ecommerce',
  count: { users: 10000, products: 500, orders: 5000 },
  preserveReferentialIntegrity: true,
  constraints: {
    age: { min: 18, max: 90 },
    roles: ['customer', 'admin']
  }
}, "qe-test-data-architect");

// GDPR-compliant anonymization
await Task("Anonymize Production Data", {
  source: 'production-snapshot',
  piiFields: ['email', 'phone', 'ssn'],
  method: 'pseudonymization',
  retainStructure: true
}, "qe-test-data-architect");
```

---

## Agent Coordination Hints

### Memory Namespace
```
aqe/test-data-management/
├── schemas/*            - Data schemas
├── generators/*         - Generator configs
├── anonymization/*      - PII handling rules
└── fixtures/*           - Reusable fixtures
```

### Fleet Coordination
```typescript
const dataFleet = await FleetManager.coordinate({
  strategy: 'test-data-generation',
  agents: [
    'qe-test-data-architect',  // Generate data
    'qe-test-executor',        // Execute with data
    'qe-security-scanner'      // Validate no PII exposure
  ],
  topology: 'sequential'
});
```

---

## Related Skills
- [database-testing](../database-testing/) - Schema and integrity testing
- [compliance-testing](../compliance-testing/) - GDPR/CCPA compliance
- [performance-testing](../performance-testing/) - Volume data for perf tests

---

## Remember

**Never use production PII directly.** Always use synthetic data or properly anonymized production snapshots.

**With Agents:** `qe-test-data-architect` generates 10k+ records/sec with realistic patterns, relationships, and constraints. Agents ensure GDPR/CCPA compliance automatically and eliminate test data bottlenecks.

© proffesor-for-testing · MIT · proffesor-for-testing/agentic-qe

Similar skills

All skills for Testing and QA →

test-data-management by other authors comes first.

test-data-management kindlmann test-data-management is a Claude Code skill for building isolated test factories and deterministic seeds, and setting up PII anonymization with synthetic entities. CX Codex +1 1,700installs test-data-generation aj-geddes test-data-generation generates realistic, consistent test datasets using factories, fixtures, and fake data libraries. Useful for database seeding and edge-case testing. CX Codex +1 505installs test-data-generator rohitg00 test-data-generator — a Claude Code plugin that generates realistic test data and populates databases. Works directly in the editor when you need to quickly prepare datasets for development or testing. ★ 2,858repo stars data-seeding-fixtures-builder patricio0312rev data-seeding-fixtures-builder builds deterministic mock data, factory functions, realistic fixtures, and database reset scripts for testing environments. CX Codex +1 265installs privacy-guardian omer-metin privacy-guardian is a Claude Code skill for privacy engineering, covering differential privacy, encryption, PII handling, and GDPR or CCPA audits. CX Codex +1 1installs databricks-synthetic-data-gen databricks databricks-synthetic-data-gen creates synthetic Databricks data with Spark and Faker in Parquet, JSON, CSV, or Delta. Use it for test data, demos, and analysis-ready datasets. CX Codex +1 314installs pii-redaction-logging-policy-builder patricio0312rev pii-redaction-logging-policy-builder sets up redaction rules and a logging policy to keep sensitive user data out of logs. Replaces emails, phone numbers, and payment cards with safe placeholders. CX Codex +1 283installs

From the same set73

The whole set →
qe-test-execution qe-test-execution orchestrates Jest, Vitest, and Playwright suites using the aqe CLI with parallel workers, affected-test selection, and flaky test retries. CX Codex +1 122installs qe-learning-optimization qe-learning-optimization optimizes QE agents through transfer learning across test frameworks, Bayesian hyperparameter tuning, and A/B experiments. CX Codex +1 121installs qe-security-compliance qe-security-compliance runs code security audits, dependency vulnerability scans, secret detection, and compliance checks for OWASP and SOC2. CX Codex +1 120installs testability-scoring testability-scoring scores web application testability against 10 principles and produces a report. Use it to check test readiness and find areas that make testing harder. CX Codex +1 119installs iterative-loop iterative-loop runs continuous build-test-fix loops until pass criteria are met. Useful for test-driven feature development, bug fixing, and metric optimization. CX Codex +1 118installs shift-left-testing The shift-left-testing skill moves checks earlier in development: validate requirements, write tests before implementation, and run them in CI. Use it when introducing TDD or other early quality practices. CX Codex +1 117installs test-environment-management test-environment-management is a Claude Code skill for setting up test infrastructure and matching it to production. It covers environment setup, parity checks, and test infrastructure costs. CX Codex +1 117installs debug-loop debug-loop — a skill for step-by-step debugging of errors through real commands, not simulations. Forms hypotheses, validates them against live data, identifies root cause, and only then fixes the code. CX Codex +1 117installs

Project sponsors

Companies that keep this analytics open