Before testing, ensure:
- ✅ Apache and MySQL are running (XAMPP)
- ✅ Database
skillxchangeis imported with latest SQL - ✅ You're logged in as an organization (user role = 'organization')
- ✅ You have at least one project with members and tasks
- ✅ Browser cache is cleared (Ctrl+Shift+Delete)
- Navigate to:
http://localhost/SkillXchange/public/organization/projects - Verify each project card displays:
- ✅ Progress section appears below skills
- ✅ Completion percentage shows (0.0% to 100.0%)
- ✅ Progress bar fills correctly
- ✅ Task count shows "X/Y Tasks" format
- ✅ Overdue warning appears if tasks are overdue
Progress 65.5%
████████░░░░░░░░░░
✅ 13/20 Tasks
⚠️ 2 Overdue
Case 1A: Project with no tasks
- Expected: Progress = 0%, "0/0 Tasks", no overdue warning
Case 1B: Project with all tasks completed
- Expected: Progress = 100%, "20/20 Tasks", no overdue warning
Case 1C: Project with overdue tasks
- Expected: Red "
⚠️ X Overdue" badge appears
- Navigate to:
http://localhost/SkillXchange/public/organization/projects - Click "Members" button on any project
- Verify Project Progress Overview section appears at top
7 Metric Cards Display:
- ✅ Overall Progress (purple gradient, shows %)
- ✅ Total Tasks (gray, shows count)
- ✅ To-Do (yellow, shows pending count)
- ✅ In Progress (blue, shows active count)
- ✅ Completed (green, shows done count)
- ✅ Overdue (red border if > 0)
- ✅ Active Members (purple, shows member count)
Case 2A: Metric Calculations
- Create 10 tasks total
- Mark 5 as completed, 3 as in_progress, 2 as pending
- Expected: Total=10, Completed=5, In Progress=3, To-Do=2
- Expected: Progress = 50.0%
Case 2B: Overdue Detection
- Create task with due_date = yesterday
- Status = 'pending' or 'in_progress'
- Expected: Overdue count = 1, red border on Overdue card
Case 2C: Active Members Count
- Assign tasks to 3 different members
- Expected: Active Members = 3
- On members page, scroll to "Member Task Performance" section
- Verify each member shows:
- ✅ Avatar or initial circle
- ✅ Username and role badge
- ✅ Task statistics (total, completed, overdue)
- ✅ Progress bar with percentage
- ✅ Hover effect (card shifts right slightly)
👤 Devinda [Developer]
📋 8 tasks ✓ 6 done ⚠️ 1 overdue
████████████░░░░░░░░ 75.0% complete
Case 3A: Member with no tasks
- Expected: Shows "No tasks assigned yet"
- Expected: No progress bar displays
Case 3B: Member with all tasks completed
- Expected: Progress bar = 100%, green
- Expected: No overdue warning
Case 3C: Member with overdue tasks
- Expected: "
⚠️ X overdue" appears in red
- Create tasks with due_date in the past
- Ensure status != 'completed'
- Navigate to members page
- Verify "Overdue Tasks" section appears
⚠️ OVERDUE TASKS (2)
┌──────────────────────────────────────┐
│ 📌 Complete Login Module [3 days] │
│ Assigned to: Devinda | Due: Nov 23 │
└──────────────────────────────────────┘
Case 4A: No overdue tasks
- Expected: Overdue section does NOT display
Case 4B: Multiple overdue tasks
- Expected: Shows up to 5 tasks
- Expected: "... and X more overdue tasks" if > 5
Case 4C: Days overdue calculation
- Task due Nov 23, today Nov 26
- Expected: Shows "[3 days]" badge
- Open members page in browser
- Note current metrics (e.g., 5/10 completed)
- Mark 2 more tasks as completed
- Refresh the page (F5)
- Verify metrics updated
- Metrics change to 7/10 completed
- Progress percentage increases
- Completed count increases
- To-Do or In Progress count decreases
Case 5A: Task status change
- Change task from 'pending' to 'completed'
- Expected: To-Do count -1, Completed count +1, Progress % increases
Case 5B: New task created
- Add new task via task assignment modal
- Refresh page
- Expected: Total tasks +1, metrics recalculate
Case 5C: Task deleted
- Delete a task
- Refresh page
- Expected: Total tasks -1, metrics recalculate
- Open browser DevTools (F12) → Network tab
- Navigate to projects page (observe load time)
- Wait 1 second
- Refresh page (F5)
- Check load time again
- Second load should be faster (cache hit)
- Network tab shows fewer SQL queries
Case 6A: Cache Hit
- First load: ~100-150ms
- Second load (within 5 min): ~50-80ms
- Expected: Faster response
Case 6B: Cache Miss
- Wait 6+ minutes
- Refresh page
- Expected: Load time returns to ~100-150ms (cache expired)
Case 6C: Cache Invalidation
- Load page (cache populated)
- Create/update a task
- Load page again
- Expected: Metrics reflect new data (cache cleared)
- Open organization/projects page
- Open DevTools (F12)
- Click "Toggle device toolbar" (Ctrl+Shift+M)
- Test different viewport sizes
Desktop (1920x1080)
- Grid: 3-4 project cards per row
- All metrics visible horizontally
- Full progress bars
Tablet (768x1024)
- Grid: 2 project cards per row
- Metrics stack in 2 columns
- Progress bars adjust width
Mobile (375x667)
- Grid: 1 project card per row
- Metrics stack vertically
- Compact spacing
- Progress section readable
- Compare new progress cards with existing UI
- Verify color scheme matches
- Check font sizes and spacing
- Test hover effects
- ✅ Colors match existing design (purple, blue, green, red)
- ✅ Border radius = 12px (consistent)
- ✅ Font = Poppins
- ✅ Shadows = 0 2px 4px rgba(0,0,0,0.08)
- ✅ Hover effects smooth (0.3s transition)
Case 9A: Project with no members
- Expected: Active Members = 0
- Expected: No member breakdown section displays
Case 9B: Invalid project ID
- Navigate to
/organization/members/99999 - Expected: Redirect to projects page or error message
Case 9C: Database connection error
- Stop MySQL temporarily
- Load page
- Expected: Graceful error (not white screen)
- Log out
- Try to access
/organization/projects - Expected: Redirect to login page
Case 10A: Non-organization user
- Log in as individual user (role='individual')
- Try to access organization pages
- Expected: Access denied or redirect
Case 10B: Access another org's project
- Log in as Organization A
- Try to access Organization B's project members page
- Expected: "Access denied" error
If you want to create automated tests, here's a structure:
// tests/TaskMetricsTest.php
class TaskMetricsTest extends TestCase {
public function testProjectMetricsCalculation() {
$taskModel = new Task();
$metrics = $taskModel->getProjectMetrics(13);
$this->assertNotNull($metrics);
$this->assertObjectHasAttribute('total_tasks', $metrics);
$this->assertObjectHasAttribute('completion_percentage', $metrics);
}
public function testOverdueDetection() {
// Create task with past due date
// Assert it appears in overdue list
}
public function testCacheInvalidation() {
// Load metrics (cache)
// Update task
// Load metrics again
// Assert data changed
}
}If you find issues, report them using this format:
**Bug Title**: Progress bar doesn't fill correctly
**Steps to Reproduce**:
1. Navigate to /organization/projects
2. Click on project "Zcode"
3. Observe progress bar
**Expected Behavior**:
Progress bar fills to 65.5%
**Actual Behavior**:
Progress bar is empty or stuck at 0%
**Screenshots**:
[Attach screenshot]
**Environment**:
- Browser: Chrome 120
- OS: Windows 11
- PHP Version: 8.2.12
- Database: Latest SQL dump
Use these benchmarks to verify optimization:
| Metric | Before | After (Target) | How to Measure |
|---|---|---|---|
| Projects page load | 150-200ms | 50-80ms | DevTools Network tab |
| Members page load | 200-300ms | 100-150ms | DevTools Network tab |
| Cache hit rate | N/A | >80% | Check metrics cache usage |
| Database queries | 10-15/page | 3-5/page | MySQL slow query log |
Before marking as "Production Ready":
- ✅ All 10 test scenarios pass
- ✅ No console errors (F12)
- ✅ No PHP errors in error logs
- ✅ Responsive design works on all devices
- ✅ Performance meets benchmarks
- ✅ UI matches existing design system
- ✅ Security checks pass
- ✅ Cache works as expected
- ✅ All metrics calculate correctly
- ✅ Real-time updates work
- Cache Duration: 5 minutes (configurable)
- Overdue Display Limit: Shows max 5 overdue tasks
- Member Breakdown: Only shows active members
- Browser Support: Modern browsers only (IE not supported)
Issue: Progress shows 0% but tasks exist
- Solution: Check task status values ('pending', 'in_progress', 'completed')
- Solution: Clear cache by updating any task
Issue: Overdue tasks don't appear
- Solution: Verify due_date column has valid dates
- Solution: Check status != 'completed'
Issue: Member breakdown missing
- Solution: Verify project_members table has entries
- Solution: Check users are assigned to tasks
Issue: Styles don't load
- Solution: Clear browser cache (Ctrl+Shift+Delete)
- Solution: Verify CSS file paths are correct
- Solution: Check file permissions on CSS files
After testing, fill out this report:
TESTING COMPLETED: [Date]
TESTER: [Your Name]
┌─────────────────────────────────────────┐
│ TEST SCENARIO │ PASS │ FAIL │ │
├─────────────────────────────────────────┤
│ 1. Projects Progress │ ✅ │ │ │
│ 2. Members Overview │ ✅ │ │ │
│ 3. Member Performance │ ✅ │ │ │
│ 4. Overdue Alerts │ ✅ │ │ │
│ 5. Real-Time Updates │ ✅ │ │ │
│ 6. Cache Performance │ ✅ │ │ │
│ 7. Responsive Design │ ✅ │ │ │
│ 8. UI Consistency │ ✅ │ │ │
│ 9. Error Handling │ ✅ │ │ │
│ 10. Security │ ✅ │ │ │
└─────────────────────────────────────────┘
OVERALL STATUS: ✅ PASS / ❌ FAIL
NOTES:
[Add any observations or issues found]
PRODUCTION READY: YES / NO
Start Testing: Just open http://localhost/SkillXchange/public/organization/projects and follow the scenarios! 🚀