# 3. Family Engagement Analytics — Test Cases

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

## Test Execution Policy

- Zero tolerance: any deviation from the documented behavior is a defect.
- Every failed test is logged with a Bug ID, the feature, the sub-feature, the expected vs actual result, and the severity; 100% of bugs are fixed before the group passes.
- 100% pass rate is required for the group to be marked complete.

## Coverage Matrix

| Feature | Sub-feature / Rule | Test IDs |
|---------|--------------------|----------|
| 3.1 Collaboration Activity | Activity count | TC-SA-PS-03-001 |
| 3.1 Collaboration Activity | Activity types | TC-SA-PS-03-002 |
| 3.1 Collaboration Activity | Activity frequency | TC-SA-PS-03-003 |
| 3.1 Collaboration Activity | Per-family breakdown | TC-SA-PS-03-004 |
| 3.1 Collaboration Activity | Activity trend | TC-SA-PS-03-005 |
| 3.1 Collaboration Activity | Rule: a report is exportable in CSV | TC-SA-PS-03-006 |
| 3.1 Collaboration Activity | Rule: report generation is audit-logged | TC-SA-PS-03-007 |
| 3.2 Goal Completion Rate | Completion count | TC-SA-PS-03-008 |
| 3.2 Goal Completion Rate | Completion rate | TC-SA-PS-03-009 |
| 3.2 Goal Completion Rate | Per-family breakdown | TC-SA-PS-03-010 |
| 3.2 Goal Completion Rate | Completion by goal type | TC-SA-PS-03-011 |
| 3.2 Goal Completion Rate | Completion trend | TC-SA-PS-03-012 |
| 3.2 Goal Completion Rate | Rule: a report is exportable in CSV | TC-SA-PS-03-013 |
| 3.2 Goal Completion Rate | Rule: report generation is audit-logged | TC-SA-PS-03-014 |
| 3.3 Reward Redemption | Redemption count | TC-SA-PS-03-015 |
| 3.3 Reward Redemption | Redemption rate | TC-SA-PS-03-016 |
| 3.3 Reward Redemption | Per-reward breakdown | TC-SA-PS-03-017 |
| 3.3 Reward Redemption | Token usage | TC-SA-PS-03-018 |
| 3.3 Reward Redemption | Redemption trend | TC-SA-PS-03-019 |
| 3.3 Reward Redemption | Rule: a report is exportable in CSV | TC-SA-PS-03-020 |
| 3.3 Reward Redemption | Rule: report generation is audit-logged | TC-SA-PS-03-021 |
| 3.4 Family Engagement Score | Score computation | TC-SA-PS-03-022 |
| 3.4 Family Engagement Score | Score components | TC-SA-PS-03-023 |
| 3.4 Family Engagement Score | Score ranking | TC-SA-PS-03-024 |
| 3.4 Family Engagement Score | Per-institute breakdown | TC-SA-PS-03-025 |
| 3.4 Family Engagement Score | Score trend | TC-SA-PS-03-026 |
| 3.4 Family Engagement Score | Rule: a report is exportable in CSV | TC-SA-PS-03-027 |
| 3.4 Family Engagement Score | Rule: report generation is audit-logged | TC-SA-PS-03-028 |

### TC-SA-PS-03-001 — Activity count
**Type:** Positive
**Covers:** 3.1 → Activity count: the count of collaboration activities
**Preconditions:** A Super Admin account is active; collaboration activities exist.
**Steps:**
1. As a Super Admin, open the collaboration activity analytics.
2. Observe the result and verify the full behavior: the activity count is shown.
**Expected Result:** The count is shown — it is accurate, delivered exactly as documented.
**Priority:** High

### TC-SA-PS-03-002 — Activity types
**Type:** Positive
**Covers:** 3.1 → Activity types: the types of collaboration activities
**Preconditions:** A Super Admin account is active; multiple activity types exist.
**Steps:**
1. As a Super Admin, view the activity types.
2. Observe the result and verify the full behavior: the types are listed.
**Expected Result:** The types are shown — they are listed, delivered exactly as documented.
**Priority:** Medium

### TC-SA-PS-03-003 — Activity frequency
**Type:** Positive
**Covers:** 3.1 → Activity frequency: the frequency of the activities
**Preconditions:** A Super Admin account is active; activities exist over a period.
**Steps:**
1. As a Super Admin, view the activity frequency.
2. Observe the result and verify the full behavior: the frequency is shown.
**Expected Result:** The frequency is shown — it is accurate, delivered exactly as documented.
**Priority:** Medium

### TC-SA-PS-03-004 — Per-family breakdown
**Type:** Positive
**Covers:** 3.1 → Per-family breakdown: the activity per family
**Preconditions:** A Super Admin account is active; activities exist for multiple families.
**Steps:**
1. As a Super Admin, view the per-family breakdown.
2. Observe the result and verify the full behavior: the activity is separated by family.
**Expected Result:** The breakdown is shown — the activity is separated, delivered exactly as documented.
**Priority:** Medium

### TC-SA-PS-03-005 — Activity trend
**Type:** Positive
**Covers:** 3.1 → Activity trend: the activity over time
**Preconditions:** A Super Admin account is active; activities exist over time.
**Steps:**
1. As a Super Admin, view the activity trend.
2. Observe the result and verify the full behavior: the trend is shown.
**Expected Result:** The trend is shown — it reflects the change over time, delivered exactly as documented.
**Priority:** Low

### TC-SA-PS-03-006 — Rule: a report is exportable in CSV
**Type:** Positive
**Covers:** 3.1 → Rule: a report is exportable in CSV
**Preconditions:** A Super Admin account is active; the report has data.
**Steps:**
1. As a Super Admin, export the report in CSV.
2. Open the exported file.
3. Observe the result and verify the full behavior: the data is present and correct.
**Expected Result:** The export works — the CSV contains the data, delivered exactly as documented.
**Priority:** High

### TC-SA-PS-03-007 — Rule: report generation is audit-logged
**Type:** Positive
**Covers:** 3.1 → Audit logging of collaboration activity
**Preconditions:** A Super Admin account is active; the audit log is accessible.
**Steps:**
1. As a Super Admin, generate the report.
2. Open the audit log.
3. Observe the result and verify the full behavior: the generation is recorded with the actor and timestamp.
**Expected Result:** The generation is audit-logged — the actor and timestamp are recorded, delivered exactly as documented.
**Priority:** High

### TC-SA-PS-03-008 — Completion count
**Type:** Positive
**Covers:** 3.2 → Completion count: the count of completed goals
**Preconditions:** A Super Admin account is active; goals have been completed.
**Steps:**
1. As a Super Admin, open the goal completion rate analytics.
2. Observe the result and verify the full behavior: the completion count is shown.
**Expected Result:** The count is shown — it is accurate, delivered exactly as documented.
**Priority:** High

### TC-SA-PS-03-009 — Completion rate
**Type:** Positive
**Covers:** 3.2 → Completion rate: the rate of goal completion
**Preconditions:** A Super Admin account is active; goals exist.
**Steps:**
1. As a Super Admin, view the completion rate.
2. Observe the result and verify the full behavior: the rate is shown.
**Expected Result:** The rate is shown — it is accurate, delivered exactly as documented.
**Priority:** High

### TC-SA-PS-03-010 — Per-family breakdown
**Type:** Positive
**Covers:** 3.2 → Per-family breakdown: the completion per family
**Preconditions:** A Super Admin account is active; completions exist for multiple families.
**Steps:**
1. As a Super Admin, view the per-family breakdown.
2. Observe the result and verify the full behavior: the completion is separated by family.
**Expected Result:** The breakdown is shown — the completion is separated, delivered exactly as documented.
**Priority:** Medium

### TC-SA-PS-03-011 — Completion by goal type
**Type:** Positive
**Covers:** 3.2 → Completion by goal type: the completion per goal type
**Preconditions:** A Super Admin account is active; completions exist for multiple goal types.
**Steps:**
1. As a Super Admin, view the completion by goal type.
2. Observe the result and verify the full behavior: the completion is separated by type.
**Expected Result:** The breakdown is shown — the completion is separated, delivered exactly as documented.
**Priority:** Medium

### TC-SA-PS-03-012 — Completion trend
**Type:** Positive
**Covers:** 3.2 → Completion trend: the completion over time
**Preconditions:** A Super Admin account is active; completions exist over time.
**Steps:**
1. As a Super Admin, view the completion trend.
2. Observe the result and verify the full behavior: the trend is shown.
**Expected Result:** The trend is shown — it reflects the change over time, delivered exactly as documented.
**Priority:** Low

### TC-SA-PS-03-013 — Rule: a report is exportable in CSV
**Type:** Positive
**Covers:** 3.2 → Rule: a report is exportable in CSV
**Preconditions:** A Super Admin account is active; the report has data.
**Steps:**
1. As a Super Admin, export the report in CSV.
2. Open the exported file.
3. Observe the result and verify the full behavior: the data is present and correct.
**Expected Result:** The export works — the CSV contains the data, delivered exactly as documented.
**Priority:** High

### TC-SA-PS-03-014 — Rule: report generation is audit-logged
**Type:** Positive
**Covers:** 3.2 → Audit logging of goal completion rate
**Preconditions:** A Super Admin account is active; the audit log is accessible.
**Steps:**
1. As a Super Admin, generate the report.
2. Open the audit log.
3. Observe the result and verify the full behavior: the generation is recorded with the actor and timestamp.
**Expected Result:** The generation is audit-logged — the actor and timestamp are recorded, delivered exactly as documented.
**Priority:** High

### TC-SA-PS-03-015 — Redemption count
**Type:** Positive
**Covers:** 3.3 → Redemption count: the count of redeemed rewards
**Preconditions:** A Super Admin account is active; rewards have been redeemed.
**Steps:**
1. As a Super Admin, open the reward redemption analytics.
2. Observe the result and verify the full behavior: the redemption count is shown.
**Expected Result:** The count is shown — it is accurate, delivered exactly as documented.
**Priority:** High

### TC-SA-PS-03-016 — Redemption rate
**Type:** Positive
**Covers:** 3.3 → Redemption rate: the rate of reward redemption
**Preconditions:** A Super Admin account is active; rewards have been earned and redeemed.
**Steps:**
1. As a Super Admin, view the redemption rate.
2. Observe the result and verify the full behavior: the rate is shown.
**Expected Result:** The rate is shown — it is accurate, delivered exactly as documented.
**Priority:** High

### TC-SA-PS-03-017 — Per-reward breakdown
**Type:** Positive
**Covers:** 3.3 → Per-reward breakdown: the redemption per reward
**Preconditions:** A Super Admin account is active; redemptions exist for multiple rewards.
**Steps:**
1. As a Super Admin, view the per-reward breakdown.
2. Observe the result and verify the full behavior: the redemption is separated per reward.
**Expected Result:** The breakdown is shown — the redemption is separated, delivered exactly as documented.
**Priority:** Medium

### TC-SA-PS-03-018 — Token usage
**Type:** Positive
**Covers:** 3.3 → Token usage: the usage of the digital tokens
**Preconditions:** A Super Admin account is active; tokens have been spent.
**Steps:**
1. As a Super Admin, view the token usage.
2. Observe the result and verify the full behavior: the usage is shown.
**Expected Result:** The usage is shown — it is accurate, delivered exactly as documented.
**Priority:** Medium

### TC-SA-PS-03-019 — Redemption trend
**Type:** Positive
**Covers:** 3.3 → Redemption trend: the redemption over time
**Preconditions:** A Super Admin account is active; redemptions exist over time.
**Steps:**
1. As a Super Admin, view the redemption trend.
2. Observe the result and verify the full behavior: the trend is shown.
**Expected Result:** The trend is shown — it reflects the change over time, delivered exactly as documented.
**Priority:** Low

### TC-SA-PS-03-020 — Rule: a report is exportable in CSV
**Type:** Positive
**Covers:** 3.3 → Rule: a report is exportable in CSV
**Preconditions:** A Super Admin account is active; the report has data.
**Steps:**
1. As a Super Admin, export the report in CSV.
2. Open the exported file.
3. Observe the result and verify the full behavior: the data is present and correct.
**Expected Result:** The export works — the CSV contains the data, delivered exactly as documented.
**Priority:** High

### TC-SA-PS-03-021 — Rule: report generation is audit-logged
**Type:** Positive
**Covers:** 3.3 → Audit logging of reward redemption
**Preconditions:** A Super Admin account is active; the audit log is accessible.
**Steps:**
1. As a Super Admin, generate the report.
2. Open the audit log.
3. Observe the result and verify the full behavior: the generation is recorded with the actor and timestamp.
**Expected Result:** The generation is audit-logged — the actor and timestamp are recorded, delivered exactly as documented.
**Priority:** High

### TC-SA-PS-03-022 — Score computation
**Type:** Positive
**Covers:** 3.4 → Score computation: the computation of the engagement score
**Preconditions:** A Super Admin account is active; engagement metrics exist.
**Steps:**
1. As a Super Admin, open the family engagement score analytics.
2. Observe the result and verify the full behavior: the score is computed and shown.
**Expected Result:** The computation works — the score is shown, delivered exactly as documented.
**Priority:** High

### TC-SA-PS-03-023 — Score components
**Type:** Positive
**Covers:** 3.4 → Score components: the components of the score
**Preconditions:** A Super Admin account is active; a score is computed.
**Steps:**
1. As a Super Admin, view the score components.
2. Observe the result and verify the full behavior: the components are shown.
**Expected Result:** The components are shown — they are listed, delivered exactly as documented.
**Priority:** Medium

### TC-SA-PS-03-024 — Score ranking
**Type:** Positive
**Covers:** 3.4 → Score ranking: the ranking of the families by score
**Preconditions:** A Super Admin account is active; scores exist for multiple families.
**Steps:**
1. As a Super Admin, view the score ranking.
2. Observe the result and verify the full behavior: the families are ordered by score.
**Expected Result:** The ranking is shown — the families are ordered, delivered exactly as documented.
**Priority:** Medium

### TC-SA-PS-03-025 — Per-institute breakdown
**Type:** Positive
**Covers:** 3.4 → Per-institute breakdown: the score per institute
**Preconditions:** A Super Admin account is active; scores exist for multiple institutes.
**Steps:**
1. As a Super Admin, view the per-institute breakdown.
2. Observe the result and verify the full behavior: the score is separated by institute.
**Expected Result:** The breakdown is shown — the score is separated, delivered exactly as documented.
**Priority:** Medium

### TC-SA-PS-03-026 — Score trend
**Type:** Positive
**Covers:** 3.4 → Score trend: the score over time
**Preconditions:** A Super Admin account is active; scores exist over time.
**Steps:**
1. As a Super Admin, view the score trend.
2. Observe the result and verify the full behavior: the trend is shown.
**Expected Result:** The trend is shown — it reflects the change over time, delivered exactly as documented.
**Priority:** Low

### TC-SA-PS-03-027 — Rule: a report is exportable in CSV
**Type:** Positive
**Covers:** 3.4 → Rule: a report is exportable in CSV
**Preconditions:** A Super Admin account is active; the report has data.
**Steps:**
1. As a Super Admin, export the report in CSV.
2. Open the exported file.
3. Observe the result and verify the full behavior: the data is present and correct.
**Expected Result:** The export works — the CSV contains the data, delivered exactly as documented.
**Priority:** High

### TC-SA-PS-03-028 — Rule: report generation is audit-logged
**Type:** Positive
**Covers:** 3.4 → Audit logging of family engagement score
**Preconditions:** A Super Admin account is active; the audit log is accessible.
**Steps:**
1. As a Super Admin, generate the report.
2. Open the audit log.
3. Observe the result and verify the full behavior: the generation is recorded with the actor and timestamp.
**Expected Result:** The generation is audit-logged — the actor and timestamp are recorded, delivered exactly as documented.
**Priority:** High
