# 5. Engagement Metrics — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: engagement_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 |
|---------|--------------------|----------|
| 5.1 User Engagement Metrics | Engagement metric: the metric (the metric of the engagement, e.g., the sessions, the time) | TC-SA-18-05-001 |
| 5.1 User Engagement Metrics | Engagement value: the value (the value of the metric, e.g., the count, the percentage) | TC-SA-18-05-002 |
| 5.1 User Engagement Metrics | Engagement period: the period (the period of the engagement, e.g., the daily, the weekly, the monthly) | TC-SA-18-05-003 |
| 5.1 User Engagement Metrics | Engagement trend: the trend (the trend of the engagement, the period, the change) | TC-SA-18-05-004 |
| 5.1 User Engagement Metrics | Engagement comparison: the comparison (the comparison of the engagement, the periods) | TC-SA-18-05-005 |
| 5.1 User Engagement Metrics | Engagement view: the view (the metrics, the values, the period) | TC-SA-18-05-006 |
| 5.1 User Engagement Metrics | Engagement export: the export (the engagement, the format, the period) | TC-SA-18-05-007 |
| 5.1 User Engagement Metrics | Audit logging of the engagement metric viewing | TC-SA-18-05-008 |
| 5.1 User Engagement Metrics | Rule: the engagement metric is the measure (the metric of the engagement, e.g., the sessions, the time); the metric is the value | TC-SA-18-05-001 |
| 5.1 User Engagement Metrics | Rule: the engagement value is the result (the value of the metric, e.g., the count, the percentage); the value is the outcome | TC-SA-18-05-002 |
| 5.1 User Engagement Metrics | Rule: the engagement period is the scope (the period of the engagement, e.g., the daily, the weekly, the monthly); the period is the control | TC-SA-18-05-003 |
| 5.1 User Engagement Metrics | Rule: the engagement trend is the direction (the trend of the engagement, the period, the change); the trend is the insight | TC-SA-18-05-004 |
| 5.1 User Engagement Metrics | Rule: the engagement is visible (the metrics, the values, the period); the viewing is managed | TC-SA-18-05-006 |
| 5.1 User Engagement Metrics | Rule: engagement metric viewing is audit-logged with the engagement, period, and timestamp | TC-SA-18-05-008 |
| 5.2 Active Users (Daily/Weekly/Monthly) | Active user: the user (the active user, the count, the period) | TC-SA-18-05-009 |
| 5.2 Active Users (Daily/Weekly/Monthly) | Daily active: the active (the daily active users, the count) | TC-SA-18-05-010 |
| 5.2 Active Users (Daily/Weekly/Monthly) | Weekly active: the active (the weekly active users, the count) | TC-SA-18-05-011 |
| 5.2 Active Users (Daily/Weekly/Monthly) | Monthly active: the active (the monthly active users, the count) | TC-SA-18-05-012 |
| 5.2 Active Users (Daily/Weekly/Monthly) | Active period: the period (the period of the active users, e.g., the daily, the weekly, the monthly) | TC-SA-18-05-013 |
| 5.2 Active Users (Daily/Weekly/Monthly) | Active trend: the trend (the trend of the active users, the period, the change) | TC-SA-18-05-014 |
| 5.2 Active Users (Daily/Weekly/Monthly) | Active view: the view (the active, the counts, the period) | TC-SA-18-05-015 |
| 5.2 Active Users (Daily/Weekly/Monthly) | Audit logging of the active user viewing | TC-SA-18-05-016 |
| 5.2 Active Users (Daily/Weekly/Monthly) | Rule: the active user is the engaged (the active user, the count, the period); the user is the state | TC-SA-18-05-009 |
| 5.2 Active Users (Daily/Weekly/Monthly) | Rule: the daily active is the daily (the daily active users, the count); the active is the period | TC-SA-18-05-010 |
| 5.2 Active Users (Daily/Weekly/Monthly) | Rule: the weekly active is the weekly (the weekly active users, the count); the active is the period | TC-SA-18-05-011 |
| 5.2 Active Users (Daily/Weekly/Monthly) | Rule: the monthly active is the monthly (the monthly active users, the count); the active is the period | TC-SA-18-05-012 |
| 5.2 Active Users (Daily/Weekly/Monthly) | Rule: the active users are visible (the active, the counts, the period); the viewing is managed | TC-SA-18-05-015 |
| 5.2 Active Users (Daily/Weekly/Monthly) | Rule: active user viewing is audit-logged with the active, period, and timestamp | TC-SA-18-05-016 |
| 5.3 Learning Activity Overview | Learning activity: the activity (the activity of the learning, the type, the count, the period) | TC-SA-18-05-017 |
| 5.3 Learning Activity Overview | Activity type: the type (the type of the activity, e.g., the video, the quiz, the assignment) | TC-SA-18-05-018 |
| 5.3 Learning Activity Overview | Activity count: the count (the count of the activities) | TC-SA-18-05-019 |
| 5.3 Learning Activity Overview | Activity period: the period (the period of the activity, e.g., the daily, the weekly, the monthly) | TC-SA-18-05-020 |
| 5.3 Learning Activity Overview | Activity trend: the trend (the trend of the activity, the period, the change) | TC-SA-18-05-021 |
| 5.3 Learning Activity Overview | Activity view: the view (the activity, the types, the counts, the period) | TC-SA-18-05-022 |
| 5.3 Learning Activity Overview | Activity export: the export (the activity, the format, the period) | TC-SA-18-05-023 |
| 5.3 Learning Activity Overview | Audit logging of the learning activity viewing | TC-SA-18-05-024 |
| 5.3 Learning Activity Overview | Rule: the learning activity is the action (the activity of the learning, the type, the count, the period); the activity is the engagement | TC-SA-18-05-017 |
| 5.3 Learning Activity Overview | Rule: the activity type is the segment (the type of the activity, e.g., the video, the quiz, the assignment); the type is the category | TC-SA-18-05-018 |
| 5.3 Learning Activity Overview | Rule: the activity count is the measure (the count of the activities); the count is the volume | TC-SA-18-05-019 |
| 5.3 Learning Activity Overview | Rule: the activity trend is the direction (the trend of the activity, the period, the change); the trend is the insight | TC-SA-18-05-021 |
| 5.3 Learning Activity Overview | Rule: the activity is visible (the activity, the types, the counts, the period); the viewing is managed | TC-SA-18-05-022 |
| 5.3 Learning Activity Overview | Rule: learning activity viewing is audit-logged with the activity, period, and timestamp | TC-SA-18-05-024 |

## 5.1 User Engagement Metrics

### TC-SA-18-05-001 — Engagement metric: the metric (the metric of the engagement, e.g., the sessions, the time); the metric is the value
**Type:** Positive
**Covers:** 5.1 → Engagement metric: the metric (the metric of the engagement, e.g., the sessions, the time); Rule: the engagement metric is the measure (the metric of the engagement, e.g., the sessions, the time); the metric is the value
**Preconditions:** Super Admin is logged in; user engagement data exists.
**Steps:**
1. Open the Super Admin Dashboard.
2. View the user engagement metrics: the metrics (the metric of the engagement, e.g., the sessions, the time) — verify the metric is the measure.
3. Verify the metrics (sessions, time) are shown.
4. Verify each metric is accurate for the period.
**Expected Result:** The engagement metric is shown — the metric of the engagement (the sessions, the time) is the value.
**Priority:** Critical

### TC-SA-18-05-002 — Engagement value: the value (the value of the metric, e.g., the count, the percentage); the value is the outcome
**Type:** Positive
**Covers:** 5.1 → Engagement value: the value (the value of the metric, e.g., the count, the percentage); Rule: the engagement value is the result (the value of the metric, e.g., the count, the percentage); the value is the outcome
**Preconditions:** User engagement data exists.
**Steps:**
1. View the engagement value: the value (the value of the metric, e.g., the count, the percentage) — verify the value is the result.
2. Verify each metric's value is shown (the count, the percentage).
3. Verify the values are accurate for the period.
**Expected Result:** The engagement value is shown — the value of the metric (the count, the percentage) is the outcome.
**Priority:** High

### TC-SA-18-05-003 — Engagement period: the period (the period of the engagement, e.g., the daily, the weekly, the monthly); the period is the control
**Type:** Positive
**Covers:** 5.1 → Engagement period: the period (the period of the engagement, e.g., the daily, the weekly, the monthly); Rule: the engagement period is the scope (the period of the engagement, e.g., the daily, the weekly, the monthly); the period is the control
**Preconditions:** Engagement data exists across daily, weekly, and monthly periods.
**Steps:**
1. Set the engagement period: the period (the period of the engagement, e.g., the daily, the weekly, the monthly) — verify the period is the scope.
2. Switch between daily, weekly, and monthly — verify the engagement updates for each period.
3. Verify each period covers the correct date range.
**Expected Result:** The engagement period is set — the period of the engagement (the daily, the weekly, the monthly) is the control.
**Priority:** High

### TC-SA-18-05-004 — Engagement trend: the trend (the trend of the engagement, the period, the change); the trend is the insight
**Type:** Edge
**Covers:** 5.1 → Engagement trend: the trend (the trend of the engagement, the period, the change); Rule: the engagement trend is the direction (the trend of the engagement, the period, the change); the trend is the insight
**Preconditions:** Engagement data exists with an increase in one period and a decrease in another; a period with zero engagement also exists.
**Steps:**
1. View the engagement trend: the trend (the trend of the engagement, 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 engagement — verify the trend shows 0 (no error).
**Expected Result:** The engagement trend is shown — the trend of the engagement, the period, and the change are the insight; a zero-engagement period is handled.
**Priority:** High

### TC-SA-18-05-005 — Engagement comparison: the comparison (the comparison of the engagement, the periods); the comparison is the analysis
**Type:** Positive
**Covers:** 5.1 → Engagement comparison: the comparison (the comparison of the engagement, the periods)
**Preconditions:** Engagement data exists across multiple periods.
**Steps:**
1. Compare the engagement: the comparison (the comparison of the engagement, the periods) — verify the comparison is the analysis.
2. Verify the comparison shows the engagement across the selected periods.
3. Verify the comparison values are accurate.
**Expected Result:** The engagement comparison works — the comparison of the engagement across the periods is the analysis.
**Priority:** Medium

### TC-SA-18-05-006 — Engagement view: the view (the metrics, the values, the period); the viewing is managed
**Type:** Positive
**Covers:** 5.1 → Engagement view: the view (the metrics, the values, the period); Rule: the engagement is visible (the metrics, the values, the period); the viewing is managed
**Preconditions:** Engagement data exists across a period.
**Steps:**
1. View the engagement: the view (the metrics, the values, the period) — verify the engagement is visible.
2. Verify the view is complete for the period.
**Expected Result:** The engagement view works — the metrics, the values, and the period are visible.
**Priority:** High

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

### TC-SA-18-05-008 — Engagement metric viewing is audit-logged with the engagement, period, and timestamp
**Type:** Positive
**Covers:** 5.1 → Audit logging of the engagement metric viewing; Rule: engagement metric viewing is audit-logged with the engagement, period, and timestamp
**Preconditions:** Super Admin has viewed the user engagement metrics.
**Steps:**
1. Open the audit trail and filter by "engagement".
2. Verify entries show the engagement, the period, and the timestamp.
**Expected Result:** The engagement metric viewing is audit-logged with the engagement, period, and timestamp.
**Priority:** Critical

## 5.2 Active Users (Daily/Weekly/Monthly)

### TC-SA-18-05-009 — Active user: the user (the active user, the count, the period); the user is the state
**Type:** Positive
**Covers:** 5.2 → 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 by period: the active (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 was active within the period is counted.
**Expected Result:** The active users are shown — the active user, the count, and the period are the state.
**Priority:** Critical

### TC-SA-18-05-010 — Daily active: the active (the daily active users, the count); the active is the period
**Type:** Positive
**Covers:** 5.2 → Daily active: the active (the daily active users, the count); Rule: the daily active is the daily (the daily active users, the count); the active is the period
**Preconditions:** Daily active users exist.
**Steps:**
1. View the daily active users: the active (the daily active users, the count) — verify the active is the daily.
2. Verify the daily active count matches the actual number of users active today.
3. Verify a user who was active today is counted in the daily active.
**Expected Result:** The daily active is shown — the daily active users and the count are the period.
**Priority:** High

### TC-SA-18-05-011 — Weekly active: the active (the weekly active users, the count); the active is the period
**Type:** Positive
**Covers:** 5.2 → Weekly active: the active (the weekly active users, the count); Rule: the weekly active is the weekly (the weekly active users, the count); the active is the period
**Preconditions:** Weekly active users exist.
**Steps:**
1. View the weekly active users: the active (the weekly active users, the count) — verify the active is the weekly.
2. Verify the weekly active count matches the actual number of users active this week.
3. Verify a user who was active this week is counted in the weekly active.
**Expected Result:** The weekly active is shown — the weekly active users and the count are the period.
**Priority:** High

### TC-SA-18-05-012 — Monthly active: the active (the monthly active users, the count); the active is the period
**Type:** Edge
**Covers:** 5.2 → Monthly active: the active (the monthly active users, the count); Rule: the monthly active is the monthly (the monthly active users, the count); the active is the period
**Preconditions:** Monthly active users exist; a user active in multiple weeks within the month also exists.
**Steps:**
1. View the monthly active users: the active (the monthly active users, the count) — verify the active is the monthly.
2. Verify the monthly active count matches the actual number of unique users active this month.
3. Verify a user active in multiple weeks is counted only once (no double-counting).
**Expected Result:** The monthly active is shown — the monthly active users and the count are the period; unique users are counted once.
**Priority:** High

### TC-SA-18-05-013 — Active period: the period (the period of the active users, e.g., the daily, the weekly, the monthly); the period is the scope
**Type:** Positive
**Covers:** 5.2 → Active period: the period (the period of the active users, e.g., the daily, the weekly, the monthly)
**Preconditions:** Active user data exists across daily, weekly, and monthly periods.
**Steps:**
1. Set the active period: the period (the period of the active users, e.g., the daily, the weekly, the monthly) — verify the period is the scope.
2. Switch between daily, weekly, and monthly — verify the active users update for each period.
3. Verify each period covers the correct date range.
**Expected Result:** The active period is set — the period of the active users (the daily, the weekly, the monthly) is the scope.
**Priority:** High

### TC-SA-18-05-014 — Active trend: the trend (the trend of the active users, the period, the change); the trend is the insight
**Type:** Positive
**Covers:** 5.2 → Active trend: the trend (the trend of the active users, the period, the change)
**Preconditions:** Active user data exists across multiple periods.
**Steps:**
1. View the active trend: the trend (the trend of the active users, the period, the change) — verify the trend is the direction.
2. Verify the trend shows the active users over time with the period and the change.
3. Verify the trend values are accurate.
**Expected Result:** The active trend is shown — the trend of the active users, the period, and the change are the insight.
**Priority:** High

### TC-SA-18-05-015 — Active view: the view (the active, the counts, the period); the viewing is managed
**Type:** Positive
**Covers:** 5.2 → Active view: the view (the active, the counts, the period); Rule: the active users are visible (the active, the counts, the period); the viewing is managed
**Preconditions:** Active user data exists across a period.
**Steps:**
1. View the active users: the view (the active, the counts, the period) — verify the active users are visible.
2. Verify the view is complete for the period.
**Expected Result:** The active view works — the active, the counts, and the period are visible.
**Priority:** High

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

## 5.3 Learning Activity Overview

### TC-SA-18-05-017 — Learning activity: the activity (the activity of the learning, the type, the count, the period); the activity is the engagement
**Type:** Positive
**Covers:** 5.3 → Learning activity: the activity (the activity of the learning, the type, the count, the period); Rule: the learning activity is the action (the activity of the learning, the type, the count, the period); the activity is the engagement
**Preconditions:** Learning activity data exists.
**Steps:**
1. View the learning activity overview: the activity (the activity of the learning, the type, the count, the period) — verify the activity is the action.
2. Verify each activity shows the type, the count, and the period.
3. Record a new learning activity — verify it appears in the overview.
**Expected Result:** The learning activity is shown — the activity of the learning, the type, the count, and the period are the engagement.
**Priority:** Critical

### TC-SA-18-05-018 — Activity type: the type (the type of the activity, e.g., the video, the quiz, the assignment); the type is the category
**Type:** Positive
**Covers:** 5.3 → Activity type: the type (the type of the activity, e.g., the video, the quiz, the assignment); Rule: the activity type is the segment (the type of the activity, e.g., the video, the quiz, the assignment); the type is the category
**Preconditions:** Learning activity of multiple types exists.
**Steps:**
1. View the activity type: the type (the type of the activity, e.g., the video, the quiz, the assignment) — verify the type is the segment.
2. Verify activities are segmented by type.
3. Verify each type's activity count is accurate.
**Expected Result:** The activity type is shown — the type of the activity (the video, the quiz, the assignment) is the category.
**Priority:** High

### TC-SA-18-05-019 — Activity count: the count (the count of the activities); the count is the volume
**Type:** Positive
**Covers:** 5.3 → Activity count: the count (the count of the activities); Rule: the activity count is the measure (the count of the activities); the count is the volume
**Preconditions:** Learning activity data exists.
**Steps:**
1. View the activity count: the count (the count of the activities) — verify the count is the measure.
2. Verify the count matches the actual number of activities.
**Expected Result:** The activity count is shown — the count of the activities is the volume.
**Priority:** High

### TC-SA-18-05-020 — 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:** 5.3 → Activity period: the period (the period of the activity, e.g., the daily, the weekly, the monthly)
**Preconditions:** Learning activity data 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-05-021 — Activity trend: the trend (the trend of the activity, the period, the change); the trend is the insight
**Type:** Positive
**Covers:** 5.3 → Activity trend: the trend (the trend of the activity, the period, the change); Rule: the activity trend is the direction (the trend of the activity, the period, the change); the trend is the insight
**Preconditions:** Learning activity data exists across multiple periods.
**Steps:**
1. View the activity trend: the trend (the trend of the activity, the period, the change) — verify the trend is the direction.
2. Verify the trend shows the activity over time with the period and the change.
3. Verify the trend values are accurate.
**Expected Result:** The activity trend is shown — the trend of the activity, the period, and the change are the insight.
**Priority:** High

### TC-SA-18-05-022 — Activity view: the view (the activity, the types, the counts, the period); the viewing is managed
**Type:** Positive
**Covers:** 5.3 → Activity view: the view (the activity, the types, the counts, the period); Rule: the activity is visible (the activity, the types, the counts, the period); the viewing is managed
**Preconditions:** Learning activity data exists across a period.
**Steps:**
1. View the activity: the view (the activity, the types, the counts, the period) — verify the activity is visible.
2. Verify the view is complete for the period.
**Expected Result:** The activity view works — the activity, the types, the counts, and the period are visible.
**Priority:** High

### TC-SA-18-05-023 — Activity export: the export (the activity, the format, the period); the export is the record
**Type:** Positive
**Covers:** 5.3 → Activity export: the export (the activity, the format, the period)
**Preconditions:** Learning 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-05-024 — Learning activity viewing is audit-logged with the activity, period, and timestamp
**Type:** Positive
**Covers:** 5.3 → Audit logging of the learning activity viewing; Rule: learning activity viewing is audit-logged with the activity, period, and timestamp
**Preconditions:** Super Admin has viewed the learning activity overview.
**Steps:**
1. Open the audit trail and filter by "learning activity".
2. Verify entries show the activity, the period, and the timestamp.
**Expected Result:** The learning activity viewing is audit-logged with the activity, period, and timestamp.
**Priority:** Critical
