# Test-Driven QA

Write unit, integration, and end-to-end tests, practice TDD, create QA test plans, and improve test coverage. Deliverables include test code, QA checklists, and test strategies aligned with the testing pyramid.

**Canonical URL:** https://skillshunter.net/skills/discovered-f415607a738a8eb7cdc629022ae7a0a12065068ab26437ed

**JSON URL:** https://skillshunter.net/api/public/v1/skills/discovered-f415607a738a8eb7cdc629022ae7a0a12065068ab26437ed

**Markdown URL:** https://skillshunter.net/skills/discovered-f415607a738a8eb7cdc629022ae7a0a12065068ab26437ed.md

**Instructions download URL:** https://skillshunter.net/skills/discovered-f415607a738a8eb7cdc629022ae7a0a12065068ab26437ed/download

**Category:** Software & Development

**Source URL:** https://github.com/thanhn08502-cmd/ai-skills-dev/blob/af74c372e97d85cb399661fdda66320b15c4eaa5/skills/test-driven-qa/SKILL.md

**Source commit:** af74c372e97d85cb399661fdda66320b15c4eaa5

**Listing approved at:** 2026-12-02

**Created at:** 2026-11-30T09:03:59.000000Z

**Updated at:** 2026-12-02T09:15:52.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

Ensure the testing environment is set up with necessary dependencies before running tests. Prepare test data and define clear test specifications before writing test cases.

### When to use it

- Writing unit tests for business logic and edge cases
- Creating integration tests for API endpoints and database queries
- Designing end-to-end tests for critical user journeys
- Practicing TDD with the Red-Green-Refactor workflow
- Improving test coverage with thorough QA checklists

## Skill instructions

---
name: test-driven-qa
description: >-
  Use this skill when writing unit, integration, or end-to-end tests, practicing TDD,
  creating QA test plans, or improving test coverage. Kích hoạt khi người dùng yêu cầu viết test,
  kiểm thử phần mềm, lập kế hoạch QA, kiểm tra edge case hoặc đảm bảo chất lượng trước khi phát hành.
---

# Test-Driven QA

Build confidence in software behavior through fast, deterministic, high-signal automated tests and thorough QA checklists.

## Workflow

1. **Define Test Strategy (Testing Pyramid)**
   - **Unit tests**: Pure business logic, edge cases, boundary inputs, state transitions.
   - **Integration tests**: Database queries, API endpoints, service boundaries, serialization.
   - **End-to-End (E2E) tests**: Critical user journeys (auth, checkout, core CRUD workflows).
2. **Apply Red-Green-Refactor (When Building New Features or Fixes)**
   - **Red**: Write a failing test capturing the exact specification or bug first.
   - **Green**: Implement the minimal code required to pass.
   - **Refactor**: Clean up code and tests while keeping the suite green.
3. **Cover Essential Edge Cases**
   - Empty/null inputs, maximum/minimum boundaries, duplicate submissions, unauthorized users, network/timeout failures, and invalid formats.
4. **Keep Tests Clean & Deterministic**
   - Follow Arrange-Act-Assert (AAA) structure with descriptive test names (`should_<expected>_when_<condition>`).
   - Mock only external boundaries (network, clock, third-party APIs); avoid over-mocking internal implementation details.
   - Ensure zero shared mutable state between tests so they run in any order.
5. **Verify Before Declaring Done**
   - Execute the full relevant test suite and report pass/fail counts, skipped tests, and any untested risk areas.

