Test Cases: Reporting & Analytics
.xlsx (#228) is the invoices/payments/treasury exports (?format=xlsx on GET /api/billing/admin/invoices/export, GET /api/billing/admin/payments/export, GET /api/treasury/export) — not a standalone "Finance Dashboard export." The GET /api/billing/admin/finance/summary endpoint itself is JSON-only (dashboard data), no export. See TC-RPT-004 for the accurate export matrix.
Module: Reporting & Analytics
Backend Endpoints:
GET /api/reporting/reports/membersGET /api/reporting/reports/events/attendanceGET /api/billing/admin/finance/summaryGET /api/billing/admin/donations/report
Frontend Pages: ExecutiveDashboardPage, AdminFinanceDashboardPage, AdminEventAttendanceReportPage
Prerequisites
- Sufficient data exists for meaningful reports.
- Test data from
00_MASTER_TEST_DATA.mdis seeded.
Test Data Reference
- Members: 150+ active members
- Events: Multiple past and upcoming events
- Invoices: Various statuses and amounts
- Payments: Mix of approved and pending
Test Cases
TC-RPT-001: View Executive Dashboard
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as Admin User (ADMIN). | Dashboard displayed. |
| 2 | Navigate to Executive Dashboard. | Dashboard displayed. |
| 3 | Verify summary cards. | Total Members, Active Events, Revenue This Month. |
| 4 | Verify charts/graphs. | Membership trend, Revenue trend visible. |
| 5 | Verify data freshness. | Recent data reflected. |
TC-RPT-002: Member Statistics Report
| Step | Action | Expected Result |
|---|---|---|
| 1 | Navigate to Reports > Members. | Member report displayed. |
| 2 | Verify total member count. | Matches actual member count. |
| 3 | Verify breakdown by status. | Active, Pending, Suspended counts. |
| 4 | Verify breakdown by type. | Regular, Associate, Student, etc. |
| 5 | Verify new members this month. | Count of recent joins. |
TC-RPT-003: Member Growth Trend
| Step | Action | Expected Result |
|---|---|---|
| 1 | View membership growth chart. | Chart displayed. |
| 2 | Select date range: Last 12 months. | Chart updates. |
| 3 | Verify monthly data points. | Each month shows member count. |
| 4 | Verify trend line. | Growth trend visible. |
TC-RPT-004: Finance Dashboard
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as FINANCE_MANAGER. | Dashboard displayed. |
| 2 | Navigate to Finance Dashboard. | Finance metrics displayed. |
| 3 | Verify revenue summary. | Total collected this month/year. |
| 4 | Verify outstanding amount. | Total unpaid invoices. |
| 5 | Verify overdue amount. | Total overdue invoices. |
| 6 | Verify revenue by source. | Dues, Events, Donations breakdown. |
TC-RPT-005: Invoice Status Distribution
| Step | Action | Expected Result |
|---|---|---|
| 1 | View invoice status chart. | Pie/bar chart displayed. |
| 2 | Verify segments. | Paid, Pending, Overdue, Voided. |
| 3 | Verify percentages. | Correct proportions. |
| 4 | Click on segment. | Drills down to filtered list. |
TC-RPT-006: Revenue by Month Report
| Step | Action | Expected Result |
|---|---|---|
| 1 | View monthly revenue report. | Report displayed. |
| 2 | Select year: 2024. | Data for 2024 shown. |
| 3 | Verify monthly breakdown. | Jan through Dec revenue. |
| 4 | Verify totals. | Year total matches sum. |
TC-RPT-007: Event Attendance Report
| Step | Action | Expected Result |
|---|---|---|
| 1 | Navigate to Event Reports. | Report displayed. |
| 2 | Select event: Q4 General Assembly. | Event data shown. |
| 3 | Verify attendance count. | Registered vs. Attended. |
| 4 | Verify no-show rate. | Calculated correctly. |
| 5 | View attendee list. | Names and check-in times. |
TC-RPT-008: Event Comparison Report
| Step | Action | Expected Result |
|---|---|---|
| 1 | Select multiple events for comparison. | Events selected. |
| 2 | View comparison chart. | Side-by-side metrics. |
| 3 | Compare registration counts. | Each event's count shown. |
| 4 | Compare attendance rates. | Percentages displayed. |
TC-RPT-009: Donations Report
| Step | Action | Expected Result |
|---|---|---|
| 1 | Navigate to Donations Report. | Report displayed. |
| 2 | Verify total donations. | Sum of all donations. |
| 3 | Verify date range filter. | Filter works correctly. |
| 4 | View donor list. | Donors with amounts. |
TC-RPT-010: Export Members to CSV
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Member Report. | Report displayed. |
| 2 | Click "Export CSV". | Download initiated. |
| 3 | Open downloaded file. | CSV opens correctly. |
| 4 | Verify columns. | Name, Email, Status, Type, Join Date. |
| 5 | Verify data accuracy. | Matches displayed report. |
TC-RPT-011: Export Finance Report
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Finance Dashboard. | Dashboard displayed. |
| 2 | Click "Export". | Options displayed. |
| 3 | Select CSV format. | Download initiated. |
| 4 | Verify content. | Financial data accurate. |
TC-RPT-012: Date Range Filtering
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access any report. | Report displayed. |
| 2 | Set date range: This Month. | Data filtered. |
| 3 | Set date range: Last Quarter. | Data filtered. |
| 4 | Set custom date range. | Data filtered accordingly. |
| 5 | Verify data matches range. | Only in-range data shown. |
TC-RPT-013: Real-Time Data Refresh
| Step | Action | Expected Result |
|---|---|---|
| 1 | View dashboard. | Current data shown. |
| 2 | In another tab, create new payment. | Payment recorded. |
| 3 | Refresh dashboard. | New payment reflected. |
| 4 | Verify totals updated. | Revenue increased. |
TC-RPT-014: Report with No Data
| Step | Action | Expected Result |
|---|---|---|
| 1 | Filter report to date range with no data. | Filter applied. |
| 2 | Verify empty state. | "No data for selected period" message. |
| 3 | Verify charts handle empty. | Charts show empty state gracefully. |
TC-RPT-015: Large Data Set Performance
| Step | Action | Expected Result |
|---|---|---|
| 1 | Request report spanning full history. | All data. |
| 2 | Measure load time. | Loads within acceptable time (< 5 seconds). |
| 3 | Verify pagination if needed. | Large lists paginated. |
| 4 | Export large data set. | Export completes without timeout. |
TC-RPT-016: Permission - Finance Manager Access
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as FINANCE_MANAGER. | Dashboard displayed. |
| 2 | Access Finance reports. | Access granted. |
| 3 | Attempt Member admin reports. | May have limited access. |
| 4 | Attempt to access Roles report. | Access denied. |
TC-RPT-017: Permission - Member No Report Access
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as MEMBER. | Member dashboard. |
| 2 | Attempt to access admin reports. | Access denied. |
| 3 | Verify no report navigation. | Report menus not visible. |
TC-RPT-018: Dues Collection Summary
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Dues report. | Report displayed. |
| 2 | Verify collection rate. | (Paid / Total) * 100. |
| 3 | Verify outstanding by type. | Regular vs Student outstanding. |
| 4 | Verify year-over-year comparison. | 2023 vs 2024 collection. |
TC-RPT-019: Payment Method Distribution
| Step | Action | Expected Result |
|---|---|---|
| 1 | View payment method report. | Chart displayed. |
| 2 | Verify breakdown. | Bank Transfer, GCash, Cash, Online. |
| 3 | Verify percentages. | Correct proportions. |
TC-RPT-020: Scheduled Report Generation
| Step | Action | Expected Result |
|---|---|---|
| 1 | Configure scheduled report (if available). | Schedule set. |
| 2 | Set frequency: Weekly. | Config saved. |
| 3 | Set recipients: Admin email. | Email added. |
| 4 | Wait for schedule. | Report emailed on schedule. |
API Test Cases
TC-RPT-API-001: GET /api/billing/admin/finance/summary
Expected Response: 200 OK
{
"totalRevenue": {
"thisMonth": 150000,
"thisYear": 1250000,
"allTime": 5000000
},
"outstanding": {
"total": 125000,
"overdue": 35000
},
"bySource": {
"dues": 800000,
"events": 350000,
"donations": 100000
},
"invoiceStatus": {
"paid": 450,
"pending": 25,
"overdue": 12
}
}
TC-RPT-API-002: GET /api/reporting/reports/members
Expected Response: 200 OK
{
"totalMembers": 175,
"byStatus": {
"ACTIVE": 150,
"PENDING_APPROVAL": 10,
"SUSPENDED": 5,
"DEACTIVATED": 10
},
"byType": {
"Regular Member": 100,
"Associate Member": 30,
"Student Member": 25,
"Founding Member": 15,
"Corporate Member": 5
},
"newThisMonth": 8,
"newThisYear": 45
}
TC-RPT-API-003: GET /api/reporting/reports/events/attendance?eventId=EVT-2024-002
Expected Response: 200 OK
{
"event": {
"id": "EVT-2024-002",
"name": "Annual Engineers Summit 2024"
},
"registrations": 85,
"checkedIn": 75,
"noShow": 10,
"attendanceRate": 88.2,
"attendees": [
{ "memberId": "MEM-...", "name": "Maria Cruz", "checkedInAt": "timestamp" }
]
}
TC-RPT-API-004: GET /api/billing/admin/donations/report
Request: GET /api/billing/admin/donations/report?startDate=2024-01-01&endDate=2024-12-31
Expected Response: 200 OK
{
"totalDonations": 100000,
"donationCount": 50,
"averageDonation": 2000,
"topDonors": [
{ "name": "Anonymous", "total": 25000 }
],
"byMonth": [
{ "month": "January", "amount": 15000 }
]
}