字段类型参考
每个可用的发电机模式构建器, grouped by category.
Options marked in mono can be tuned per field, and every field additionally
accepts a 空值 %注入空值和唯一切换重试直到列中的每个值都不同 - 如果类型无法生成足够的不同值,构建器会警告您并保留剩余的重复项。
不确定哪些字段属于一起?从一个开始测试数据工作流程适用于数据库、模拟 API、QA 自动化或电子表格。安全特性和仅文档范围在中进行了解释数据方法论.
基础
| 类型 | 说明与选项 | 示例 |
|---|---|---|
| 行号 | Sequential counter. Options: start. | 1, 2, 3… |
| 整数 | Uniform random whole number. Options: min, max. | 42 |
| 小数 | Random decimal. Options: min, max, decimals. | 483.07 |
| 布尔值 | true or false. Options: true % — the probability of true (default 50). | true |
| UUID v4 | RFC 4122版本 4 标识符。 | b3c9a1f2-6d4e-4a7b-9c1d-2f8e5a6b7c8d |
| 公式 | Mockaroo-compatible formula evaluated per row. Formula can be its own field type, or the f(x) button can transform any generated field using this. Fields are evaluated top-to-bottom. | if quantity > 5 then (unit_price * quantity).round(2) else unit_price end |
| 数字(正态分布) | Gaussian (bell-curve) number via Box-Muller — more realistic than uniform for ages, prices, latencies. Options: mean, std dev, optional min/max clamp, decimals. | 97.4 |
专用指南:UUID生成器 · 示例 CSV 文件 · SQL导出
公式快速参考
Reference earlier fields directly, or use field("Field Name") for names containing spaces. Prefix helper field names with __ to keep them available to formulas while omitting them from every export.
逻辑: if / elsif / else / end, postfix if and unless, case / when, and / or, comparisons and ternary expressions.
功能: random, generate, concat, upper, lower, format, pad, base64, hex, uuid_v5, normal_dist, date, date_diff, day, month, year, time, epoch, now, date offsets from years through seconds, code (returns its argument as a string), and naughty(value, percent) — swaps in a hostile test string (script tag, SQL fragment, control characters) at the given percentage, for input-hardening tests.
价值观和方法: arrays, hashes, indexing, nil?, empty?, string case/search/replace methods, numeric rounding and predicates, plus common array methods such as compact, uniq, sort, sum and join.
个人
| 类型 | 说明与选项 | 示例 |
|---|---|---|
| 名字 | Given names. Options: locale (any, en, es, de, it, tr, jp, in, ar). First Name, Last Name, Full Name and Email Address stay coherent within a row — the email matches the row's name. | Elena |
| 姓氏 | Family names, coherent with the row's other name fields. Options: locale. | Yılmaz |
| 姓名 | First + last name from one person, matching the row's First/Last Name columns. Options: locale. | Marco Rossi |
| 性别 | 包容性的性别标签集。 | Non-binary |
| 用户名 | 形容词名词+数字。 | swift_falcon42 |
| 密码 | Random unambiguous characters. Options: length. | kR7!mQ2vX9pZ |
| 电子邮箱地址 | 根据安全示例域上的行的名字/姓氏(转译为 ASCII)构建。 | elena.rossi7@example.org |
| 电话号码 | Pattern-driven. Options: format (# = digit). | +1 (555) 014-2831 |
| 职位 | 技术和商业领域的常见角色。 | QA Engineer |
| 部门 | 典型的组织部门。 | Quality Assurance |
| 头像 URL | Placeholder avatar image URL. Options: host (pravatar loads real placeholder images; example stays on the reserved example.com domain). | https://i.pravatar.cc/150?u=48293017 |
| 年龄 | Whole-number age. Options: min, max. | 34 |
| 出生日期 | Date of birth derived from an age range. Options: min age, max age, format. | 1991-04-17 |
专用指南:随机名称 · 虚假电子邮件 · 电话号码 · 员工数据
位置
| 类型 | 说明与选项 | 示例 |
|---|---|---|
| 国家 | 50 个国家/地区名称。国家、国家代码、城市和完整地址在一行中保持一致 - 一行永远不会将城市与错误的国家配对。第二个同类字段独立绘制。 | Netherlands |
| 国家代码(ISO) | ISO 3166-1 alpha-2 代码,与行的国家/地区匹配。 | NL |
| 城市 | 约 110 个世界城市,来自该行所在国家/地区。 | Izmir |
| 州(美国) | 美国州名。 | Oregon |
| 州缩写(美国) | 两个字母的美国州代码。 | OR |
| 街道地址 | 号码+街道+后缀。 | 2847 Maple Avenue |
| 邮政编码 | Pattern-driven. Options: format. | 94103 |
| 完整地址 | 街道、城市、邮政编码和国家连为一体;城市和国家/地区与该行的其他位置字段相匹配。 | 193 Cedar Lane, Vienna 20481, Austria |
| 纬度 | −90 到 90,六位小数。 | 48.208176 |
| 经度 | −180 至 180,六位小数。 | 16.373819 |
互联网
| 类型 | 说明与选项 | 示例 |
|---|---|---|
| 域名 | 保留文档 TLD 上的公司风格域。 | novadynamics.test |
| URL | https URL,在保留文档 TLD 上具有两个路径段。 | https://emberlabs.test/lorem/ipsum |
| IPv4 地址 | RFC 5737仅文档地址来自 192.0.2.0/24、198.51.100.0/24 或 203.0.113.0/24。 | 192.0.2.42 |
| IPv6 地址 | RFC 38492001:db8::/32 中的仅文档地址。 | 2001:db8:85a3:0000:0000:8a2e:0370:7334 |
| MAC 地址 | 以冒号分隔的大写十六进制。 | 0A:1B:2C:3D:4E:5F |
| 十六进制颜色 | #RRGGBB。 | #e8590c |
| 颜色名称 | 人类可读的颜色词。 | turquoise |
| 用户代理 | 现实的现代浏览器 UA 字符串。 | Mozilla/5.0 (Windows NT 10.0…) Chrome/126.0 |
| 语义化版本 | 主要.次要.补丁版本字符串。 | 2.14.7 |
| MIME 类型 | 常见 IANA 媒体类型。 | application/json |
| 哈希值(十六进制) | Deterministic-looking hex digest — not a real cryptographic hash. Options: length (8–64), optional source field to derive it from another field above it (same source + seed ⇒ same hash). | 9f2c7a1e4b8d0f36 |
专用指南:JSON 数据示例 · 模拟 API 装置 · MongoDB 文档
商业
| 类型 | 说明与选项 | 示例 |
|---|---|---|
| 公司名称 | 前缀+后缀,有时是一种法律形式。 | Zenith Analytics GmbH |
| 产品名称 | 形容词+材料+名词。 | Ergonomic Bamboo Keyboard |
| 价格 | Two-decimal amount. Options: min, max. | 129.99 |
| 货币代码 | ISO 4217 代码。 | EUR |
| IBAN(虚构) | Country-length-shaped but not checksum-valid or bank-valid. Options: country. | DE89 3704 0044 0532 0130 00 |
| 信用卡号(测试) | 仅官方支付网关测试 PAN;切勿用于实际付款。 | 4111111111111111 |
| 信用卡类型 | 主要卡网络名称。 | Mastercard |
| 加密货币 | 流行的股票代码。 | ETH |
| EAN-13 条形码 | 12 个随机数字加上正确的 EAN-13/ISBN 式校验位。 | 4006381333931 |
| ISBN-13 | 978 前缀的 13 位代码,带有正确的校验位。 | 9781234567897 |
日期与时间
| 类型 | 说明与选项 | 示例 |
|---|---|---|
| 日期 | Date in a range. Options: from, to, format, order (random, or sequential — evenly spaced across the range in row order, for time-series fixtures). | 2024-11-03 |
| 时间 | 24h clock. Options: seconds. | 14:07:52 |
| 日期时间 (ISO 8601) | UTC timestamp in a range. Options: from, to, order. | 2025-03-18T09:41:26Z |
| Unix 时间戳 | Seconds since epoch. Options: from, to, order. | 1742291286 |
| 星期 | 周一至周日。 | Thursday |
| 月份 | 一月至十二月。 | March |
| 时区 | IANA 时区名称。 | Europe/Berlin |
专用指南:随机日期和时间戳 · 时间序列的 NDJSON
文本
| 类型 | 说明与选项 | 示例 |
|---|---|---|
| 词语 | 单个lorem单词。 | voluptate |
| 词语列表 | Space-separated words. Options: count. | magna aliqua enim |
| 句子 | 6-14 个单词大写的句子。 | Dolore magna aliqua enim minim veniam quis. |
| 段落 | Multiple sentences. Options: sentences. | Lorem ipsum dolor amet. Sed tempor… |
| 自定义列表 | Your own values. Options: values (plain a, b, c or weighted a:5, b:1), mode (random, sequential, or weighted — weighted honors the value:weight ratios). | pending |
| 我的数据集 | 从保存在下的可重用值列表中提取我的数据集 on the builder (one value per line, up to 10,000 values). Datasets are reusable across schemas, and signing in syncs them across devices. Options: dataset (which list), mode (random or sequential). | acme-widget |
| 图案 | # digit, ? A–Z, ~ a–z; other chars kept. | SKU-4821-QF |
| 正则表达式模式 | Generates strings matching a constrained regex subset: literals, \d \w \s (+ negations), ., [classes], (groups), alternation |, quantifiers * + ? {n} {n,} {n,m}. No backreferences or lookaround. Options: pattern. | ABC-4821 |
| URL 短名称 | 单词-单词-数字,短横线大小写。 | amber-falcon-482 |
| 表情符号 | 单一常见表情符号。 | 🚀 |
地区测试样例
提供土耳其、中国、印度、俄罗斯和德国的姓名、邮政编码与虚构地址。电话前缀故意无效。身份和税务样例含有 TEST 标记,用于负向验证,不是实际签发的编号。
| 类型 | 说明 | 示例 |
|---|---|---|
| 土耳其姓名 | 特定于区域设置的合成名称;不是身份记录。 | tr_name |
| 土耳其邮政编码 | 参考乡村城市固定装置的邮政编码。 | tr_postcode |
| 土耳其地址 | 虚构的测试街道和房屋,带有当地城市和邮政编码。 | tr_address |
| 土耳其电话(测试) | 故意使用无效的 000 电话前缀;切勿拨打这些测试装置。 | tr_phone |
| 土耳其 TCKN / VKN 测试标识 | 用于否定身份/税务验证的显式 TEST 标记;不是已发布或校验和有效的国家标识符。 | tr_business_id |
| 中国姓名 | 特定于区域设置的合成名称;不是身份记录。 | cn_name |
| 中国邮政编码 | 参考乡村城市固定装置的邮政编码。 | cn_postcode |
| 中国地址 | 虚构的测试街道和房屋,带有当地城市和邮政编码。 | cn_address |
| 中国电话(测试) | 故意使用无效的 000 电话前缀;切勿拨打这些测试装置。 | cn_phone |
| 中国统一社会信用代码测试标识 | 用于否定身份/税务验证的显式 TEST 标记;不是已发布或校验和有效的国家标识符。 | cn_business_id |
| 印度姓名 | 特定于区域设置的合成名称;不是身份记录。 | in_name |
| 印度 PIN 邮政编码 | 参考乡村城市固定装置的邮政编码。 | in_postcode |
| 印度地址 | 虚构的测试街道和房屋,带有当地城市和邮政编码。 | in_address |
| 印度电话(测试) | 故意使用无效的 000 电话前缀;切勿拨打这些测试装置。 | in_phone |
| 印度 PAN / GST 测试标识 | 用于否定身份/税务验证的显式 TEST 标记;不是已发布或校验和有效的国家标识符。 | in_business_id |
| 俄罗斯姓名 | 特定于区域设置的合成名称;不是身份记录。 | ru_name |
| 俄罗斯邮政编码 | 参考乡村城市固定装置的邮政编码。 | ru_postcode |
| 俄罗斯地址 | 虚构的测试街道和房屋,带有当地城市和邮政编码。 | ru_address |
| 俄罗斯电话(测试) | 故意使用无效的 000 电话前缀;切勿拨打这些测试装置。 | ru_phone |
| 俄罗斯 INN 测试标识 | 用于否定身份/税务验证的显式 TEST 标记;不是已发布或校验和有效的国家标识符。 | ru_business_id |
| 德国姓名 | 特定于区域设置的合成名称;不是身份记录。 | de_name |
| 德国邮政编码 | 参考乡村城市固定装置的邮政编码。 | de_postcode |
| 德国地址 | 虚构的测试街道和房屋,带有当地城市和邮政编码。 | de_address |
| 德国电话(测试) | 故意使用无效的 000 电话前缀;切勿拨打这些测试装置。 | de_phone |
| 德国税号 / 增值税号测试标识 | 用于否定身份/税务验证的显式 TEST 标记;不是已发布或校验和有效的国家标识符。 | de_business_id |
专用指南:质量检查边缘情况 · 剧作家固定装置 · 赛普拉斯灯具
缺少您需要的类型?抓住一个图案 / 自定义列表字段,它们共同涵盖了大多数定制格式。
最后更新