Chuyển đến nội dung
Skillpedia
Kiểm thử12k · #11464

test-master

Skill này làm gì

Skill giúp AI tạo test đơn vị, tích hợp và đầu cuối, và lên kế hoạch cách dự án nên được kiểm thử. Skill dành cho lập trình viên và nhân viên QA.

Khi nào nên dùng

  • ✓Khi bạn muốn viết test cho một tính năng mới hoặc code có sẵn.
  • ✓Khi bạn cần tìm chỗ thiếu trong độ phủ test.
  • ✓Khi test của bạn thất bại hoặc không ổn định và bạn muốn sửa nguyên nhân gốc.

Liên kết skill

https://github.com/Jeffallan/claude-skills/blob/main/skills/test-master/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/Jeffallan/claude-skills/blob/main/skills/test-master/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể viết test đơn vị cho hàm tính giá này và cho tôi biết những trường hợp nào tôi đang thiếu không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

AI xác định phạm vi, viết test với các kiểm tra rõ ràng, chạy chúng, sửa các lỗi và viết báo cáo có mức nghiêm trọng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Test Master

Comprehensive testing specialist ensuring software quality through functional, performance, and security testing.

Core Workflow

  1. Define scope — Identify what to test and which testing types apply
  2. Create strategy — Plan the test approach across functional, performance, and security perspectives
  3. Write tests — Implement tests with proper assertions (see example below)
  4. Execute — Run tests and collect results
    • If tests fail: classify the failure (assertion error vs. environment/flakiness), fix root cause, re-run
    • If tests are flaky: isolate ordering dependencies, check async handling, add retry or stabilization logic
  5. Report — Document findings with severity ratings and actionable fix recommendations
    • Verify coverage targets are met before closing; flag gaps explicitly

Quick-Start Example

A minimal Jest unit test illustrating the key patterns this skill enforces:

// ✅ Good: meaningful description, specific assertion, isolated dependency
describe('calculateDiscount', () => {
  it('applies 10% discount for premium users', () => {
    const result = calculateDiscount({ price: 100, userTier: 'premium' });
    expect(result).toBe(90); // specific outcome, not just truthy
  });

  it('throws on negative price', () => {
    expect(() => calculateDiscount({ price: -1, userTier: 'standard' }))
      .toThrow('Price must be non-negative');
  });
});

Apply the same structure for pytest (def test_…, assert result == expected) and other frameworks.

Reference Guide

Load detailed guidance based on context:

<!-- TDD Iron Laws and Testing Anti-Patterns adapted from obra/superpowers by Jesse Vincent (@obra), MIT License -->
Topic Reference Load When
Unit Testing references/unit-testing.md Jest, Vitest, pytest patterns
Integration references/integration-testing.md API testing, Supertest
E2E references/e2e-testing.md E2E strategy, user flows
Performance references/performance-testing.md k6, load testing
Security references/security-testing.md Security test checklist
Reports references/test-reports.md Report templates, findings
QA Methodology references/qa-methodology.md Manual testing, quality advocacy, shift-left, continuous testing
Automation references/automation-frameworks.md Framework patterns, scaling, maintenance, team enablement
TDD Iron Laws references/tdd-iron-laws.md TDD methodology, test-first development, red-green-refactor
Testing Anti-Patterns references/testing-anti-patterns.md Test review, mock issues, test quality problems

Constraints

MUST DO

  • Test happy paths AND error/edge cases (e.g., empty input, null, boundary values)
  • Mock external dependencies — never call real APIs or databases in unit tests
  • Use meaningful it('…') descriptions that read as plain-English specifications
  • Assert specific outcomes (expect(result).toBe(90)), not just truthiness
  • Run tests in CI/CD; document and remediate coverage gaps

MUST NOT

  • Skip error-path testing (e.g., don't test only the success branch of a try/catch)
  • Use production data in tests — use fixtures or factories instead
  • Create order-dependent tests — each test must be independently runnable
  • Ignore flaky tests — quarantine and fix them; don't just re-run until green
  • Test implementation details (internal method calls) — test observable behaviour

Output Templates

When creating test plans, provide:

  1. Test scope and approach
  2. Test cases with expected outcomes
  3. Coverage analysis
  4. Findings with severity (Critical/High/Medium/Low)
  5. Specific fix recommendations

Maintained by @jeffallan, Principal Consultant at Synergetic Solutions

Documentation

Câu hỏi thường gặp

Nó chỉ viết test đơn vị thôi sao?

Không. Nó cũng bao quát kiểm thử tích hợp, đầu cuối, hiệu năng và bảo mật.

Nó dùng công cụ nào?

Ví dụ của nó dùng Jest, và nó nhắc tới k6 và Artillery cho test hiệu năng.

Nó xử lý test không ổn định thế nào?

Nó tìm các vấn đề về thứ tự và bất đồng bộ, và có thể thêm logic retry hoặc ổn định hóa.

Chi tiết

Mô tả gốc của tác giả

Generates test files, creates mocking strategies, analyzes code coverage, designs test architectures, and produces test plans and defect reports across functional, performance, and security testing disciplines. Use when writing unit tests, integration tests, or E2E tests; creating test strategies or automation frameworks; analyzing coverage gaps; performance testing with k6 or Artillery; security testing with OWASP methods; debugging flaky tests; or working on QA, regression, test automation, quality gates, shift-left testing, or test maintenance.

repo: Jeffallan/claude-skills

Độ phổ biến

Sao GitHub
12k
Vị trí xếp hạng
#11464
Giấy phép
MIT
Cập nhật
30/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự