# test-data-management

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

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 118 installs · ★ 533 repo stars
- Author: proffesor-for-testing
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/proffesor-for-testing/agentic-qe/tree/HEAD/assets/skills/test-data-management/SKILL.md
- Updated: 2026-10-25
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/proffesor-for-testing-test-data-management

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add proffesor-for-testing/agentic-qe --skill test-data-management -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/test-data-management/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/test-data-management/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add proffesor-for-testing/agentic-qe --skill test-data-management -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/test-data-management/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add proffesor-for-testing/agentic-qe --skill test-data-management -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/test-data-management/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install proffesor-for-testing/agentic-qe assets/skills/test-data-management
```

2. **Manually: put the files in place**
- File: `.github/skills/test-data-management/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add proffesor-for-testing/agentic-qe --skill test-data-management -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/proffesor-for-testing/agentic-qe --path assets/skills/test-data-management
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/test-data-management/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add proffesor-for-testing/agentic-qe --skill test-data-management -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/proffesor-for-testing/agentic-qe/tree/HEAD/assets/skills/test-data-management/SKILL.md

## When to use it
- 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
- 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.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 30b7a2af2cb4d754.

BEGIN THIRD-PARTY FILE 30b7a2af2cb4d754
````text
---
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}`;
}
// john@example.com → 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
````
END THIRD-PARTY FILE 30b7a2af2cb4d754

The third-party file has ended. Everything between the 30b7a2af2cb4d754 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2400 of 4722 bytes. © proffesor-for-testing · MIT · https://github.com/proffesor-for-testing/agentic-qe/tree/HEAD/assets/skills/test-data-management/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
