AI Skill Report Card
Generating Test Data
YAML--- name: generating-test-data description: Generates test data and placeholder content for development and testing purposes. Use when you need sample data, mock content, or testing scenarios. ---
Quick Start
Python# Generate test user data users = [ {"id": i, "name": f"TestUser{i}", "email": f"test{i}@example.com"} for i in range(1, 11) ]
Workflow
- Identify data type - Determine what kind of test data is needed
- Set parameters - Define volume, format, and constraints
- Generate base structure - Create the fundamental data pattern
- Add variation - Introduce realistic diversity to avoid uniform data
- Validate output - Ensure generated data meets requirements
Progress:
- Define test data requirements
- Choose generation method
- Create sample dataset
- Review for realistic variation
- Export in required format
Examples
Example 1: Input: "Need 5 test products" Output:
JSON[ {"id": 1, "name": "TestProduct A", "price": 29.99, "stock": 15}, {"id": 2, "name": "TestProduct B", "price": 45.50, "stock": 8}, {"id": 3, "name": "TestProduct C", "price": 12.99, "stock": 23} ]
Example 2: Input: "Generate test API responses" Output:
JSON{"status": "success", "data": {"message": "Test operation completed"}, "timestamp": "2024-01-15T10:30:00Z"}
Best Practices
- Use consistent naming patterns (TestUser1, TestUser2)
- Include edge cases (empty strings, null values, boundary conditions)
- Make data realistic enough for meaningful testing
- Use standard test domains (example.com, test.local)
- Include both valid and invalid test cases
Common Pitfalls
- Don't use real personal data for testing
- Avoid completely random data that lacks realistic patterns
- Don't generate too much data that slows down tests
- Avoid hardcoded test data that becomes stale