# TEST EXECUTION ROADMAP - CMMSchool Teacher Portal
**Priority**: Phase-based execution  
**Total Phases**: 4  
**Estimated Total Time**: 16-20 hours (manual) | 2-3 hours (automated)

---

## PRIORITY MATRIX

```
           URGENCY
           ↑
    HIGH  │  P0  │  P1
           │ Fast │ Important
           │ Track│ but later
           ├──────┼─────────→ IMPORTANCE
    LOW   │ P2  │  P3
           │ Low │  Skip
           │ Prod│
           ↓
```

---

## PHASE 1: CRITICAL PATH (Smoke Tests) 
**Duration**: 45 minutes - 1 hour  
**Objective**: Verify system is functional and ready for deeper testing  
**Automation**: High priority for automation

### Group 1A: Authentication (25 minutes)
```
TC_001 ✅ Verify Teacher Login Page Load
  └─ EXPECTED: Login form displays with username/password fields
  
TC_002 ✅ Verify Login with Valid Credentials  
  └─ PREREQUISITE: Test teacher account credentials
  └─ EXPECTED: Redirect to School selection page
  
TC_003 ✅ Verify Login with Invalid Credentials
  └─ EXPECTED: Error message displays (inline/modal/toast)
  └─ ACTION: CLARIFY error message exact text and placement
  
CONSOLIDATED (Skip individual empty field tests):
  [TC_004, TC_005, TC_006] → Single parameterized test
  - Username empty, Password empty, Both empty
  
TC_008 ✅ Verify Password Masking
  └─ EXPECTED: Passcode field shows dots/asterisks
```

**Critical Decision Point**: 
- If login fails → Stop and debug authentication
- If login succeeds → Continue to Phase 1B

---

### Group 1B: Core Navigation (20 minutes)
```
TC_010 ✅ Verify Page Load After Login
  └─ EXPECTED: School selection page loads
  └─ ACTION: Verify this is actual target page (not dashboard)
  
TC_013 ✅ Verify School Selection
  └─ PREREQUISITE: Schools populated in database
  └─ EXPECTED: School selected, dropdown updates
  
TC_015 ✅ Verify Class Selection
  └─ PREREQUISITE: Classes available for selected school
  └─ EXPECTED: Class selected, visible feedback
  
TC_018 ✅ Verify Roster Page Load
  └─ PREREQUISITE: Student roster exists for class
  └─ EXPECTED: Roster page displays with student list
```

**Critical Decision Point**:
- If school/class selection fails → Stop and debug selection logic
- If roster loads → Continue to Phase 1C

---

### Group 1C: Basic Interaction (20 minutes)
```
TC_019 ✅ Verify Student List Display
  └─ EXPECTED: Students display in table with names/DOB
  
TC_021 ✅ Verify Attendance Checkboxes
  └─ EXPECTED: IN/OUT/ABS checkboxes functional
  
TC_022 ✅ Verify Single Status Selection
  └─ EXPECTED: Only one status selectable per student
  └─ ACTION: Verify exclusivity logic works
  
TC_038 ✅ Verify Messaging Page Load
  └─ EXPECTED: Messaging page loads from sidebar
  
TC_044 ✅ Verify Delete Selected
  └─ EXPECTED: Message deleted after confirmation
```

**Result if Phase 1 passes**: ✅ System is functional - proceed to Phase 2  
**Result if Phase 1 fails**: 🔴 BLOCKED - Debug and retry Phase 1

---

## PHASE 2: CORE FEATURES & WORKFLOWS
**Duration**: 6-8 hours  
**Objective**: Verify major user workflows work correctly  
**Automation**: Medium-high priority

### Group 2A: Roster Management (90 minutes)
```
TC_020 ✅ Verify Columns Visibility
TC_026 ✅ Verify Date Navigation
TC_027 ✅ Verify Sidebar Navigation
TC_028 ✅ Verify Logged-in User Info
TC_023 ✅ Verify Add Note Functionality (ACTION: CLARIFY location)
TC_024 ✅ Verify Birthday Display
TC_025 ✅ Verify Allergy Information Display
```

### Group 2B: Messaging Features (90 minutes)
```
TC_039 ✅ Verify Inbox Tab Default
TC_040 ✅ Verify Inbox Data Display
TC_041 ✅ Verify Message Details
TC_042 ✅ Verify Open Message
TC_047 ✅ Verify Send Message to Individual
TC_048 ✅ Verify Bulk Message Functionality
TC_050 ✅ Verify Student List Display
```

### Group 2C: Quest - Lesson Plan (120 minutes)
```
TC_057 ✅ Verify Assign Lesson Page Load
TC_058 ✅ Verify Dropdown Selection (ACTION: CLARIFY dependencies)
TC_059 ✅ Verify Student Selection
TC_060 ✅ Verify Date Selection
TC_061 ✅ Verify Save Button Functionality
TC_062 ✅ Verify Validation for Empty Fields (ACTION: CLARIFY errors)

TC_066 ✅ Verify Planned Lessons Page Load
TC_067 ✅ Verify Date Range Filter
TC_068 ✅ Verify Area Dropdown Filter

TC_071 ✅ Verify Lesson Status Page Load
TC_072 ✅ Verify Date Filter
TC_073 ✅ Verify Student Filter
TC_074 ✅ Verify Assign Status Filter
TC_075 ✅ Verify Table Data Display
```

### Group 2D: Observations (90 minutes)
```
TC_102 ✅ Verify Observations Page Load
TC_103 ✅ Verify Observations List Display
TC_104 ✅ Verify Add Observation Button
TC_108 ✅ Verify Date Selection
TC_109 ✅ Verify Student Dropdown
TC_110 ✅ Verify Description Field Input
TC_115 ✅ Verify Save Functionality
TC_106 ✅ Verify Notified Status Display
```

### Group 2E: Daily Report (90 minutes)
```
TC_131 ✅ Verify Daily Report Page Load
TC_132 ✅ Verify Date Navigation
TC_133 ✅ Verify Student List Display
TC_134 ✅ Verify Today I Was Selection
TC_135 ✅ Verify I Ate Selection
TC_137 ✅ Verify Need Section Checkboxes
TC_141 ✅ Verify Submit Button Functionality (ACTION: CLARIFY feedback)
```

---

## PHASE 3: DETAILED ASSESSMENTS
**Duration**: 8-10 hours  
**Objective**: Verify complex assessment workflows  
**Automation**: Medium priority (high redundancy to consolidate)

### ⚠️ REDUNDANCY WARNING
Phases 3A and 3B have **40+ near-identical test cases**. 
Recommendation: Use **data-driven testing** instead of 70+ manual cases.

### Group 3A: Progress Assessment (CONSOLIDATED)
**Original**: TC_144-TC_213 (70 cases)  
**Consolidated**: 15-20 data-driven tests

```
SECTION LOAD TESTS (5 tests):
TC_144 ✅ Verify Data Display in Grid
TC_156 ✅ Verify Practical Life Section Load
TC_166 ✅ Verify Sensorial Section Load
TC_176 ✅ Verify Language Arts Section Load
TC_212 ✅ Verify Social & Emotional Section Load

FORM SUBMISSION (5 tests):
TC_148 ✅ Verify Add Form → Skip redundant TC_147
TC_149 ✅ Verify Mandatory Fields Validation
TC_154 ✅ Verify Form Submission with Valid Data
TC_155 ✅ Verify Invalid Data Handling
TC_213 ✅ Verify full form submission

SECTION-SPECIFIC (5 tests - parameterized):
Test Set 1: Practical Life (dates + YES/NO selections)
  - TC_157, TC_158, TC_159, TC_160, TC_165
Test Set 2: Sensorial (checkboxes + scoring)
  - TC_168-TC_171, TC_172, TC_174
Test Set 3: Language Arts (checkboxes + scoring)
  - TC_178-TC_186, TC_187
Test Set 4: Mathematics (grid + scoring)
  - TC_199-TC_207

DATA PERSISTENCE (2 tests):
TC_206 ✅ Verify data persistence (refresh page)
TC_207 ✅ Verify edit functionality

SKIP AS REDUNDANT:
[TC_160-TC_164]: YES/NO selection (covered by test set)
[TC_167, TC_177]: Seasonal dates (covered by Test Set)
[TC_173, TC_209-TC_211]: Variation on YES/NO (covered)
[TC_195, TC_208]: Checkbox toggle (covered)
Total redundancy eliminated: 30-35 cases
```

### Group 3B: Readiness Assessment (CONSOLIDATED)
**Original**: TC_214-TC_243 (30 cases)  
**Consolidated**: 10-12 data-driven tests

```
LIST & ADD TESTS (5 tests):
TC_214 ✅ Verify List Page Load
TC_215 ✅ Verify Student Data Display
TC_216 ✅ Verify +ADD Button
TC_219 ✅ Verify Add Form Load
TC_230 ✅ Verify Form Submission

SECTION LOAD TESTS (3 tests):
TC_231 ✅ Verify Language Development Section
TC_235 ✅ Verify Cognitive Development Section
TC_222 ✅ Verify Checkbox Selection (parameterized)

SCORING TESTS (3 tests):
TC_223 ✅ Verify Points Calculation
TC_233 ✅ Verify Language Points Calculation
TC_237 ✅ Verify Cognitive Points Calculation
TC_239 ✅ Verify Grand Total Calculation

DATA PERSISTENCE (2 tests):
TC_227 ✅ Verify Data Persistence
TC_229 ✅ Verify Multiple Submissions

SKIP AS REDUNDANT:
[TC_217]: Columns (covered by TC_215)
[TC_232, TC_236]: Checkbox selection (covered)
[TC_234, TC_238]: Comments field (similar test)
[TC_240]: Grand Total = 0 (edge case of TC_239)
[TC_241, TC_242]: UI/button tests (covered)
Total redundancy eliminated: 12-15 cases
```

---

## PHASE 4: EDGE CASES & VALIDATION
**Duration**: 2-3 hours  
**Objective**: Verify error handling, boundaries, and edge cases  
**Automation**: Low-medium priority

### Group 4A: Input Validation
```
TC_007 ✅ Verify Forgot Passcode Link
TC_189 ✅ Verify positional words input (ACTION: MISSING bounds?)
TC_190 ✅ Verify positional words validation limit (/5)
TC_193 ✅ Verify sight word input validation (/40)
TC_201 ✅ Verify score limit validation (/40)
TC_082 ✅ Verify Media Mandatory Fields (ACTION: CLARIFY error)
TC_085 ✅ Verify Invalid Link Validation
```

### Group 4B: File Upload
```
TC_086 ✅ Verify Image Upload (Valid Format)
TC_087 ✅ Verify Image Upload (Invalid Format)
TC_088 ✅ Verify Image Upload Without File (ACTION: Optional?)
TC_112 ✅ Verify Incident Report Upload (Valid)
TC_113 ✅ Verify Incident Report Upload (Invalid)
TC_140 ✅ Verify Add Attachment (TC_140)
```

### Group 4C: Empty States & Edge Cases
```
TC_031 ✅ Verify No Records Message (Incoming)
TC_045 ✅ Verify No Message (Messaging)
TC_099 ✅ Verify No Record Found (Record Keeping)
TC_146 ✅ Verify Empty State (Progress Assessment)
TC_225 ✅ Verify Submit Without Selection (Readiness)
TC_240 ✅ Verify Grand Total Without Selection
TC_203 ✅ Verify no selection behavior (Math)
```

### Group 4D: UI/UX Consistency
```
TC_016 ✅ Verify Default Values (Dashboard)
TC_056 ✅ Verify UI Consistency of Footer Button
TC_228 ✅ Verify Scroll Behavior (Form)
TC_241 ✅ Verify Score Scale Display
```

---

## MISSING TESTS TO ADD (NEW: TC_244-TC_270)

### High Priority (Must Add Before Release)
```
TC_244 🆕 Verify unauthorized access redirects to login
  └─ Navigate to /tp/te/dashboard without login
  └─ EXPECTED: Redirect to /tp/te/login
  
TC_245 🆕 Verify CSRF token validation on form submission
  └─ Submit login form without CSRF token
  └─ EXPECTED: Form rejection or error
  
TC_246 🆕 Verify session timeout after inactivity
  └─ Login, wait 15+ minutes (or force session expire)
  └─ EXPECTED: Redirect to login with message
  
TC_247 🆕 Verify SQL injection prevention
  └─ In any search field: enter "' OR '1'='1"
  └─ EXPECTED: Safe query execution, no data breach
  
TC_248 🆕 Verify XSS prevention
  └─ In note field: enter "<script>alert('XSS')</script>"
  └─ EXPECTED: Script not executed, text stored safely
```

### Medium Priority (Add Before Full Release)
```
TC_249 🆕 Verify pagination edge cases
  └─ Load page with 1000+ records
  └─ EXPECTED: Pagination works, no memory issues
  
TC_250 🆕 Verify duplicate submission prevention
  └─ Submit form, click submit twice rapidly
  └─ EXPECTED: Only one record created
  
TC_251 🆕 Verify page load time < 3 seconds
  └─ Load dashboard with 100 students
  └─ EXPECTED: Full load in < 3 seconds
  
TC_252 🆕 Verify filter combination accuracy
  └─ Apply multiple filters simultaneously
  └─ EXPECTED: All filters applied correctly
  
TC_253 🆕 Verify special characters in text fields
  └─ Enter "Müller's café & shop" in notes
  └─ EXPECTED: Stored and displayed correctly
```

---

## TEST EXECUTION SCHEDULE

### Week 1: Manual Testing
```
Monday:
  - 2 hours: Set up environment, prepare test data
  - 3 hours: Phase 1 (Critical Path smoke tests)
  - 2 hours: Bug triage and documentation

Tuesday-Wednesday:
  - 8 hours: Phase 2 (Core features)
  - Document findings

Thursday-Friday:
  - 8 hours: Phase 3 (Assessments - consolidated)
  - 4 hours: Phase 4 (Edge cases)
  - 2 hours: Bug summary and recommendations

Total: ~30 hours of testing
```

### Week 2: Automation Implementation
```
Monday-Wednesday:
  - Automation setup for Phase 1 tests
  - Basic Selenium/Playwright scripts
  
Thursday-Friday:
  - Automation for Phase 2 tests
  - Initial CI/CD integration
  
Target: 80% of tests automated by end of week
```

---

## TEST RESULT TRACKING

### Failure Classification
```
BLOCKER (P0):
  - Login fails
  - Roster doesn't load
  - Assessment can't be saved
  → Fixes required before proceeding

MAJOR (P1):
  - Validation message wrong format
  - Filter doesn't work correctly
  - Data not persisting
  → Fixes before release

MINOR (P2):
  - UI spacing issue
  - Tooltip text typo
  - Color slightly off
  → Can defer or patch

COSMETIC (P3):
  - Button animation missing
  - Font size inconsistency
  → Optional improvements
```

---

## SUCCESS CRITERIA

### Phase 1 Success
- ✅ All login tests pass
- ✅ School/class selection works
- ✅ Roster page loads with data
- ✅ No JavaScript errors in console

### Phase 2 Success
- ✅ All core workflows complete successfully
- ✅ Data persists correctly
- ✅ Navigation between modules works
- ✅ <1% failure rate

### Phase 3 Success
- ✅ All assessment forms submit successfully
- ✅ Calculations (points, totals) are accurate
- ✅ Data displays correctly after refresh
- ✅ <2% failure rate (mostly data issues)

### Phase 4 Success
- ✅ All error messages display correctly
- ✅ Input validation works as expected
- ✅ Edge cases handled gracefully
- ✅ <1% failure rate

### Overall Success
- ✅ 95%+ test pass rate
- ✅ All blockers resolved
- ✅ <10 major issues outstanding
- ✅ Ready for UAT/production

---

## APPENDIX: Test Case Status Legend

| Status | Meaning |
|--------|---------|
| ✅ Ready | Can execute immediately; no clarifications needed |
| ⚠️ Partial | Can execute but needs observations for some expectations |
| 🔴 Blocked | Cannot execute without additional info/setup |
| 🆕 New | Recommended new test (not in original 243) |
| SKIP | Redundant or superseded by another test |
| CONSOLIDATED | Multiple tests merged into data-driven approach |

---

**Last Updated**: April 6, 2026  
**Ready for Approval**: YES ✅  
**Estimated ROI**: 95%+ defect detection | 70% time reduction (automation)
