# 1. User Metrics — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: user_metrics.md — every feature, sub-feature, and rule covered

---

## Test Execution Policy
- Zero tolerance: any deviation from documented behavior = FAILED = bug
- Every bug is immediately logged/reported (Bug ID, feature, sub-feature,
  expected vs actual, severity) and fixed 100% before the group passes
- Feature group passes only at 100% test pass rate

## Coverage Matrix
| Feature | Sub-feature / Rule | Test IDs |
|---------|--------------------|----------|
| 1.1 Total Users by Type (Students, Parents, Affiliates, Institutes) | User type: the type (the type of the user, e.g., the student, the parent, the affiliate, the institute) | TC-SA-18-01-001 |
| 1.1 Total Users by Type (Students, Parents, Affiliates, Institutes) | User count: the count (the count of the users by type) | TC-SA-18-01-002 |
| 1.1 Total Users by Type (Students, Parents, Affiliates, Institutes) | Total users: the total (the total of the users, all types) | TC-SA-18-01-003 |
| 1.1 Total Users by Type (Students, Parents, Affiliates, Institutes) | Type breakdown: the breakdown (the breakdown of the users, the types, the counts) | TC-SA-18-01-004 |
| 1.1 Total Users by Type (Students, Parents, Affiliates, Institutes) | Type period: the period (the period of the users, e.g., the current, the monthly) | TC-SA-18-01-005 |
| 1.1 Total Users by Type (Students, Parents, Affiliates, Institutes) | Type view: the view (the types, the counts, the period) | TC-SA-18-01-006 |
| 1.1 Total Users by Type (Students, Parents, Affiliates, Institutes) | Type export: the export (the types, the format, the period) | TC-SA-18-01-007 |
| 1.1 Total Users by Type (Students, Parents, Affiliates, Institutes) | Audit logging of the user type viewing | TC-SA-18-01-008 |
| 1.1 Total Users by Type (Students, Parents, Affiliates, Institutes) | Rule: the user type is the segment (the type of the user, e.g., the student, the parent, the affiliate, the institute); the type is the category | TC-SA-18-01-001 |
| 1.1 Total Users by Type (Students, Parents, Affiliates, Institutes) | Rule: the user count is the measure (the count of the users by type); the count is the volume | TC-SA-18-01-002 |
| 1.1 Total Users by Type (Students, Parents, Affiliates, Institutes) | Rule: the total users is the sum (the total of the users, all types); the total is the aggregate | TC-SA-18-01-003 |
| 1.1 Total Users by Type (Students, Parents, Affiliates, Institutes) | Rule: the type breakdown is the detail (the breakdown of the users, the types, the counts); the breakdown is the segment | TC-SA-18-01-004 |
| 1.1 Total Users by Type (Students, Parents, Affiliates, Institutes) | Rule: the users are visible (the types, the counts, the period); the viewing is managed | TC-SA-18-01-006 |
| 1.1 Total Users by Type (Students, Parents, Affiliates, Institutes) | Rule: user type viewing is audit-logged with the type, count, and timestamp | TC-SA-18-01-008 |
| 1.2 New User Signups | Signup: the signup (the signup, the user, the type, the date) | TC-SA-18-01-009 |
| 1.2 New User Signups | Signup count: the count (the count of the signups) | TC-SA-18-01-010 |
| 1.2 New User Signups | Signup type: the type (the type of the signup, e.g., the student, the parent) | TC-SA-18-01-011 |
| 1.2 New User Signups | Signup period: the period (the period of the signups, e.g., the daily, the weekly, the monthly) | TC-SA-18-01-012 |
| 1.2 New User Signups | Signup trend: the trend (the trend of the signups, the period, the change) | TC-SA-18-01-013 |
| 1.2 New User Signups | Signup view: the view (the signups, the types, the counts, the period) | TC-SA-18-01-014 |
| 1.2 New User Signups | Signup export: the export (the signups, the format, the period) | TC-SA-18-01-015 |
| 1.2 New User Signups | Audit logging of the signup viewing | TC-SA-18-01-016 |
| 1.2 New User Signups | Rule: the signup is the entry (the signup, the user, the type, the date); the signup is the start | TC-SA-18-01-009 |
| 1.2 New User Signups | Rule: the signup count is the measure (the count of the signups); the count is the volume | TC-SA-18-01-010 |
| 1.2 New User Signups | Rule: the signup type is the segment (the type of the signup, e.g., the student, the parent); the type is the category | TC-SA-18-01-011 |
| 1.2 New User Signups | Rule: the signup trend is the direction (the trend of the signups, the period, the change); the trend is the insight | TC-SA-18-01-013 |
| 1.2 New User Signups | Rule: the signups are visible (the signups, the types, the counts, the period); the viewing is managed | TC-SA-18-01-014 |
| 1.2 New User Signups | Rule: signup viewing is audit-logged with the signup, period, and timestamp | TC-SA-18-01-016 |
| 1.3 Active vs. Inactive Users | Active user: the user (the active user, the count, the period) | TC-SA-18-01-017 |
| 1.3 Active vs. Inactive Users | Inactive user: the user (the inactive user, the count, the period) | TC-SA-18-01-018 |
| 1.3 Active vs. Inactive Users | Activity split: the split (the split of the users, the active, the inactive) | TC-SA-18-01-019 |
| 1.3 Active vs. Inactive Users | Activity count: the count (the count of the active and inactive users) | TC-SA-18-01-020 |
| 1.3 Active vs. Inactive Users | Activity period: the period (the period of the activity, e.g., the daily, the weekly, the monthly) | TC-SA-18-01-021 |
| 1.3 Active vs. Inactive Users | Activity view: the view (the active, the inactive, the counts, the period) | TC-SA-18-01-022 |
| 1.3 Active vs. Inactive Users | Activity export: the export (the activity, the format, the period) | TC-SA-18-01-023 |
| 1.3 Active vs. Inactive Users | Audit logging of the activity viewing | TC-SA-18-01-024 |
| 1.3 Active vs. Inactive Users | Rule: the active user is the engaged (the active user, the count, the period); the user is the state | TC-SA-18-01-017 |
| 1.3 Active vs. Inactive Users | Rule: the inactive user is the disengaged (the inactive user, the count, the period); the user is the state | TC-SA-18-01-018 |
| 1.3 Active vs. Inactive Users | Rule: the activity split is the ratio (the split of the users, the active, the inactive); the split is the measure | TC-SA-18-01-019 |
| 1.3 Active vs. Inactive Users | Rule: the activity count is the volume (the count of the active and inactive users); the count is the measure | TC-SA-18-01-020 |
| 1.3 Active vs. Inactive Users | Rule: the users are visible (the active, the inactive, the counts, the period); the viewing is managed | TC-SA-18-01-022 |
| 1.3 Active vs. Inactive Users | Rule: activity viewing is audit-logged with the activity, period, and timestamp | TC-SA-18-01-024 |

## 1.1 Total Users by Type (Students, Parents, Affiliates, Institutes)

### TC-SA-18-01-001 — User type: the type (the type of the user, e.g., the student, the parent, the affiliate, the institute); the type is the category
**Type:** Positive
**Covers:** 1.1 → User type: the type (the type of the user, e.g., the student, the parent, the affiliate, the institute); Rule: the user type is the segment (the type of the user, e.g., the student, the parent, the affiliate, the institute); the type is the category
**Preconditions:** Super Admin is logged in; users of all four types exist.
**Steps:**
1. Open the Super Admin Dashboard.
2. View the total users by type: the types (the type of the user, e.g., the student, the parent, the affiliate, the institute) — verify the type is the segment.
3. Verify all four types (student, parent, affiliate, institute) are shown.
**Expected Result:** The user types are shown — the type of the user (the student, the parent, the affiliate, the institute) is the category.
**Priority:** Critical

### TC-SA-18-01-002 — User count: the count (the count of the users by type); the count is the volume
**Type:** Positive
**Covers:** 1.1 → User count: the count (the count of the users by type); Rule: the user count is the measure (the count of the users by type); the count is the volume
**Preconditions:** Users of all four types exist.
**Steps:**
1. View the user count: the count (the count of the users by type) — verify the count is the measure.
2. Verify each type's count matches the actual number of users of that type.
3. Create a new student user — verify the student count increments by 1.
**Expected Result:** The user count is shown — the count of the users by type is the volume; counts update in real time.
**Priority:** Critical

### TC-SA-18-01-003 — Total users: the total (the total of the users, all types); the total is the aggregate
**Type:** Edge
**Covers:** 1.1 → Total users: the total (the total of the users, all types); Rule: the total users is the sum (the total of the users, all types); the total is the aggregate
**Preconditions:** Users of all four types exist; a type with zero users also exists.
**Steps:**
1. View the total users: the total (the total of the users, all types) — verify the total is the sum.
2. Verify the total equals the sum of all type counts.
3. Verify a type with zero users shows 0 (no error) and the total is still correct.
**Expected Result:** The total users is shown — the total of the users, all types, is the aggregate; a zero-count type is handled.
**Priority:** High

### TC-SA-18-01-004 — Type breakdown: the breakdown (the breakdown of the users, the types, the counts); the breakdown is the segment
**Type:** Positive
**Covers:** 1.1 → Type breakdown: the breakdown (the breakdown of the users, the types, the counts); Rule: the type breakdown is the detail (the breakdown of the users, the types, the counts); the breakdown is the segment
**Preconditions:** Users of all four types exist.
**Steps:**
1. View the type breakdown: the breakdown (the breakdown of the users, the types, the counts) — verify the breakdown is the detail.
2. Verify the breakdown shows each type with its count.
3. Verify the breakdown percentages (if shown) sum to 100%.
**Expected Result:** The type breakdown is shown — the breakdown of the users, the types, and the counts is the segment.
**Priority:** High

### TC-SA-18-01-005 — Type period: the period (the period of the users, e.g., the current, the monthly); the period is the scope
**Type:** Positive
**Covers:** 1.1 → Type period: the period (the period of the users, e.g., the current, the monthly)
**Preconditions:** Users exist across current and monthly periods.
**Steps:**
1. Set the type period: the period (the period of the users, e.g., the current, the monthly) — verify the period is the scope.
2. View the users for the current period and the monthly period — verify each covers the correct period.
**Expected Result:** The type period is set — the period of the users (the current, the monthly) is the scope.
**Priority:** High

### TC-SA-18-01-006 — Type view: the view (the types, the counts, the period); the viewing is managed
**Type:** Positive
**Covers:** 1.1 → Type view: the view (the types, the counts, the period); Rule: the users are visible (the types, the counts, the period); the viewing is managed
**Preconditions:** Users of all four types exist.
**Steps:**
1. View the types: the view (the types, the counts, the period) — verify the users are visible.
2. Verify the view is complete for the period.
**Expected Result:** The type view works — the types, the counts, and the period are visible.
**Priority:** High

### TC-SA-18-01-007 — Type export: the export (the types, the format, the period); the export is the record
**Type:** Positive
**Covers:** 1.1 → Type export: the export (the types, the format, the period)
**Preconditions:** User type data exists for a period.
**Steps:**
1. Export the types: the export (the types, the format, the period).
2. Verify the export is generated in the selected format.
3. Verify the exported data matches the type view.
**Expected Result:** The types are exported — the types in the selected format for the period are generated.
**Priority:** Medium

### TC-SA-18-01-008 — User type viewing is audit-logged with the type, count, and timestamp
**Type:** Positive
**Covers:** 1.1 → Audit logging of the user type viewing; Rule: user type viewing is audit-logged with the type, count, and timestamp
**Preconditions:** Super Admin has viewed the total users by type.
**Steps:**
1. Open the audit trail and filter by "user type".
2. Verify entries show the type, the count, and the timestamp.
**Expected Result:** The user type viewing is audit-logged with the type, count, and timestamp.
**Priority:** Critical

## 1.2 New User Signups

### TC-SA-18-01-009 — Signup: the signup (the signup, the user, the type, the date); the signup is the start
**Type:** Positive
**Covers:** 1.2 → Signup: the signup (the signup, the user, the type, the date); Rule: the signup is the entry (the signup, the user, the type, the date); the signup is the start
**Preconditions:** New user signups exist.
**Steps:**
1. View the new user signups: the signups (the signup, the user, the type, the date) — verify the signup is the entry.
2. Verify each signup shows the user, the type, and the date.
3. Create a new signup — verify it appears in the signups view.
**Expected Result:** The signups are shown — the signup, the user, the type, and the date are the start.
**Priority:** Critical

### TC-SA-18-01-010 — Signup count: the count (the count of the signups); the count is the volume
**Type:** Positive
**Covers:** 1.2 → Signup count: the count (the count of the signups); Rule: the signup count is the measure (the count of the signups); the count is the volume
**Preconditions:** New user signups exist.
**Steps:**
1. View the signup count: the count (the count of the signups) — verify the count is the measure.
2. Verify the count matches the actual number of signups in the period.
**Expected Result:** The signup count is shown — the count of the signups is the volume.
**Priority:** High

### TC-SA-18-01-011 — Signup type: the type (the type of the signup, e.g., the student, the parent); the type is the category
**Type:** Positive
**Covers:** 1.2 → Signup type: the type (the type of the signup, e.g., the student, the parent); Rule: the signup type is the segment (the type of the signup, e.g., the student, the parent); the type is the category
**Preconditions:** Signups of multiple types exist.
**Steps:**
1. View the signup type: the type (the type of the signup, e.g., the student, the parent) — verify the type is the segment.
2. Verify signups are segmented by type.
3. Verify each type's signup count is accurate.
**Expected Result:** The signup type is shown — the type of the signup (the student, the parent) is the category.
**Priority:** High

### TC-SA-18-01-012 — Signup period: the period (the period of the signups, e.g., the daily, the weekly, the monthly); the period is the scope
**Type:** Positive
**Covers:** 1.2 → Signup period: the period (the period of the signups, e.g., the daily, the weekly, the monthly)
**Preconditions:** Signups exist across daily, weekly, and monthly periods.
**Steps:**
1. Set the signup period: the period (the period of the signups, e.g., the daily, the weekly, the monthly) — verify the period is the scope.
2. Switch between daily, weekly, and monthly — verify the signups update for each period.
3. Verify each period covers the correct date range.
**Expected Result:** The signup period is set — the period of the signups (the daily, the weekly, the monthly) is the scope.
**Priority:** High

### TC-SA-18-01-013 — Signup trend: the trend (the trend of the signups, the period, the change); the trend is the insight
**Type:** Edge
**Covers:** 1.2 → Signup trend: the trend (the trend of the signups, the period, the change); Rule: the signup trend is the direction (the trend of the signups, the period, the change); the trend is the insight
**Preconditions:** Signups exist with an increase in one period and a decrease in another; a period with zero signups also exists.
**Steps:**
1. View the signup trend: the trend (the trend of the signups, the period, the change) — verify the trend is the direction.
2. Verify the increase is shown for the growing period and the decrease for the declining period.
3. View a period with zero signups — verify the trend shows 0 (no error).
**Expected Result:** The signup trend is shown — the trend of the signups, the period, and the change are the insight; a zero-signup period is handled.
**Priority:** High

### TC-SA-18-01-014 — Signup view: the view (the signups, the types, the counts, the period); the viewing is managed
**Type:** Positive
**Covers:** 1.2 → Signup view: the view (the signups, the types, the counts, the period); Rule: the signups are visible (the signups, the types, the counts, the period); the viewing is managed
**Preconditions:** Signups exist across a period.
**Steps:**
1. View the signups: the view (the signups, the types, the counts, the period) — verify the signups are visible.
2. Verify the view is complete for the period.
**Expected Result:** The signup view works — the signups, the types, the counts, and the period are visible.
**Priority:** High

### TC-SA-18-01-015 — Signup export: the export (the signups, the format, the period); the export is the record
**Type:** Positive
**Covers:** 1.2 → Signup export: the export (the signups, the format, the period)
**Preconditions:** Signups exist for a period.
**Steps:**
1. Export the signups: the export (the signups, the format, the period).
2. Verify the export is generated in the selected format.
3. Verify the exported data matches the signup view.
**Expected Result:** The signups are exported — the signups in the selected format for the period are generated.
**Priority:** Medium

### TC-SA-18-01-016 — Signup viewing is audit-logged with the signup, period, and timestamp
**Type:** Positive
**Covers:** 1.2 → Audit logging of the signup viewing; Rule: signup viewing is audit-logged with the signup, period, and timestamp
**Preconditions:** Super Admin has viewed the new user signups.
**Steps:**
1. Open the audit trail and filter by "signup".
2. Verify entries show the signup, the period, and the timestamp.
**Expected Result:** The signup viewing is audit-logged with the signup, period, and timestamp.
**Priority:** Critical

## 1.3 Active vs. Inactive Users

### TC-SA-18-01-017 — Active user: the user (the active user, the count, the period); the user is the state
**Type:** Positive
**Covers:** 1.3 → Active user: the user (the active user, the count, the period); Rule: the active user is the engaged (the active user, the count, the period); the user is the state
**Preconditions:** Active users exist.
**Steps:**
1. View the active users: the user (the active user, the count, the period) — verify the user is the engaged.
2. Verify the active count matches the actual number of active users.
3. Verify a user who logged in within the period is counted as active.
**Expected Result:** The active users are shown — the active user, the count, and the period are the state.
**Priority:** Critical

### TC-SA-18-01-018 — Inactive user: the user (the inactive user, the count, the period); the user is the state
**Type:** Positive
**Covers:** 1.3 → Inactive user: the user (the inactive user, the count, the period); Rule: the inactive user is the disengaged (the inactive user, the count, the period); the user is the state
**Preconditions:** Inactive users exist.
**Steps:**
1. View the inactive users: the user (the inactive user, the count, the period) — verify the user is the disengaged.
2. Verify the inactive count matches the actual number of inactive users.
3. Verify a user who did not log in within the period is counted as inactive.
**Expected Result:** The inactive users are shown — the inactive user, the count, and the period are the state.
**Priority:** Critical

### TC-SA-18-01-019 — Activity split: the split (the split of the users, the active, the inactive); the split is the measure
**Type:** Edge
**Covers:** 1.3 → Activity split: the split (the split of the users, the active, the inactive); Rule: the activity split is the ratio (the split of the users, the active, the inactive); the split is the measure
**Preconditions:** Both active and inactive users exist; a scenario with zero inactive users also exists.
**Steps:**
1. View the activity split: the split (the split of the users, the active, the inactive) — verify the split is the ratio.
2. Verify the split percentages are calculated correctly (active / total, inactive / total).
3. View a scenario with zero inactive users — verify the split shows 100% active (no division-by-zero error).
**Expected Result:** The activity split is shown — the split of the users, the active, and the inactive is the measure; a zero-inactive scenario is handled.
**Priority:** High

### TC-SA-18-01-020 — Activity count: the count (the count of the active and inactive users); the count is the measure
**Type:** Positive
**Covers:** 1.3 → Activity count: the count (the count of the active and inactive users); Rule: the activity count is the volume (the count of the active and inactive users); the count is the measure
**Preconditions:** Both active and inactive users exist.
**Steps:**
1. View the activity count: the count (the count of the active and inactive users) — verify the count is the volume.
2. Verify the active + inactive counts sum to the total users.
**Expected Result:** The activity count is shown — the count of the active and inactive users is the measure.
**Priority:** High

### TC-SA-18-01-021 — Activity period: the period (the period of the activity, e.g., the daily, the weekly, the monthly); the period is the scope
**Type:** Positive
**Covers:** 1.3 → Activity period: the period (the period of the activity, e.g., the daily, the weekly, the monthly)
**Preconditions:** User activity exists across daily, weekly, and monthly periods.
**Steps:**
1. Set the activity period: the period (the period of the activity, e.g., the daily, the weekly, the monthly) — verify the period is the scope.
2. Switch between daily, weekly, and monthly — verify the activity updates for each period.
3. Verify each period covers the correct date range.
**Expected Result:** The activity period is set — the period of the activity (the daily, the weekly, the monthly) is the scope.
**Priority:** High

### TC-SA-18-01-022 — Activity view: the view (the active, the inactive, the counts, the period); the viewing is managed
**Type:** Positive
**Covers:** 1.3 → Activity view: the view (the active, the inactive, the counts, the period); Rule: the users are visible (the active, the inactive, the counts, the period); the viewing is managed
**Preconditions:** Both active and inactive users exist across a period.
**Steps:**
1. View the activity: the view (the active, the inactive, the counts, the period) — verify the users are visible.
2. Verify the view is complete for the period.
**Expected Result:** The activity view works — the active, the inactive, the counts, and the period are visible.
**Priority:** High

### TC-SA-18-01-023 — Activity export: the export (the activity, the format, the period); the export is the record
**Type:** Positive
**Covers:** 1.3 → Activity export: the export (the activity, the format, the period)
**Preconditions:** Activity data exists for a period.
**Steps:**
1. Export the activity: the export (the activity, the format, the period).
2. Verify the export is generated in the selected format.
3. Verify the exported data matches the activity view.
**Expected Result:** The activity is exported — the activity in the selected format for the period is generated.
**Priority:** Medium

### TC-SA-18-01-024 — Activity viewing is audit-logged with the activity, period, and timestamp
**Type:** Positive
**Covers:** 1.3 → Audit logging of the activity viewing; Rule: activity viewing is audit-logged with the activity, period, and timestamp
**Preconditions:** Super Admin has viewed the active vs. inactive users.
**Steps:**
1. Open the audit trail and filter by "activity".
2. Verify entries show the activity, the period, and the timestamp.
**Expected Result:** The activity viewing is audit-logged with the activity, period, and timestamp.
**Priority:** Critical
