# 2. Revenue Metrics — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: revenue_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 |
|---------|--------------------|----------|
| 2.1 Active Subscriptions and Revenue | Active subscription: the subscription (the active subscription, the user, the plan, the amount, the date) | TC-SA-18-02-001 |
| 2.1 Active Subscriptions and Revenue | Subscription count: the count (the count of the active subscriptions) | TC-SA-18-02-002 |
| 2.1 Active Subscriptions and Revenue | Subscription revenue: the revenue (the revenue of the active subscriptions, the amount, the period) | TC-SA-18-02-003 |
| 2.1 Active Subscriptions and Revenue | Subscription plan: the plan (the plan of the subscription, e.g., the monthly, the annual) | TC-SA-18-02-004 |
| 2.1 Active Subscriptions and Revenue | Subscription period: the period (the period of the subscription, e.g., the monthly, the quarterly) | TC-SA-18-02-005 |
| 2.1 Active Subscriptions and Revenue | Subscription view: the view (the subscriptions, the plans, the amounts, the period) | TC-SA-18-02-006 |
| 2.1 Active Subscriptions and Revenue | Subscription export: the export (the subscriptions, the format, the period) | TC-SA-18-02-007 |
| 2.1 Active Subscriptions and Revenue | Audit logging of the active subscription viewing | TC-SA-18-02-008 |
| 2.1 Active Subscriptions and Revenue | Rule: the active subscription is the ongoing (the active subscription, the user, the plan, the amount, the date); the subscription is the state | TC-SA-18-02-001 |
| 2.1 Active Subscriptions and Revenue | Rule: the subscription count is the measure (the count of the active subscriptions); the count is the volume | TC-SA-18-02-002 |
| 2.1 Active Subscriptions and Revenue | Rule: the subscription revenue is the value (the revenue of the active subscriptions, the amount, the period); the revenue is the income | TC-SA-18-02-003 |
| 2.1 Active Subscriptions and Revenue | Rule: the subscription plan is the tier (the plan of the subscription, e.g., the monthly, the annual); the plan is the level | TC-SA-18-02-004 |
| 2.1 Active Subscriptions and Revenue | Rule: the subscriptions are visible (the subscriptions, the plans, the amounts, the period); the viewing is managed | TC-SA-18-02-006 |
| 2.1 Active Subscriptions and Revenue | Rule: active subscription viewing is audit-logged with the subscription, period, and timestamp | TC-SA-18-02-008 |
| 2.2 Revenue Trends | Revenue trend: the trend (the trend of the revenue, the amount, the period, the change) | TC-SA-18-02-009 |
| 2.2 Revenue Trends | Revenue amount: the amount (the amount of the revenue, the currency) | TC-SA-18-02-010 |
| 2.2 Revenue Trends | Trend period: the period (the period of the trend, e.g., the monthly, the quarterly, the annual) | TC-SA-18-02-011 |
| 2.2 Revenue Trends | Trend change: the change (the change of the revenue, the increase, the decrease) | TC-SA-18-02-012 |
| 2.2 Revenue Trends | Trend comparison: the comparison (the comparison of the revenue, the periods) | TC-SA-18-02-013 |
| 2.2 Revenue Trends | Trend view: the view (the trend, the revenue, the amounts, the period) | TC-SA-18-02-014 |
| 2.2 Revenue Trends | Trend export: the export (the trend, the format, the period) | TC-SA-18-02-015 |
| 2.2 Revenue Trends | Audit logging of the revenue trend viewing | TC-SA-18-02-016 |
| 2.2 Revenue Trends | Rule: the revenue trend is the direction (the trend of the revenue, the amount, the period, the change); the trend is the insight | TC-SA-18-02-009 |
| 2.2 Revenue Trends | Rule: the revenue amount is the value (the amount of the revenue, the currency); the amount is the measure | TC-SA-18-02-010 |
| 2.2 Revenue Trends | Rule: the trend period is the scope (the period of the trend, e.g., the monthly, the quarterly, the annual); the period is the control | TC-SA-18-02-011 |
| 2.2 Revenue Trends | Rule: the trend change is the direction (the change of the revenue, the increase, the decrease); the change is the movement | TC-SA-18-02-012 |
| 2.2 Revenue Trends | Rule: the revenue is visible (the trend, the revenue, the amounts, the period); the viewing is managed | TC-SA-18-02-014 |
| 2.2 Revenue Trends | Rule: revenue trend viewing is audit-logged with the revenue, period, and timestamp | TC-SA-18-02-016 |
| 2.3 Payment Status Overview | Payment: the payment (the payment, the user, the amount, the date) | TC-SA-18-02-017 |
| 2.3 Payment Status Overview | Payment status: the status (the pending, the successful, the failed) | TC-SA-18-02-018 |
| 2.3 Payment Status Overview | Payment count: the count (the count of the payments by status) | TC-SA-18-02-019 |
| 2.3 Payment Status Overview | Payment amount: the amount (the amount of the payments by status) | TC-SA-18-02-020 |
| 2.3 Payment Status Overview | Payment period: the period (the period of the payments, e.g., the daily, the weekly, the monthly) | TC-SA-18-02-021 |
| 2.3 Payment Status Overview | Payment view: the view (the payments, the statuses, the amounts, the period) | TC-SA-18-02-022 |
| 2.3 Payment Status Overview | Payment export: the export (the payments, the format, the period) | TC-SA-18-02-023 |
| 2.3 Payment Status Overview | Audit logging of the payment status viewing | TC-SA-18-02-024 |
| 2.3 Payment Status Overview | Rule: the payment is the transaction (the payment, the user, the amount, the date); the payment is the record | TC-SA-18-02-017 |
| 2.3 Payment Status Overview | Rule: the payment status is the state (the pending, the successful, the failed); the status is the control | TC-SA-18-02-018 |
| 2.3 Payment Status Overview | Rule: the payment count is the measure (the count of the payments by status); the count is the volume | TC-SA-18-02-019 |
| 2.3 Payment Status Overview | Rule: the payment amount is the value (the amount of the payments by status); the amount is the measure | TC-SA-18-02-020 |
| 2.3 Payment Status Overview | Rule: the payments are visible (the payments, the statuses, the amounts, the period); the viewing is managed | TC-SA-18-02-022 |
| 2.3 Payment Status Overview | Rule: payment status viewing is audit-logged with the payment, status, and timestamp | TC-SA-18-02-024 |

## 2.1 Active Subscriptions and Revenue

### TC-SA-18-02-001 — Active subscription: the subscription (the active subscription, the user, the plan, the amount, the date); the subscription is the state
**Type:** Positive
**Covers:** 2.1 → Active subscription: the subscription (the active subscription, the user, the plan, the amount, the date); Rule: the active subscription is the ongoing (the active subscription, the user, the plan, the amount, the date); the subscription is the state
**Preconditions:** Super Admin is logged in; active subscriptions exist.
**Steps:**
1. Open the Super Admin Dashboard.
2. View the active subscriptions: the subscriptions (the active subscription, the user, the plan, the amount, the date) — verify the subscription is the ongoing.
3. Verify each subscription shows the user, the plan, the amount, and the date.
4. Verify only active (non-lapsed) subscriptions are shown.
**Expected Result:** The active subscriptions are shown — the active subscription, the user, the plan, the amount, and the date are the state.
**Priority:** Critical

### TC-SA-18-02-002 — Subscription count: the count (the count of the active subscriptions); the count is the volume
**Type:** Positive
**Covers:** 2.1 → Subscription count: the count (the count of the active subscriptions); Rule: the subscription count is the measure (the count of the active subscriptions); the count is the volume
**Preconditions:** Active subscriptions exist.
**Steps:**
1. View the subscription count: the count (the count of the active subscriptions) — verify the count is the measure.
2. Verify the count matches the actual number of active subscriptions.
3. Cancel an active subscription — verify the count decrements by 1.
**Expected Result:** The subscription count is shown — the count of the active subscriptions is the volume; counts update in real time.
**Priority:** Critical

### TC-SA-18-02-003 — Subscription revenue: the revenue (the revenue of the active subscriptions, the amount, the period); the revenue is the income
**Type:** Positive
**Covers:** 2.1 → Subscription revenue: the revenue (the revenue of the active subscriptions, the amount, the period); Rule: the subscription revenue is the value (the revenue of the active subscriptions, the amount, the period); the revenue is the income
**Preconditions:** Active subscriptions with revenue exist.
**Steps:**
1. View the subscription revenue: the revenue (the revenue of the active subscriptions, the amount, the period) — verify the revenue is the value.
2. Verify the revenue amount matches the sum of the active subscriptions' amounts.
3. Verify the revenue is shown for the correct period.
**Expected Result:** The subscription revenue is shown — the revenue of the active subscriptions, the amount, and the period are the income.
**Priority:** Critical

### TC-SA-18-02-004 — Subscription plan: the plan (the plan of the subscription, e.g., the monthly, the annual); the plan is the level
**Type:** Positive
**Covers:** 2.1 → Subscription plan: the plan (the plan of the subscription, e.g., the monthly, the annual); Rule: the subscription plan is the tier (the plan of the subscription, e.g., the monthly, the annual); the plan is the level
**Preconditions:** Active subscriptions across multiple plans exist.
**Steps:**
1. View the subscription plans: the plan (the plan of the subscription, e.g., the monthly, the annual) — verify the plan is the tier.
2. Verify subscriptions are segmented by plan.
3. Verify each plan's subscription count and revenue are accurate.
**Expected Result:** The subscription plan is shown — the plan of the subscription (the monthly, the annual) is the level.
**Priority:** High

### TC-SA-18-02-005 — Subscription period: the period (the period of the subscription, e.g., the monthly, the quarterly); the period is the scope
**Type:** Positive
**Covers:** 2.1 → Subscription period: the period (the period of the subscription, e.g., the monthly, the quarterly)
**Preconditions:** Active subscriptions exist across monthly and quarterly periods.
**Steps:**
1. Set the subscription period: the period (the period of the subscription, e.g., the monthly, the quarterly) — verify the period is the scope.
2. Switch between monthly and quarterly — verify the subscriptions update for each period.
3. Verify each period covers the correct date range.
**Expected Result:** The subscription period is set — the period of the subscription (the monthly, the quarterly) is the scope.
**Priority:** High

### TC-SA-18-02-006 — Subscription view: the view (the subscriptions, the plans, the amounts, the period); the viewing is managed
**Type:** Positive
**Covers:** 2.1 → Subscription view: the view (the subscriptions, the plans, the amounts, the period); Rule: the subscriptions are visible (the subscriptions, the plans, the amounts, the period); the viewing is managed
**Preconditions:** Active subscriptions exist across a period.
**Steps:**
1. View the subscriptions: the view (the subscriptions, the plans, the amounts, the period) — verify the subscriptions are visible.
2. Verify the view is complete for the period.
**Expected Result:** The subscription view works — the subscriptions, the plans, the amounts, and the period are visible.
**Priority:** High

### TC-SA-18-02-007 — Subscription export: the export (the subscriptions, the format, the period); the export is the record
**Type:** Positive
**Covers:** 2.1 → Subscription export: the export (the subscriptions, the format, the period)
**Preconditions:** Active subscriptions exist for a period.
**Steps:**
1. Export the subscriptions: the export (the subscriptions, the format, the period).
2. Verify the export is generated in the selected format.
3. Verify the exported data matches the subscription view.
**Expected Result:** The subscriptions are exported — the subscriptions in the selected format for the period are generated.
**Priority:** Medium

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

## 2.2 Revenue Trends

### TC-SA-18-02-009 — Revenue trend: the trend (the trend of the revenue, the amount, the period, the change); the trend is the insight
**Type:** Positive
**Covers:** 2.2 → Revenue trend: the trend (the trend of the revenue, the amount, the period, the change); Rule: the revenue trend is the direction (the trend of the revenue, the amount, the period, the change); the trend is the insight
**Preconditions:** Revenue exists across multiple periods.
**Steps:**
1. View the revenue trends: the trend (the trend of the revenue, the amount, the period, the change) — verify the trend is the direction.
2. Verify the trend shows the revenue over time with the amount, the period, and the change.
**Expected Result:** The revenue trend is shown — the trend of the revenue, the amount, the period, and the change are the insight.
**Priority:** Critical

### TC-SA-18-02-010 — Revenue amount: the amount (the amount of the revenue, the currency); the amount is the measure
**Type:** Positive
**Covers:** 2.2 → Revenue amount: the amount (the amount of the revenue, the currency); Rule: the revenue amount is the value (the amount of the revenue, the currency); the amount is the measure
**Preconditions:** Revenue exists in a currency.
**Steps:**
1. View the revenue amount: the amount (the amount of the revenue, the currency) — verify the amount is the value.
2. Verify the amount is shown with the correct currency.
3. Verify the amount is accurate for each period in the trend.
**Expected Result:** The revenue amount is shown — the amount of the revenue and the currency are the measure.
**Priority:** High

### TC-SA-18-02-011 — Trend period: the period (the period of the trend, e.g., the monthly, the quarterly, the annual); the period is the control
**Type:** Positive
**Covers:** 2.2 → Trend period: the period (the period of the trend, e.g., the monthly, the quarterly, the annual); Rule: the trend period is the scope (the period of the trend, e.g., the monthly, the quarterly, the annual); the period is the control
**Preconditions:** Revenue exists across monthly, quarterly, and annual periods.
**Steps:**
1. Set the trend period: the period (the period of the trend, e.g., the monthly, the quarterly, the annual) — verify the period is the scope.
2. Switch between monthly, quarterly, and annual — verify the trend updates for each period.
3. Verify each period covers the correct date range.
**Expected Result:** The trend period is set — the period of the trend (the monthly, the quarterly, the annual) is the control.
**Priority:** High

### TC-SA-18-02-012 — Trend change: the change (the change of the revenue, the increase, the decrease); the change is the movement
**Type:** Edge
**Covers:** 2.2 → Trend change: the change (the change of the revenue, the increase, the decrease); Rule: the trend change is the direction (the change of the revenue, the increase, the decrease); the change is the movement
**Preconditions:** Revenue exists with an increase in one period and a decrease in another; a flat period also exists.
**Steps:**
1. View the trend change: the change (the change of the revenue, the increase, the decrease) — verify the change is the direction.
2. Verify the increase is shown for the growing period and the decrease for the declining period.
3. Verify a flat period shows 0% change (no error).
**Expected Result:** The trend change is shown — the change of the revenue (the increase, the decrease) is the movement; a flat period shows 0%.
**Priority:** High

### TC-SA-18-02-013 — Trend comparison: the comparison (the comparison of the revenue, the periods); the comparison is the analysis
**Type:** Positive
**Covers:** 2.2 → Trend comparison: the comparison (the comparison of the revenue, the periods)
**Preconditions:** Revenue exists across multiple periods.
**Steps:**
1. Compare the revenue: the comparison (the comparison of the revenue, the periods) — verify the comparison is the analysis.
2. Verify the comparison shows the revenue across the selected periods.
3. Verify the comparison values are accurate.
**Expected Result:** The trend comparison works — the comparison of the revenue across the periods is the analysis.
**Priority:** Medium

### TC-SA-18-02-014 — Trend view: the view (the trend, the revenue, the amounts, the period); the viewing is managed
**Type:** Positive
**Covers:** 2.2 → Trend view: the view (the trend, the revenue, the amounts, the period); Rule: the revenue is visible (the trend, the revenue, the amounts, the period); the viewing is managed
**Preconditions:** Revenue exists across a period.
**Steps:**
1. View the trend: the view (the trend, the revenue, the amounts, the period) — verify the revenue is visible.
2. Verify the view is complete for the period.
**Expected Result:** The trend view works — the trend, the revenue, the amounts, and the period are visible.
**Priority:** High

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

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

## 2.3 Payment Status Overview

### TC-SA-18-02-017 — Payment: the payment (the payment, the user, the amount, the date); the payment is the record
**Type:** Positive
**Covers:** 2.3 → Payment: the payment (the payment, the user, the amount, the date); Rule: the payment is the transaction (the payment, the user, the amount, the date); the payment is the record
**Preconditions:** Payments exist.
**Steps:**
1. View the payment status overview: the payments (the payment, the user, the amount, the date) — verify the payment is the transaction.
2. Verify each payment shows the user, the amount, and the date.
3. Process a new payment — verify it appears in the overview.
**Expected Result:** The payments are shown — the payment, the user, the amount, and the date are the record.
**Priority:** Critical

### TC-SA-18-02-018 — Payment status: the status (the pending, the successful, the failed); the status is the control
**Type:** Positive
**Covers:** 2.3 → Payment status: the status (the pending, the successful, the failed); Rule: the payment status is the state (the pending, the successful, the failed); the status is the control
**Preconditions:** Payments in all three statuses exist.
**Steps:**
1. View the payment statuses: the status (the pending, the successful, the failed) — verify the status is the state.
2. Verify payments are segmented by status.
3. Verify a payment's status updates in the overview when its status changes.
**Expected Result:** The payment status is shown — the pending, the successful, and the failed are the control.
**Priority:** Critical

### TC-SA-18-02-019 — Payment count: the count (the count of the payments by status); the count is the volume
**Type:** Positive
**Covers:** 2.3 → Payment count: the count (the count of the payments by status); Rule: the payment count is the measure (the count of the payments by status); the count is the volume
**Preconditions:** Payments in all three statuses exist.
**Steps:**
1. View the payment count: the count (the count of the payments by status) — verify the count is the measure.
2. Verify each status's count matches the actual number of payments in that status.
**Expected Result:** The payment count is shown — the count of the payments by status is the volume.
**Priority:** High

### TC-SA-18-02-020 — Payment amount: the amount (the amount of the payments by status); the amount is the measure
**Type:** Positive
**Covers:** 2.3 → Payment amount: the amount (the amount of the payments by status); Rule: the payment amount is the value (the amount of the payments by status); the amount is the measure
**Preconditions:** Payments in all three statuses exist.
**Steps:**
1. View the payment amount: the amount (the amount of the payments by status) — verify the amount is the value.
2. Verify each status's amount matches the sum of the payments in that status.
**Expected Result:** The payment amount is shown — the amount of the payments by status is the measure.
**Priority:** High

### TC-SA-18-02-021 — Payment period: the period (the period of the payments, e.g., the daily, the weekly, the monthly); the period is the scope
**Type:** Positive
**Covers:** 2.3 → Payment period: the period (the period of the payments, e.g., the daily, the weekly, the monthly)
**Preconditions:** Payments exist across daily, weekly, and monthly periods.
**Steps:**
1. Set the payment period: the period (the period of the payments, e.g., the daily, the weekly, the monthly) — verify the period is the scope.
2. Switch between daily, weekly, and monthly — verify the payments update for each period.
3. Verify each period covers the correct date range.
**Expected Result:** The payment period is set — the period of the payments (the daily, the weekly, the monthly) is the scope.
**Priority:** High

### TC-SA-18-02-022 — Payment view: the view (the payments, the statuses, the amounts, the period); the viewing is managed
**Type:** Positive
**Covers:** 2.3 → Payment view: the view (the payments, the statuses, the amounts, the period); Rule: the payments are visible (the payments, the statuses, the amounts, the period); the viewing is managed
**Preconditions:** Payments exist across a period.
**Steps:**
1. View the payments: the view (the payments, the statuses, the amounts, the period) — verify the payments are visible.
2. Verify the view is complete for the period.
**Expected Result:** The payment view works — the payments, the statuses, the amounts, and the period are visible.
**Priority:** High

### TC-SA-18-02-023 — Payment export: the export (the payments, the format, the period); the export is the record
**Type:** Positive
**Covers:** 2.3 → Payment export: the export (the payments, the format, the period)
**Preconditions:** Payments exist for a period.
**Steps:**
1. Export the payments: the export (the payments, the format, the period).
2. Verify the export is generated in the selected format.
3. Verify the exported data matches the payment view.
**Expected Result:** The payments are exported — the payments in the selected format for the period are generated.
**Priority:** Medium

### TC-SA-18-02-024 — Payment status viewing is audit-logged with the payment, status, and timestamp
**Type:** Positive
**Covers:** 2.3 → Audit logging of the payment status viewing; Rule: payment status viewing is audit-logged with the payment, status, and timestamp
**Preconditions:** Super Admin has viewed the payment status overview.
**Steps:**
1. Open the audit trail and filter by "payment status".
2. Verify entries show the payment, the status, and the timestamp.
**Expected Result:** The payment status viewing is audit-logged with the payment, status, and timestamp.
**Priority:** Critical
