Test Cases: Membership Reports
GET /api/reporting/reports/members (listMembersReport) is JSON-only — there is no ?format=csv/?format=xlsx support and no "Export CSV" button in code. TC-RPT-002-017 through TC-RPT-002-020 and TC-RPT-002-API-006 below describe an export flow that does not exist on this endpoint — treat those steps as NOT IMPLEMENTED, not a bug to file. See Test Plan and TC-RPT-004 for the accurate export-scope matrix.
Module: Reporting & Analytics - Membership Reports
Priority: P3
Phase: 5
Backend Endpoint: GET /api/reporting/reports/members
Frontend Pages: AdminMemberReportsPage, ExecutiveDashboardPage
Prerequisites
- Sufficient member data exists for meaningful reports.
- Test data from
00_MASTER_TEST_DATA.mdis seeded. - User has appropriate role permissions (ADMIN, OFFICER, MEMBERSHIP_MANAGER, EVENT_MANAGER, or FINANCE_MANAGER).
Test Data Reference
- Members: 150+ active members across different statuses
- Membership Types: Regular, Associate, Student, Founding, Corporate
- Member Statuses: ACTIVE, PENDING_APPROVAL, SUSPENDED, DEACTIVATED
- Date ranges: Multiple join dates spanning 12+ months
Test Cases
TC-RPT-002-001: Generate Members Report - Default View
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as Admin User (ADMIN). | Dashboard displayed. |
| 2 | Navigate to Reports > Members Report. | Members report page displayed. |
| 3 | Verify report loads with default parameters. | Report displays all members. |
| 4 | Verify total member count displayed. | Count matches actual total members. |
| 5 | Verify summary statistics are visible. | Total, Active, Pending, Suspended counts shown. |
TC-RPT-002-002: Filter Members by Status - Active
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Locate status filter dropdown. | Filter control available. |
| 3 | Select status filter: ACTIVE. | Filter applied. |
| 4 | Click "Apply Filter" or observe auto-refresh. | Report updates. |
| 5 | Verify all displayed members have ACTIVE status. | Only ACTIVE members shown. |
| 6 | Verify count matches expected active count. | Count is accurate. |
TC-RPT-002-003: Filter Members by Status - Pending Approval
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Select status filter: PENDING_APPROVAL. | Filter applied. |
| 3 | Verify report updates. | Only pending members displayed. |
| 4 | Verify each member shows PENDING_APPROVAL status. | Status column correct. |
| 5 | Verify count matches pending count in summary. | Numbers consistent. |
TC-RPT-002-004: Filter Members by Status - Suspended
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Select status filter: SUSPENDED. | Filter applied. |
| 3 | Verify report updates. | Only suspended members displayed. |
| 4 | Verify suspended reason visible if available. | Reason column populated. |
TC-RPT-002-005: Filter Members by Status - Deactivated
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Select status filter: DEACTIVATED. | Filter applied. |
| 3 | Verify report updates. | Only deactivated members displayed. |
| 4 | Verify deactivation date visible if available. | Date column populated. |
TC-RPT-002-006: Filter Members by Membership Type - Regular
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Locate membership type filter. | Filter control available. |
| 3 | Select type: Regular Member. | Filter applied. |
| 4 | Verify all displayed members are Regular type. | Type column shows "Regular Member". |
| 5 | Verify count is accurate. | Matches expected Regular member count. |
TC-RPT-002-007: Filter Members by Membership Type - Associate
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Select type: Associate Member. | Filter applied. |
| 3 | Verify results show only Associate members. | Type column correct. |
TC-RPT-002-008: Filter Members by Membership Type - Student
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Select type: Student Member. | Filter applied. |
| 3 | Verify results show only Student members. | Type column correct. |
| 4 | Verify student-specific fields visible. | School/University if applicable. |
TC-RPT-002-009: Filter Members by Membership Type - Corporate
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Select type: Corporate Member. | Filter applied. |
| 3 | Verify results show only Corporate members. | Type column correct. |
| 4 | Verify company information visible. | Company name displayed. |
TC-RPT-002-010: Filter Members by Date Range - This Month
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Locate date range filter. | Date picker controls available. |
| 3 | Select preset: "This Month". | Filter applied. |
| 4 | Verify members joined this month are displayed. | Join dates within current month. |
| 5 | Verify "New This Month" count matches. | Count is accurate. |
TC-RPT-002-011: Filter Members by Date Range - Last Quarter
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Select preset: "Last Quarter". | Filter applied. |
| 3 | Verify members joined in last quarter displayed. | Join dates within last 3 months. |
| 4 | Verify date range indicator shows correct dates. | Start and end dates correct. |
TC-RPT-002-012: Filter Members by Date Range - Custom Range
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Select "Custom" date range option. | Date picker fields enabled. |
| 3 | Enter start date: 2024-01-01. | Start date set. |
| 4 | Enter end date: 2024-06-30. | End date set. |
| 5 | Apply filter. | Report updates. |
| 6 | Verify all join dates fall within range. | No dates outside range. |
TC-RPT-002-013: Filter Members by Date Range - Year to Date
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Select preset: "Year to Date". | Filter applied. |
| 3 | Verify members joined this year displayed. | Join dates from Jan 1 to today. |
| 4 | Verify "New This Year" count matches. | Count is accurate. |
TC-RPT-002-014: Combined Filters - Status and Type
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Select status: ACTIVE. | Filter applied. |
| 3 | Select type: Regular Member. | Additional filter applied. |
| 4 | Verify both filters applied. | Only Active Regular members shown. |
| 5 | Verify count reflects intersection. | Count is correct. |
TC-RPT-002-015: Combined Filters - Status, Type, and Date Range
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Select status: ACTIVE. | Filter applied. |
| 3 | Select type: Student Member. | Filter applied. |
| 4 | Select date range: This Year. | Filter applied. |
| 5 | Verify all three filters applied. | Only matching members shown. |
| 6 | Verify accurate intersection count. | Count reflects all filters. |
TC-RPT-002-016: Clear All Filters
| Step | Action | Expected Result |
|---|---|---|
| 1 | Apply multiple filters to Members Report. | Filters active. |
| 2 | Click "Clear Filters" or "Reset" button. | All filters removed. |
| 3 | Verify report shows all members again. | Full list restored. |
| 4 | Verify filter controls reset to default. | No selections active. |
TC-RPT-002-017: Export Members Report to CSV - All Members
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Ensure no filters applied. | All members in report. |
| 3 | Locate "Export CSV" button. | Button visible. |
| 4 | Click "Export CSV". | Download initiated. |
| 5 | Verify file downloads. | CSV file in downloads folder. |
| 6 | Open CSV file. | File opens in spreadsheet application. |
| 7 | Verify column headers. | Name, Email, Status, Type, Join Date, Phone, etc. |
| 8 | Verify row count matches report count. | Same number of records. |
| 9 | Spot check data accuracy. | Data matches displayed report. |
TC-RPT-002-018: Export Members Report to CSV - Filtered Results
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Apply filter: Status = ACTIVE. | Filter applied. |
| 3 | Click "Export CSV". | Download initiated. |
| 4 | Open CSV file. | File opens correctly. |
| 5 | Verify only filtered data exported. | Only ACTIVE members in CSV. |
| 6 | Verify row count matches filtered count. | Numbers match. |
TC-RPT-002-019: Export CSV - Filename Convention
| Step | Action | Expected Result |
|---|---|---|
| 1 | Export Members Report to CSV. | Download initiated. |
| 2 | Check downloaded filename. | Follows convention: members_report_YYYY-MM-DD.csv |
| 3 | Export again with different filters. | New download. |
| 4 | Verify unique filename or overwrite prompt. | Files distinguishable. |
TC-RPT-002-020: Export CSV - Large Data Set
| Step | Action | Expected Result |
|---|---|---|
| 1 | Ensure report has 500+ members (if applicable). | Large data set. |
| 2 | Export to CSV. | Download initiated. |
| 3 | Verify export completes without timeout. | Download successful. |
| 4 | Verify all records included in CSV. | Row count matches. |
| 5 | Verify no data truncation. | All fields complete. |
TC-RPT-002-021: Role-Based Access - ADMIN Full Access
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as Admin User (ADMIN). | Login successful. |
| 2 | Navigate to Members Report. | Access granted. |
| 3 | Verify all filters available. | Status, Type, Date Range. |
| 4 | Verify export functionality available. | Export CSV button visible. |
| 5 | Verify all member data visible. | Full details shown. |
TC-RPT-002-022: Role-Based Access - OFFICER Access
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as OFFICER role user. | Login successful. |
| 2 | Navigate to Members Report. | Access granted. |
| 3 | Verify report displays correctly. | Data visible. |
| 4 | Verify filter functionality. | Filters work. |
| 5 | Verify export available. | Export CSV works. |
TC-RPT-002-023: Role-Based Access - MEMBERSHIP_MANAGER Access
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as MEMBERSHIP_MANAGER role user. | Login successful. |
| 2 | Navigate to Members Report. | Access granted. |
| 3 | Verify full report functionality. | All features available. |
| 4 | Verify member contact details visible. | Email, phone shown. |
TC-RPT-002-024: Role-Based Access - EVENT_MANAGER Access
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as EVENT_MANAGER role user. | Login successful. |
| 2 | Navigate to Members Report. | Access granted. |
| 3 | Verify report displays. | Data visible. |
| 4 | Note any restricted fields. | Document limitations if any. |
TC-RPT-002-025: Role-Based Access - FINANCE_MANAGER Access
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as FINANCE_MANAGER role user. | Login successful. |
| 2 | Navigate to Members Report. | Access granted. |
| 3 | Verify report displays. | Data visible. |
| 4 | Note any restricted fields. | Document limitations if any. |
TC-RPT-002-026: Role-Based Access - MEMBER Denied
| Step | Action | Expected Result |
|---|---|---|
| 1 | Login as regular MEMBER. | Login successful. |
| 2 | Attempt to navigate to Members Report. | Access denied. |
| 3 | Verify 403 Forbidden or redirect. | Not authorized message. |
| 4 | Verify navigation menu hides report option. | Menu item not visible. |
TC-RPT-002-027: Report with No Data
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Apply filters with no matching results. | e.g., Status = SUSPENDED, Date = future date. |
| 3 | Verify empty state displayed. | "No members found" message. |
| 4 | Verify export button disabled or shows warning. | Cannot export empty data. |
| 5 | Verify clear filters option available. | Can reset filters. |
TC-RPT-002-028: Pagination - Large Result Set
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report with many members. | Report displayed. |
| 2 | Verify pagination controls. | Page numbers, next/prev buttons. |
| 3 | Navigate to page 2. | Next page loads. |
| 4 | Verify different members displayed. | Not duplicates from page 1. |
| 5 | Navigate to last page. | Last page loads. |
| 6 | Verify total count accurate. | Count unchanged. |
TC-RPT-002-029: Sort by Column - Name
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Click "Name" column header. | Sort applied. |
| 3 | Verify A-Z sorting. | Names alphabetical ascending. |
| 4 | Click "Name" column again. | Sort reversed. |
| 5 | Verify Z-A sorting. | Names alphabetical descending. |
TC-RPT-002-030: Sort by Column - Join Date
| Step | Action | Expected Result |
|---|---|---|
| 1 | Access Members Report page. | Report displayed. |
| 2 | Click "Join Date" column header. | Sort applied. |
| 3 | Verify oldest first or newest first. | Dates in order. |
| 4 | Click column again to reverse. | Sort order changes. |
API Test Cases
TC-RPT-002-API-001: GET /api/reporting/reports/members - No Filters
Request: GET /api/reporting/reports/members
Auth: ADMIN token
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-002-API-002: GET /api/reporting/reports/members - Filter by Status
Request: GET /api/reporting/reports/members?status=ACTIVE
Auth: ADMIN token
Expected Response: 200 OK
{
"totalMembers": 150,
"byStatus": {
"ACTIVE": 150
},
"byType": {
"Regular Member": 95,
"Associate Member": 25,
"Student Member": 15,
"Founding Member": 10,
"Corporate Member": 5
},
"members": [...]
}
TC-RPT-002-API-003: GET /api/reporting/reports/members - Filter by Type
Request: GET /api/reporting/reports/members?type=Student%20Member
Auth: OFFICER token
Expected Response: 200 OK
{
"totalMembers": 25,
"byStatus": {
"ACTIVE": 20,
"PENDING_APPROVAL": 5
},
"byType": {
"Student Member": 25
},
"members": [...]
}
TC-RPT-002-API-004: GET /api/reporting/reports/members - Filter by Date Range
Request: GET /api/reporting/reports/members?startDate=2024-01-01&endDate=2024-12-31
Auth: MEMBERSHIP_MANAGER token
Expected Response: 200 OK
{
"totalMembers": 45,
"dateRange": {
"start": "2024-01-01",
"end": "2024-12-31"
},
"byStatus": {...},
"byType": {...},
"newThisMonth": 8,
"newThisYear": 45,
"members": [...]
}
TC-RPT-002-API-005: GET /api/reporting/reports/members - Combined Filters
Request: GET /api/reporting/reports/members?status=ACTIVE&type=Regular%20Member&startDate=2024-01-01&endDate=2024-06-30
Auth: ADMIN token
Expected Response: 200 OK
{
"totalMembers": 20,
"filters": {
"status": "ACTIVE",
"type": "Regular Member",
"startDate": "2024-01-01",
"endDate": "2024-06-30"
},
"members": [...]
}
TC-RPT-002-API-006: GET /api/reporting/reports/members - Export CSV
Request: GET /api/reporting/reports/members?format=csv
Auth: ADMIN token
Expected Response: 200 OK
Headers: Content-Type: text/csv, Content-Disposition: attachment; filename=members_report_2024-XX-XX.csv
Name,Email,Status,Membership Type,Join Date,Phone
"Maria Cruz","testmember@rcme.membervu.com","ACTIVE","Regular Member","2023-05-15","+63 917 123 4567"
...
TC-RPT-002-API-007: GET /api/reporting/reports/members - Unauthorized (MEMBER role)
Request: GET /api/reporting/reports/members
Auth: MEMBER token
Expected Response: 403 Forbidden
{
"error": "Forbidden",
"message": "Insufficient permissions to access this resource"
}
TC-RPT-002-API-008: GET /api/reporting/reports/members - No Auth
Request: GET /api/reporting/reports/members
Auth: None
Expected Response: 401 Unauthorized
{
"error": "Unauthorized",
"message": "Authentication required"
}
TC-RPT-002-API-009: GET /api/reporting/reports/members - Invalid Status Filter
Request: GET /api/reporting/reports/members?status=INVALID_STATUS
Auth: ADMIN token
Expected Response: 400 Bad Request
{
"error": "Bad Request",
"message": "Invalid status value. Valid values: ACTIVE, PENDING_APPROVAL, SUSPENDED, DEACTIVATED"
}
TC-RPT-002-API-010: GET /api/reporting/reports/members - Invalid Date Range
Request: GET /api/reporting/reports/members?startDate=2024-12-31&endDate=2024-01-01
Auth: ADMIN token
Expected Response: 400 Bad Request
{
"error": "Bad Request",
"message": "Start date must be before end date"
}
Summary Statistics
| Category | Count |
|---|---|
| UI Test Cases | 30 |
| API Test Cases | 10 |
| Total Test Cases | 40 |
Traceability
| Test Case ID | Requirement | API Endpoint |
|---|---|---|
| TC-RPT-002-001 to 016 | Report Generation & Filtering | GET /api/reporting/reports/members |
| TC-RPT-002-017 to 020 | CSV Export | GET /api/reporting/reports/members?format=csv |
| TC-RPT-002-021 to 026 | Role-Based Access | GET /api/reporting/reports/members |
| TC-RPT-002-027 to 030 | Edge Cases & UX | GET /api/reporting/reports/members |