Install
openclaw skills install test-data-genGenerate customized test data in JSON, CSV, or SQL (MySQL/PostgreSQL) formats using built-in or custom templates with realistic fields like names, emails, an...
openclaw skills install test-data-gentest-data-gen [字段名] [数量] [格式]
test-data-gen users 100 json # 生成100条用户JSON
test-data-gen orders 50 csv # 生成50条订单CSV
test-data-gen products 20 sql mysql # 生成20条产品SQL(MySQL)
test-data-gen products 20 sql pg # 生成20条产品SQL(PostgreSQL)
| 模板 | 字段 |
|---|---|
| users | id, name, email, phone, age, gender |
| orders | id, user_id, product, amount, status, created_at |
| products | id, name, price, stock, category |
| reviews | id, user_id, product_id, rating, comment |
| addresses | id, user_id, province, city, district, detail |
test-data-gen --template my_template.json 100 json
name — 中文姓名email — 随机邮箱phone — 中国手机号(以1开头)age — 18-80岁gender — 男/女amount — 金额(0.01-9999.99)date — 日期(2020-01-01 ~ 今天)enum — 自定义枚举值--format json — JSON数组--format csv — CSV(带表头)--format sql --db mysql|pg — SQL INSERT语句