单元测试工程师-测试数据与回归

Unit test engineer skill for stable fixtures, edge-case data design, and regression-oriented test inputs in WelineFramework.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "单元测试工程师-测试数据与回归" with this command: npx skills add aiweline/unit-test-data-regression

Role

This skill designs the data side of unit-level regression protection. It focuses on fixtures, edge-case input matrices, and deterministic reproduction data that makes logic regressions visible and maintainable.

When To Use

  • Use for fixture design, data providers, edge-case matrices, and regression input preparation.
  • Use for keywords such as fixture, test data, regression case, boundary case, dataset, and reproducible input.
  • Use when the main risk is not missing the assertion structure, but missing the right test inputs.

Source Material

  • AI-ENTRY.md
  • CLAUDE.md
  • dev/ai/skills/testing/SKILL.md
  • dev/ai/skills/community-module/SKILLS-CONSOLIDATED.md
  • dev/ai/skills/php84-performance/SKILL.md

Responsibilities

  • Build stable and realistic test inputs for changed logic.
  • Cover null safety, boundary values, invalid shapes, and historical regression patterns.
  • Keep test data readable and close to the business rule being protected.
  • Reduce flakiness by removing unnecessary dependence on ambient state.

Workflow

  1. Read the defect or feature behavior and identify the minimum input combinations that matter.
  2. Convert known bugs and edge conditions into explicit datasets or fixtures.
  3. Add null, empty, duplicate, and invalid-shape cases where the code path warrants them.
  4. Keep test data local, named, and understandable.
  5. Run the focused unit suite and confirm the regression inputs behave as expected.
  6. Remove redundant datasets that do not increase defect detection value.
  7. Document the key regression scenario in the test naming or comments if needed.

Weline Rules

  • Prefer small, isolated, testable changes.
  • Provide unit test evidence where relevant.
  • Follow PHP null-safety expectations when building regression cases.
  • Keep module boundaries intact when preparing fixtures or collaborators.

Inputs Required

  • The changed logic and known failure modes.
  • Historical bug symptoms, edge cases, or stack-trace triggers.
  • Existing fixture style in the target module.
  • Focused unit-test command for verification.

Expected Output

  • Focused datasets or fixtures that reproduce meaningful edge cases.
  • Updated regression coverage with clear input intent.
  • Evidence that the new datasets pass after the fix and protect the failure mode.

Validation

  • Run focused unit tests that consume the new datasets or fixtures.
  • Confirm the added cases cover meaningful branches or prior bugs.
  • Confirm no dataset depends on unrelated mutable global state.
  • Confirm fixture complexity stays justified by risk.

Constraints

  • Do not add bulky generic fixtures that hide the real regression case.
  • Do not depend on random values or time-sensitive data without control.
  • Do not create test data that crosses module boundaries without a strong reason.
  • Do not duplicate many near-identical datasets when one explicit case is enough.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

微盛企微管家SCRM

当用户需要查询或管理微盛企微管家(企业微信) SCRM 中的客户信息、客户标签、客户群、营销素材、活码、群发、跟进记录、聊天记录、联系人、商机、汇报、抽奖、客户日程等相关业务能力时触发。即使用户未明确提到 SCRM、企微管家、开放接口或 API,也应在这些企业微信客户运营与管理场景下触发。

Registry SourceRecently Updated
General

nextjs-pro

You are a Next. Use when: next.js 14+ app router, react server components (rsc), server actions, data fetching patterns, route handlers (api routes).

Registry SourceRecently Updated
General

Patsnap Lifescience Target Intelligence

Provides target intelligence report covering target details, drugs, pipelines, druggability, and indications. When to use this skill - Target structure and b...

Registry SourceRecently Updated
General

newsletter-writer

You are an AI-powered Newsletter Writer specializing in creating engaging email newsletters that build audience relationships, drive. Use when: newsletter st...

Registry SourceRecently Updated