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

2.7 KiB

Test Data Guide

1. Persona Data

ควรเตรียมผู้ใช้ขั้นต่ำดังนี้:

Persona จำนวน จุดประสงค์
Super Admin 1 organizer management, permission management, audit logs
HRD Admin 1-2 master data, training workflow, reports, import
Employee 2-3 self-service flow, scope isolation, notification

2. Organization Data

  • Organization A สำหรับการทดสอบหลัก
  • Organization B สำหรับทดสอบ cross-organization isolation

3. Master Data

ควรมีข้อมูลขั้นต่ำ:

  • 2 companies
  • 2 departments
  • 2 positions
  • 3 courses
  • 1 active training policy
  • 2 training matrix rules

4. Training Record Data

ควรมีอย่างน้อย:

  • 1 draft record
  • 1 pending record
  • 1 approved record
  • 1 needs_revision record
  • 1 rejected record
  • 1 record ที่มี certificate

5. Announcement Data

  • 1 draft announcement
  • 1 published announcement ที่ active
  • 1 archived announcement
  • 1 announcement ที่มี attachment
  • 1 announcement ที่ end date ผ่านแล้ว

6. Online Lesson Data

  • 1 draft lesson
  • 1 published lesson แบบ video URL
  • 1 published lesson แบบ uploaded file
  • 1 archived lesson
  • 1 lesson ที่มี attachment และ thumbnail

7. Reports Data

เพื่อให้ report มีความหมาย ควรมี:

  • training records หลายเดือนในปีเดียวกัน
  • พนักงานหลายแผนก
  • approved hours หลายระดับ
  • target hours จากทั้ง employee target และ training policy

8. Import / Master Review Data

ควรเตรียมไฟล์ import 3 แบบ:

  • ไฟล์ valid ทั้งหมด
  • ไฟล์มีบางแถว error
  • ไฟล์ที่สร้าง pending company / department / position

9. Permission Management Data

  • 1 system template
  • 2 non-system templates
  • 1 user ที่ยังไม่ assigned template
  • 1 user ที่ assigned template แล้ว
  • 1 user ที่มี allow override
  • 1 user ที่มี deny override

10. Negative Test Data

  • email ซ้ำ
  • employee code ซ้ำ
  • ไฟล์ผิดประเภท
  • ไฟล์เกินขนาด
  • query string ที่พยายามเปิดข้อมูลของคนอื่น
  • organization B data ที่ user organization A ไม่ควรเห็น