Qa Test Data Engineering logo

Qa Test Data Engineering

Community
Kokxi
qa-test-data-engineering

当需要批量构造测试数据(造 1000 条订单、准备各种状态的用户数据)、或者需要使用真实生产数据但需要脱敏时使用此技能。覆盖造数策略(API 造数/DB 直接构造/数据工厂)、脱敏方案(敏感字段识别/替换/掩码)、合规要求(GDPR/等保/个保法)和数据工厂架构设计。手工一条条造数据效率太低——测试数据工程的目标是让造数变成一键操作。 触发场景:造数、批量造数、数据构造、测试数据脱敏、测试数据合规、数据工厂、造1000条、造大量数据、环境数据不足需要批量构造时。 Use when the user asks about: bulk test data generation, production data masking and anonymization, data compliance, and data factory architecture.

Overview

PublisherKokxi
Repositoryqa-test-skills
Skill nameqa-test-data-engineering
Stars
39
Forks
6
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Kokxi on GitHub. Read the source before you install it.

Installation

Install the Qa Test Data Engineering AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Kokxi/qa-test-skills/tree/master/skills/qa-test-data-engineering
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Kokxi/qa-test-skills.git /tmp/qa-test-skills
mkdir -p .claude/skills
cp -r /tmp/qa-test-skills/skills/qa-test-data-engineering .claude/skills/qa-test-data-engineering
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Qa Test Data Engineering in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Qa Test Data Engineering on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Qa Test Data Engineering is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

⚠️ 本技能单独使用效果有限,建议配合完整技能集(12 步工作流)使用。安装:npx skills add Kokxi/qa-test-skills

测试数据工程

核心原则

测试数据是测试的基础,好的数据管理让测试可重复、可追溯。

数据构造方法

手动构造

text
适用场景:
├─ 少量数据
├─ 复杂业务数据
├─ 一次性数据
└─ 调试用途

方法:
├─ 数据库直接插入
├─ 管理后台创建
├─ 接口调用创建
└─ 脚本批量创建

数据工厂

text
适用场景:
├─ 批量数据
├─ 标准化数据
├─ 重复性数据
└─ 自动化测试

工具:
├─ Faker(Python/JS)
├─ Mockaroo(在线)
├─ Factory Bot(Ruby)
└─ 自建工厂类

数据库脚本

sql
-- 示例:用户数据构造
INSERT INTO users (username, email, phone, status, created_at)
VALUES 
    ('testuser001', 'test1@example.com', '13800000001', 'active', NOW()),
    ('testuser002', 'test2@example.com', '13800000002', 'active', NOW()),
    ('testuser003', 'test3@example.com', '13800000003', 'inactive', NOW());

API构造

python
# 示例:通过API构造订单数据
def create_test_order(user_id, product_id, quantity=1):
    response = requests.post(
        f"{BASE_URL}/orders",
        json={
            "user_id": user_id,
            "product_id": product_id,
            "quantity": quantity
        },
        headers={"Authorization": f"Bearer {token}"}
    )
    return response.json()["order_id"]

加载时机

什么时候读读哪个
做脱敏规则与实现时references/data-masking.md

数据脱敏的完整内容已下沉至 references/data-masking.md,避免每次触发都占用上下文。

数据清理

📌 本节与 qa-test-env-data「数据清理」内容同步,修改时请同步更新两处。

清理策略

text
├─ 按用例清理
│   ├─ 每个用例执行后清理
│   ├─ 优点:数据隔离好
│   └─ 缺点:效率低
│
├─ 按模块清理
│   ├─ 每个模块测试后清理
│   ├─ 优点:效率较高
│   └─ 缺点:隔离性一般
│
├─ 按批次清理
│   ├─ 每个批次测试后清理
│   ├─ 优点:效率高
│   └─ 缺点:隔离性差
│
└─ 定期清理
    ├─ 定期清理历史数据
    ├─ 优点:保持数据量可控
    └─ 缺点:可能影响测试

清理实现

⚠️ 安全警告:以下 SQL 清理示例仅适用于隔离的测试环境,切勿在生产数据库执行。 执行前必须确认:

  1. 目标数据库已确认为测试环境
  2. 先用 SELECT COUNT(*) 预览受影响行数
  3. 使用事务包裹(BEGIN; DELETE ...; ROLLBACK;)做无害验证
  4. 数据表有 is_test 等明确测试标记字段
  5. 如无把握,先向 DBA 确认清理范围
sql
-- 示例:清理测试数据
-- 方法1:按时间清理
DELETE FROM orders WHERE created_at < DATE_SUB(NOW(), INTERVAL 7 DAY);

-- 方法2:按标记清理
DELETE FROM orders WHERE is_test = 1;

-- 方法3:按用户清理
DELETE FROM orders WHERE user_id IN (SELECT id FROM users WHERE is_test = 1);

数据管理规范

命名规范

text
测试用户:
├─ 格式:test_[角色]_[序号]
├─ 示例:test_user_001, test_admin_001
└─ 标记:is_test = 1

测试数据:
├─ 格式:[类型]_test_[序号]
├─ 示例:order_test_001, product_test_001
└─ 标记:is_test = 1

数据生命周期

text
├─ 构造:测试前准备数据
├─ 使用:测试中使用数据
├─ 验证:测试后验证数据
├─ 清理:测试后清理数据
└─ 归档:历史数据归档

输出示例

构造100条用户注册测试数据 → 手动构造:录入10条核心数据(正常用户/边界值) → 数据工厂:编写SQL脚本批量生成80条 → API构造:调用注册接口自动化生成剩余

生产数据脱敏用于测试 → 脱敏规则:手机号(中间4位***)、身份证(生日****)、姓名(张三) → 脱敏实现:Docker部署Greenplum,配置脱敏策略执行

检查清单

测试数据管理完成后检查:

  • 数据构造方法是否设计?
  • 脱敏规则是否定义?
  • 清理机制是否实现?
  • 命名规范是否统一?
  • 数据生命周期是否管理?
  • 数据可追溯性是否保证?

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Qa Test Data Engineering AI skill do?

当需要批量构造测试数据(造 1000 条订单、准备各种状态的用户数据)、或者需要使用真实生产数据但需要脱敏时使用此技能。覆盖造数策略(API 造数/DB 直接构造/数据工厂)、脱敏方案(敏感字段识别/替换/掩码)、合规要求(GDPR/等保/个保法)和数据工厂架构设计。手工一条条造数据效率太低——测试数据工程的目标是让造数变成一键操作。 触发场景:造数、批量造数、数据构造、测试数据脱敏、测试数据合规、数据工厂、造1000条、造大量数据、环境数据不足需要批量构造时。 Use when the user asks about: bulk test data generation, production data masking and anonymization, data compliance, and data factory architecture.

Why use Qa Test Data Engineering on TypingMind?

Because you install it once and use it with any model. Qa Test Data Engineering is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Qa Test Data Engineering in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Kokxi/qa-test-skills/tree/master/skills/qa-test-data-engineering. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Qa Test Data Engineering?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Qa Test Data Engineering?

As many as you like. As long as a model supports skills, you can use Qa Test Data Engineering with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Qa Test Data Engineering AI skill free?

Yes. It is published on GitHub by Kokxi under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇