agentleFS
anhtesteranhtester/codex-testing-kit/.agents/skills/generate-application-test-plan/SKILL.md

generate-application-test-plan

Skill28 starsChanged 4 months agoMITView on GitHub

Khám phá ứng dụng web, sinh test plan và test scenarios. Hỗ trợ 2 mode — PLAN (chỉ test plan) và FULL (test plan + automation skeleton).

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Test Data phải cụ thể (không placeholder chung chung)

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Workflow: Khám Phá Ứng Dụng & Sinh Test Plan

BẮT BUỘC (MANDATORY SKILL): Bạn PHẢI nạp và đọc kỹ nội dung của skill $qa-automation-engineer (tại .agents/skills/qa-automation-engineer/SKILL.md) trước khi bắt đầu. Ngoài ra, tham khảo thêm skill $requirements-analyzer và $ui-debug-agent để hỗ trợ phân tích UI.

Workflow này giúp agent tự động khám phá một ứng dụng web, phân tích cấu trúc, xác định các modules/user flows quan trọng, và sinh ra Test Plan hoàn chỉnh.

⚠️ Nguyên tắc thực thi

  • Tất cả output bằng Tiếng Việt
  • KHÔNG đoán cấu trúc app — phải inspect DOM thực tế qua MCP/browser tools
  • Phải chờ user xác nhận scope tại Bước 2 trước khi sinh chi tiết
  • Nếu user chưa cung cấp URL → hỏi trước khi bắt đầu

2 Chế độ (Mode)

ModeKhi nào sử dụngOutput
PLAN (mặc định)User cần khám phá app, lập test plan, xác định scenariosModules, User Flows, Test Scenarios, Priority
FULLUser yêu cầu thêm automation skeleton hoặc nói "full automation suite"Như PLAN + Manual Test Cases + Automation Skeleton (POM + Test classes)

Nếu user nói "generate full automation suite", "bootstrap automation", hoặc yêu cầu code → tự động chuyển sang Mode FULL.

Các bước thực hiện

Bước 1: Tiếp nhận & Khám phá ứng dụng (Recon)

  1. Nhận URL ứng dụng từ user
  2. Sử dụng MCP browser tools (Playwright MCP) để mở ứng dụng:
    • browser_navigate → URL
    • browser_resize(1920, 1080) → desktop viewport
    • browser_snapshot → thu thập cấu trúc DOM
  3. Khám phá navigation menus, sidebar, header để xác định các modules chính
  4. Lần lượt truy cập từng module chính, dùng browser_snapshot để ghi nhận:
    • Tên module / trang
    • Các thành phần UI chính (forms, tables, buttons, modals)
    • Các action có thể thực hiện (CRUD, search, filter, export...)
  5. Nếu app yêu cầu đăng nhập → hỏi user cung cấp credentials hoặc dùng fixture sẵn có

Bước 2: Phân tích & Xác nhận scope (Analysis — CHECKPOINT)

  1. Tổng hợp kết quả khám phá thành danh sách:
    • Modules đã phát hiện (tên, mô tả ngắn, số lượng features)
    • User Flows chính (Happy Path cho mỗi module)
    • Dependencies giữa các modules (nếu có)
  2. Đánh giá Risk Level sơ bộ cho mỗi module:
    • 🔴 High Risk — Module core, ảnh hưởng nhiều user, logic phức tạp
    • 🟡 Medium Risk — Module phụ trợ, sử dụng thường xuyên
    • 🟢 Low Risk — Module ít sử dụng, ít thay đổi
  3. ⏸️ DỪNG LẠI — Trình bày cho user review:
    • Danh sách modules + risk level
    • User flows đã xác định
    • Hỏi user: "Bạn muốn tập trung vào modules nào? Có flow nào cần bổ sung?"
  4. Chờ user xác nhận scope trước khi sang Bước 3

Bước 3: Sinh Test Scenarios & Priority

  1. Với mỗi module/flow đã được user xác nhận, sinh test scenarios:
    • Happy Path — luồng chính thành công
    • Negative Path — nhập sai, thiếu dữ liệu, lỗi validation
    • Edge Cases — boundary values, concurrent access, empty states
  2. Gán Priority cho mỗi scenario dựa trên Risk Level:
    • P1 (Critical) — Core flows, regression blockers, dữ liệu nhạy cảm
    • P2 (High) — Main features, tính năng sử dụng thường xuyên
    • P3 (Medium) — Secondary features, UI/UX checks
    • P4 (Low) — Nice-to-have, cosmetic checks

Bước 4: Đóng gói Test Plan (Output — Mode PLAN)

  1. Tạo artifact test_plan.md với cấu trúc:
    • Tổng quan ứng dụng — mục đích, tech stack (nếu xác định được), URL
    • Danh sách Modules — bảng gồm: Module, Mô tả, Risk Level, Số scenarios
    • User Flows — mô tả từng flow chính (steps)
    • Test Scenarios — bảng: | ID | Module | Scenario | Priority | Loại (Happy/Negative/Edge) |
    • Automation Candidates — đánh dấu scenarios nào nên tự động hóa và lý do
  2. Nếu user chọn Mode PLAN → KẾT THÚC tại đây

Bước 5: Sinh Manual Test Cases (Mode FULL)

Chỉ thực hiện khi ở Mode FULL

  1. Chuyển test scenarios (Bước 3) thành manual test cases đầy đủ:
    • TC ID, Module, Test Title, Pre-conditions, Test Steps, Expected Results, Test Data, Priority
  2. Test Data phải cụ thể (không placeholder chung chung)
  3. Xuất dưới dạng bảng Markdown trong artifact

Bước 6: Sinh Automation Skeleton (Mode FULL)

Chỉ thực hiện khi ở Mode FULL

  1. Xác định tech stack automation (hỏi user nếu chưa rõ):
    • Mặc định: Playwright + TypeScript (hoặc Selenium + Java theo preference)
  2. Sinh Page Object classes cho mỗi module:
    • Locator thu thập từ DOM thực tế (Bước 1), KHÔNG đoán
    • Methods tương tác rõ nghĩa
  3. Sinh Test class skeleton cho top-priority scenarios (P1, P2)
  4. Đảm bảo tuân thủ POM pattern và locator strategy theo rules

Output

Mode PLAN

  • Artifact test_plan.md gồm: App overview, Modules, User Flows, Test Scenarios (có Priority), Automation Candidates

Mode FULL

  • Tất cả output của Mode PLAN, cộng thêm:
  • Manual Test Cases (bảng Markdown)
  • Page Object classes
  • Test class skeletons
  • Assertions validating expected behavior

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.