Files
alla-tms/docs/uat-test-plan.md
2026-07-16 09:53:14 +07:00

5.2 KiB

UAT Test Plan

1. วัตถุประสงค์

เอกสารนี้ใช้สำหรับวางแผน User Acceptance Testing (UAT) ของ Training Management System (TMS) โดยอ้างอิงจาก implementation ปัจจุบันใน repository เพื่อให้ Business User สามารถนำไปใช้ทดสอบจริงได้ทันที

2. ขอบเขตที่ตรวจจากโค้ดจริง

โมดูล runtime ที่พบและอยู่ในขอบเขต UAT:

  • Authentication
  • Dashboard / Overview
  • Training Records
  • Pending Review
  • Courses
  • Training Policy
  • Training Matrix
  • Users
  • Employee Directory
  • Announcements
  • Online Lessons
  • Reports
  • Notifications
  • Import Employees
  • Master Review
  • Permission Templates
  • User Permissions
  • Permission Audit Logs
  • Audit Logs
  • Organizers

3. นอกขอบเขตหรือยังไม่พบเป็น runtime module ชัดเจน

  • Settings ยังไม่พบเป็นโมดูล dashboard ที่พร้อมใช้งานจริง
  • role แบบ Staff, Manager, HRD Manager ไม่พบเป็น role runtime ใน auth model ปัจจุบัน
  • generic export center ไม่พบแยกเป็นโมดูลกลาง
  • generic attachment center ไม่พบแยกเป็นโมดูลกลาง

4. Architecture Baseline ที่ใช้ในการทดสอบ

อ้างอิงจากโค้ดจริง:

  • Frontend: Next.js 16 App Router + TypeScript
  • Persistence: Drizzle ORM + PostgreSQL
  • Auth: Auth.js Credentials
  • Forms: TanStack Form + Zod
  • Data fetching: TanStack Query
  • UI: shadcn/ui
  • Permission Model: Permission Template + server-side RBAC
  • Workflow ที่พบจริง: draft, pending, approved, rejected, needs_revision, published, archived

หมายเหตุ:

  • แผน plans/uat-test.md อ้างถึง Prisma แต่ implementation ปัจจุบันใช้ Drizzle ORM

5. Persona สำหรับ UAT

ใช้ persona ตามระบบปัจจุบัน:

Persona อิงจากโค้ด ใช้ทดสอบ
Super Admin systemRole = super_admin organizer management, permission management, audit logs
HRD Admin membership owner/admin -> businessRole = HRD users, employee directory, courses, training, reports, announcements, online lessons
Employee membership member -> businessRole = EMPLOYEE own training records, public announcements, public online lessons, own reports, notifications

6. Test Environment / Entry Criteria

  • ตั้งค่า .env.local และเชื่อมต่อฐานข้อมูลได้
  • migrate schema เรียบร้อย
  • dev server รันได้
  • มี test organization อย่างน้อย 1 รายการ
  • มี department / position / course ขั้นต่ำสำหรับ flow หลัก
  • มีบัญชีทดสอบ 3 persona ตามตารางข้างต้น

7. Exit Criteria

  • Happy path ของทุกโมดูลหลักผ่าน
  • Permission test ตาม persona ผ่าน
  • Validation / negative case สำคัญผ่าน
  • Regression checklist ผ่านหลังแก้ defect
  • defect ที่เหลือถูกบันทึกพร้อม severity และ owner

8. ลำดับแนะนำในการทดสอบ

  1. Authentication และ route protection
  2. Organizer / organization context
  3. Users และ Employee Directory
  4. Courses / Training Policy / Training Matrix
  5. Training Records และ Approval
  6. Announcements / Online Lessons
  7. Reports / Export
  8. Notifications
  9. Import Employees / Master Review
  10. Permission Management / Audit Logs

9. ประเภทการทดสอบที่ต้องครอบคลุม

  • Happy Path
  • CRUD
  • Validation
  • Permission / Scope isolation
  • Workflow / Approval
  • Search / Filter / Pagination
  • Upload / Download / Export
  • Negative Case
  • Regression

10. เอกสารที่เกี่ยวข้อง