Skip to main content 首页 创作者 proffesor-for-testing sentinel-api-testing test-data-management
test-data-management 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.
跳到安装 Skills Marketplace 发现并探索由社区构建的 Agent Skills
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/proffesor-for-testing/sentinel-api-testing --skill test-data-management命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
下载 Zip 下载中... 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 last_optimized 2025-12-02T00:00:00.000Z dependencies [] quick_reference_card true tags ["test-data","faker","synthetic","gdpr","pii","anonymization","factories"]
Test Data Management
<default_to_action>
When creating or managing test data:
NEVER use production PII directly
GENERATE synthetic data with faker libraries
ANONYMIZE production data if used (mask, hash)
ISOLATE test data (transactions, per-test cleanup)
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
Privacy Techniques
Technique Use Case Synthetic Generate fake data (preferred) Masking j***@example.com Hashing Irreversible pseudonymization Tokenization Reversible with key
Synthetic Data Generation
import { faker } from '@faker-js/faker' ;
faker.seed ( );
( ) {
{
: faker. . (),
: faker. . (),
: faker. . (),
: faker. . (),
: faker. . (),
: {
: faker. . (),
: faker. . (),
: faker. . ()
},
: faker. . ()
};
}
users = . ({ : }, generateUser);
123
function
generateUser
return
id
string
uuid
email
internet
email
firstName
person
firstName
lastName
person
lastName
phone
phone
number
address
street
location
streetAddress
city
location
city
zip
location
zipCode
createdAt
date
past
const
Array
from
length
1000
Test Data Builder Pattern class UserBuilder {
private user : Partial <User > = {};
asAdmin ( ) {
this .user .role = 'admin' ;
this .user .permissions = ['read' , 'write' , 'delete' ];
return this ;
}
asCustomer ( ) {
this .user .role = 'customer' ;
this .user .permissions = ['read' ];
return this ;
}
withEmail (email : string ) {
this .user .email = email;
return this ;
}
build (): User {
return {
id : this .user .id ?? faker.string .uuid (),
email : this .user .email ?? faker.internet .email (),
role : this .user .role ?? 'customer' ,
...this .user
} as User ;
}
}
const admin = new UserBuilder ().asAdmin ().withEmail ('admin@test.com' ).build ();
const customer = new UserBuilder ().asCustomer ().build ();
Data Anonymization
function maskEmail (email ) {
const [user, domain] = email.split ('@' );
return `${user[0 ]} ***@${domain} ` ;
}
function maskCreditCard (cc ) {
return `****-****-****-${cc.slice(-4 )} ` ;
}
const anonymizedUsers = prodUsers.map (user => ({
id : user.id ,
email : `user-${user.id} @example.com` ,
firstName : faker.person .firstName (),
phone : null ,
createdAt : user.createdAt
}));
Database Transaction Isolation
beforeEach (async () => {
await db.beginTransaction ();
});
afterEach (async () => {
await db.rollbackTransaction ();
});
test ('user registration' , async () => {
const user = await userService.register ({
email : 'test@example.com'
});
expect (user.id ).toBeDefined ();
});
Volume Data Generation
async function generateLargeDataset (count = 10000 ) {
const batchSize = 1000 ;
const batches = Math .ceil (count / batchSize);
for (let i = 0 ; i < batches; i++) {
const users = Array .from ({ length : batchSize }, (_, index ) => ({
id : i * batchSize + index,
email : `user${i * batchSize + index} @example.com` ,
firstName : faker.person .firstName ()
}));
await db.users .insertMany (users);
console .log (`Batch ${i + 1 } /${batches} ` );
}
}
Agent-Driven Data Generation
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" );
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 const dataFleet = await FleetManager .coordinate ({
strategy : 'test-data-generation' ,
agents : [
'qe-test-data-architect' ,
'qe-test-executor' ,
'qe-security-scanner'
],
topology : 'sequential'
});
Related Skills
Remember Test data is infrastructure, not an afterthought. 40% of test failures are caused by inadequate test data. Poor data = poor tests.
Never use production PII directly. GDPR fines up to €20M or 4% of revenue. 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
proffesor-for-testing/sentinel-api-testing
打开 GitHub 仓库