# 4. License Utilization — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: license_utilization.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 |
|---------|--------------------|----------|
| 4.1 Institute License Usage and Available Seats | License usage: the usage (the usage, the institute, the count, the seats) | TC-SA-17-04-001 |
| 4.1 Institute License Usage and Available Seats | Available seats: the seats (the seats, the institute, the count) | TC-SA-17-04-002 |
| 4.1 Institute License Usage and Available Seats | Usage count: the count (the count of the used licenses) | TC-SA-17-04-003 |
| 4.1 Institute License Usage and Available Seats | Seat count: the count (the count of the available seats) | TC-SA-17-04-004 |
| 4.1 Institute License Usage and Available Seats | Usage period: the period (the period of the usage, e.g., the monthly, the quarterly) | TC-SA-17-04-005 |
| 4.1 Institute License Usage and Available Seats | Usage view: the view (the usage, the institutes, the seats, the period) | TC-SA-17-04-006 |
| 4.1 Institute License Usage and Available Seats | Usage export: the export (the usage, the format, the period) | TC-SA-17-04-007 |
| 4.1 Institute License Usage and Available Seats | Audit logging of the license usage viewing | TC-SA-17-04-008 |
| 4.1 Institute License Usage and Available Seats | Rule: the license usage is the measure (the usage, the institute, the count, the seats); the usage is the consumption | TC-SA-17-04-001 |
| 4.1 Institute License Usage and Available Seats | Rule: the available seats are the capacity (the seats, the institute, the count); the seats are the remaining | TC-SA-17-04-002 |
| 4.1 Institute License Usage and Available Seats | Rule: the usage count is the volume (the count of the used licenses); the count is the measure | TC-SA-17-04-003 |
| 4.1 Institute License Usage and Available Seats | Rule: the seat count is the capacity (the count of the available seats); the count is the remaining | TC-SA-17-04-004 |
| 4.1 Institute License Usage and Available Seats | Rule: the usage is visible (the usage, the institutes, the seats, the period); the viewing is managed | TC-SA-17-04-006 |
| 4.1 Institute License Usage and Available Seats | Rule: license usage viewing is audit-logged with the institute, usage, and timestamp | TC-SA-17-04-008 |
| 4.2 License Expiry Alerts | Expiry alert: the alert (the alert, the institute, the license, the expiry date, the count) | TC-SA-17-04-009 |
| 4.2 License Expiry Alerts | Expiry date: the date (the date of the expiry, e.g., the 30 days, the 60 days) | TC-SA-17-04-010 |
| 4.2 License Expiry Alerts | Expiry count: the count (the count of the expiring licenses) | TC-SA-17-04-011 |
| 4.2 License Expiry Alerts | Alert threshold: the threshold (the threshold for the alert, e.g., the 30 days) | TC-SA-17-04-012 |
| 4.2 License Expiry Alerts | Alert period: the period (the period of the alerts, e.g., the monthly, the quarterly) | TC-SA-17-04-013 |
| 4.2 License Expiry Alerts | Alert view: the view (the alerts, the institutes, the dates, the period) | TC-SA-17-04-014 |
| 4.2 License Expiry Alerts | Alert export: the export (the alerts, the format, the period) | TC-SA-17-04-015 |
| 4.2 License Expiry Alerts | Audit logging of the license expiry alert viewing | TC-SA-17-04-016 |
| 4.2 License Expiry Alerts | Rule: the expiry alert is the warning (the alert, the institute, the license, the expiry date, the count); the alert is the signal | TC-SA-17-04-009 |
| 4.2 License Expiry Alerts | Rule: the expiry date is the deadline (the date of the expiry, e.g., the 30 days, the 60 days); the date is the time | TC-SA-17-04-010 |
| 4.2 License Expiry Alerts | Rule: the expiry count is the measure (the count of the expiring licenses); the count is the volume | TC-SA-17-04-011 |
| 4.2 License Expiry Alerts | Rule: the alert threshold is the trigger (the threshold for the alert, e.g., the 30 days); the threshold is the control | TC-SA-17-04-012 |
| 4.2 License Expiry Alerts | Rule: the alerts are visible (the alerts, the institutes, the dates, the period); the viewing is managed | TC-SA-17-04-014 |
| 4.2 License Expiry Alerts | Rule: license expiry alert viewing is audit-logged with the institute, alert, and timestamp | TC-SA-17-04-016 |
| 4.3 Renewal and Upgrade Opportunities | Renewal opportunity: the opportunity (the opportunity, the institute, the license, the amount, the date) | TC-SA-17-04-017 |
| 4.3 Renewal and Upgrade Opportunities | Upgrade opportunity: the opportunity (the opportunity, the institute, the license, the amount, the date) | TC-SA-17-04-018 |
| 4.3 Renewal and Upgrade Opportunities | Opportunity count: the count (the count of the opportunities) | TC-SA-17-04-019 |
| 4.3 Renewal and Upgrade Opportunities | Opportunity amount: the amount (the amount of the opportunities) | TC-SA-17-04-020 |
| 4.3 Renewal and Upgrade Opportunities | Opportunity period: the period (the period of the opportunities, e.g., the monthly, the quarterly) | TC-SA-17-04-021 |
| 4.3 Renewal and Upgrade Opportunities | Opportunity view: the view (the opportunities, the institutes, the amounts, the period) | TC-SA-17-04-022 |
| 4.3 Renewal and Upgrade Opportunities | Opportunity export: the export (the opportunities, the format, the period) | TC-SA-17-04-023 |
| 4.3 Renewal and Upgrade Opportunities | Audit logging of the renewal and upgrade opportunity viewing | TC-SA-17-04-024 |
| 4.3 Renewal and Upgrade Opportunities | Rule: the renewal opportunity is the chance (the opportunity, the institute, the license, the amount, the date); the opportunity is the potential | TC-SA-17-04-017 |
| 4.3 Renewal and Upgrade Opportunities | Rule: the upgrade opportunity is the chance (the opportunity, the institute, the license, the amount, the date); the opportunity is the potential | TC-SA-17-04-018 |
| 4.3 Renewal and Upgrade Opportunities | Rule: the opportunity count is the measure (the count of the opportunities); the count is the volume | TC-SA-17-04-019 |
| 4.3 Renewal and Upgrade Opportunities | Rule: the opportunity amount is the value (the amount of the opportunities); the amount is the measure | TC-SA-17-04-020 |
| 4.3 Renewal and Upgrade Opportunities | Rule: the opportunities are visible (the opportunities, the institutes, the amounts, the period); the viewing is managed | TC-SA-17-04-022 |
| 4.3 Renewal and Upgrade Opportunities | Rule: renewal and upgrade opportunity viewing is audit-logged with the institute, opportunity, and timestamp | TC-SA-17-04-024 |

## 4.1 Institute License Usage and Available Seats

### TC-SA-17-04-001 — License usage: the usage (the usage, the institute, the count, the seats); the usage is the consumption
**Type:** Positive
**Covers:** 4.1 → License usage: the usage (the usage, the institute, the count, the seats); Rule: the license usage is the measure (the usage, the institute, the count, the seats); the usage is the consumption
**Preconditions:** Super Admin is logged in; institutes have licenses with usage.
**Steps:**
1. Open the License Utilization view.
2. View the license usage: the usage (the usage, the institute, the count, the seats) — verify the usage is the measure.
3. Verify each institute's usage shows the count and the seats.
**Expected Result:** The license usage is shown — the usage, the institute, the count, and the seats are the consumption.
**Priority:** Critical

### TC-SA-17-04-002 — Available seats: the seats (the seats, the institute, the count); the seats are the remaining
**Type:** Edge
**Covers:** 4.1 → Available seats: the seats (the seats, the institute, the count); Rule: the available seats are the capacity (the seats, the institute, the count); the seats are the remaining
**Preconditions:** Institutes have licenses; one institute has all seats used (zero available).
**Steps:**
1. View the available seats: the seats (the seats, the institute, the count) — verify the seats are the capacity.
2. Verify each institute's available seat count is correct (total − used).
3. View an institute with all seats used — verify the available count shows 0 (no negative).
**Expected Result:** The available seats are shown — the seats, the institute, and the count are the remaining; a fully-used license shows 0.
**Priority:** High

### TC-SA-17-04-003 — Usage count: the count (the count of the used licenses); the count is the measure
**Type:** Positive
**Covers:** 4.1 → Usage count: the count (the count of the used licenses); Rule: the usage count is the volume (the count of the used licenses); the count is the measure
**Preconditions:** Institutes have licenses with usage.
**Steps:**
1. View the usage count: the count (the count of the used licenses) — verify the count is the volume.
2. Verify the count matches the actual number of used licenses.
**Expected Result:** The usage count is shown — the count of the used licenses is the measure.
**Priority:** High

### TC-SA-17-04-004 — Seat count: the count (the count of the available seats); the count is the remaining
**Type:** Positive
**Covers:** 4.1 → Seat count: the count (the count of the available seats); Rule: the seat count is the capacity (the count of the available seats); the count is the remaining
**Preconditions:** Institutes have licenses with available seats.
**Steps:**
1. View the seat count: the count (the count of the available seats) — verify the count is the capacity.
2. Verify the count matches the actual number of available seats.
**Expected Result:** The seat count is shown — the count of the available seats is the remaining.
**Priority:** High

### TC-SA-17-04-005 — Usage period: the period (the period of the usage, e.g., the monthly, the quarterly); the period is the scope
**Type:** Positive
**Covers:** 4.1 → Usage period: the period (the period of the usage, e.g., the monthly, the quarterly)
**Preconditions:** License usage exists across monthly and quarterly periods.
**Steps:**
1. Set the usage period: the period (the period of the usage, e.g., the monthly, the quarterly) — verify the period is the scope.
2. View the usage for a monthly period and a quarterly period — verify each covers the correct period.
**Expected Result:** The usage period is set — the period of the usage (the monthly, the quarterly) is the scope.
**Priority:** High

### TC-SA-17-04-006 — Usage view: the view (the usage, the institutes, the seats, the period); the viewing is managed
**Type:** Positive
**Covers:** 4.1 → Usage view: the view (the usage, the institutes, the seats, the period); Rule: the usage is visible (the usage, the institutes, the seats, the period); the viewing is managed
**Preconditions:** License usage exists across a period.
**Steps:**
1. View the usage: the view (the usage, the institutes, the seats, the period) — verify the usage is visible.
2. Verify the view is complete for the period.
**Expected Result:** The usage view works — the usage, the institutes, the seats, and the period are visible.
**Priority:** High

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

### TC-SA-17-04-008 — License usage viewing is audit-logged with the institute, usage, and timestamp
**Type:** Positive
**Covers:** 4.1 → Audit logging of the license usage viewing; Rule: license usage viewing is audit-logged with the institute, usage, and timestamp
**Preconditions:** Super Admin has viewed the license usage.
**Steps:**
1. Open the audit trail and filter by "license usage".
2. Verify entries show the institute, the usage, and the timestamp.
**Expected Result:** The license usage viewing is audit-logged with the institute, usage, and timestamp.
**Priority:** Critical

## 4.2 License Expiry Alerts

### TC-SA-17-04-009 — Expiry alert: the alert (the alert, the institute, the license, the expiry date, the count); the alert is the signal
**Type:** Positive
**Covers:** 4.2 → Expiry alert: the alert (the alert, the institute, the license, the expiry date, the count); Rule: the expiry alert is the warning (the alert, the institute, the license, the expiry date, the count); the alert is the signal
**Preconditions:** Licenses are expiring within the alert threshold.
**Steps:**
1. View the license expiry alerts: the alert (the alert, the institute, the license, the expiry date, the count) — verify the alert is the warning.
2. Verify each alert shows the institute, the license, the expiry date, and the count.
3. Verify only licenses within the threshold are alerted.
**Expected Result:** The expiry alerts are shown — the alert, the institute, the license, the expiry date, and the count are the signal.
**Priority:** Critical

### TC-SA-17-04-010 — Expiry date: the date (the date of the expiry, e.g., the 30 days, the 60 days); the date is the time
**Type:** Positive
**Covers:** 4.2 → Expiry date: the date (the date of the expiry, e.g., the 30 days, the 60 days); Rule: the expiry date is the deadline (the date of the expiry, e.g., the 30 days, the 60 days); the date is the time
**Preconditions:** Licenses are expiring at different dates.
**Steps:**
1. View the expiry dates: the date (the date of the expiry, e.g., the 30 days, the 60 days) — verify the date is the deadline.
2. Verify each alert shows the correct expiry date.
3. Verify the date is accurate (matches the license's actual expiry date).
**Expected Result:** The expiry date is shown — the date of the expiry (e.g., the 30 days, the 60 days) is the time.
**Priority:** High

### TC-SA-17-04-011 — Expiry count: the count (the count of the expiring licenses); the count is the volume
**Type:** Positive
**Covers:** 4.2 → Expiry count: the count (the count of the expiring licenses); Rule: the expiry count is the measure (the count of the expiring licenses); the count is the volume
**Preconditions:** Licenses are expiring within the threshold.
**Steps:**
1. View the expiry count: the count (the count of the expiring licenses) — verify the count is the measure.
2. Verify the count matches the actual number of expiring licenses.
**Expected Result:** The expiry count is shown — the count of the expiring licenses is the volume.
**Priority:** High

### TC-SA-17-04-012 — Alert threshold: the threshold (the threshold for the alert, e.g., the 30 days); the threshold is the control
**Type:** Edge
**Covers:** 4.2 → Alert threshold: the threshold (the threshold for the alert, e.g., the 30 days); Rule: the alert threshold is the trigger (the threshold for the alert, e.g., the 30 days); the threshold is the control
**Preconditions:** Licenses are expiring at various distances (15 days, 30 days, 45 days, 90 days).
**Steps:**
1. Set the alert threshold: the threshold (the threshold for the alert, e.g., the 30 days) — verify the threshold is the trigger.
2. Verify only licenses expiring within 30 days are alerted (the 15-day and 30-day licenses are shown; the 45-day and 90-day are not).
3. Change the threshold to 60 days — verify the 45-day license now appears.
**Expected Result:** The alert threshold is set — the threshold for the alert (e.g., the 30 days) is the control; only licenses within the threshold are alerted.
**Priority:** Critical

### TC-SA-17-04-013 — Alert period: the period (the period of the alerts, e.g., the monthly, the quarterly); the period is the scope
**Type:** Positive
**Covers:** 4.2 → Alert period: the period (the period of the alerts, e.g., the monthly, the quarterly)
**Preconditions:** License expiries exist across monthly and quarterly periods.
**Steps:**
1. Set the alert period: the period (the period of the alerts, e.g., the monthly, the quarterly) — verify the period is the scope.
2. View the alerts for a monthly period and a quarterly period — verify each covers the correct period.
**Expected Result:** The alert period is set — the period of the alerts (the monthly, the quarterly) is the scope.
**Priority:** High

### TC-SA-17-04-014 — Alert view: the view (the alerts, the institutes, the dates, the period); the viewing is managed
**Type:** Positive
**Covers:** 4.2 → Alert view: the view (the alerts, the institutes, the dates, the period); Rule: the alerts are visible (the alerts, the institutes, the dates, the period); the viewing is managed
**Preconditions:** License expiry alerts exist across a period.
**Steps:**
1. View the alerts: the view (the alerts, the institutes, the dates, the period) — verify the alerts are visible.
2. Verify the view is complete for the period.
**Expected Result:** The alert view works — the alerts, the institutes, the dates, and the period are visible.
**Priority:** High

### TC-SA-17-04-015 — Alert export: the export (the alerts, the format, the period); the export is the record
**Type:** Positive
**Covers:** 4.2 → Alert export: the export (the alerts, the format, the period)
**Preconditions:** License expiry alerts exist for a period.
**Steps:**
1. Export the alerts: the export (the alerts, the format, the period).
2. Verify the export is generated in the selected format.
3. Verify the exported data matches the alert view.
**Expected Result:** The alerts are exported — the alerts in the selected format for the period are generated.
**Priority:** Medium

### TC-SA-17-04-016 — License expiry alert viewing is audit-logged with the institute, alert, and timestamp
**Type:** Positive
**Covers:** 4.2 → Audit logging of the license expiry alert viewing; Rule: license expiry alert viewing is audit-logged with the institute, alert, and timestamp
**Preconditions:** Super Admin has viewed the license expiry alerts.
**Steps:**
1. Open the audit trail and filter by "expiry alert".
2. Verify entries show the institute, the alert, and the timestamp.
**Expected Result:** The license expiry alert viewing is audit-logged with the institute, alert, and timestamp.
**Priority:** Critical

## 4.3 Renewal and Upgrade Opportunities

### TC-SA-17-04-017 — Renewal opportunity: the opportunity (the opportunity, the institute, the license, the amount, the date); the opportunity is the potential
**Type:** Positive
**Covers:** 4.3 → Renewal opportunity: the opportunity (the opportunity, the institute, the license, the amount, the date); Rule: the renewal opportunity is the chance (the opportunity, the institute, the license, the amount, the date); the opportunity is the potential
**Preconditions:** Institutes have licenses approaching expiry (renewal opportunities).
**Steps:**
1. View the renewal opportunities: the opportunity (the opportunity, the institute, the license, the amount, the date) — verify the opportunity is the chance.
2. Verify each renewal opportunity shows the institute, the license, the amount, and the date.
3. Verify only licenses with renewal potential are shown.
**Expected Result:** The renewal opportunities are shown — the opportunity, the institute, the license, the amount, and the date are the potential.
**Priority:** Critical

### TC-SA-17-04-018 — Upgrade opportunity: the opportunity (the opportunity, the institute, the license, the amount, the date); the opportunity is the potential
**Type:** Positive
**Covers:** 4.3 → Upgrade opportunity: the opportunity (the opportunity, the institute, the license, the amount, the date); Rule: the upgrade opportunity is the chance (the opportunity, the institute, the license, the amount, the date); the opportunity is the potential
**Preconditions:** Institutes have licenses with upgrade potential (e.g., high seat utilization).
**Steps:**
1. View the upgrade opportunities: the opportunity (the opportunity, the institute, the license, the amount, the date) — verify the opportunity is the chance.
2. Verify each upgrade opportunity shows the institute, the license, the amount, and the date.
3. Verify only licenses with upgrade potential are shown.
**Expected Result:** The upgrade opportunities are shown — the opportunity, the institute, the license, the amount, and the date are the potential.
**Priority:** Critical

### TC-SA-17-04-019 — Opportunity count: the count (the count of the opportunities); the count is the volume
**Type:** Positive
**Covers:** 4.3 → Opportunity count: the count (the count of the opportunities); Rule: the opportunity count is the measure (the count of the opportunities); the count is the volume
**Preconditions:** Renewal and upgrade opportunities exist.
**Steps:**
1. View the opportunity count: the count (the count of the opportunities) — verify the count is the measure.
2. Verify the count matches the actual number of opportunities.
**Expected Result:** The opportunity count is shown — the count of the opportunities is the volume.
**Priority:** High

### TC-SA-17-04-020 — Opportunity amount: the amount (the amount of the opportunities); the amount is the measure
**Type:** Positive
**Covers:** 4.3 → Opportunity amount: the amount (the amount of the opportunities); Rule: the opportunity amount is the value (the amount of the opportunities); the amount is the measure
**Preconditions:** Renewal and upgrade opportunities exist.
**Steps:**
1. View the opportunity amount: the amount (the amount of the opportunities) — verify the amount is the value.
2. Verify the amount matches the sum of the opportunities' amounts.
**Expected Result:** The opportunity amount is shown — the amount of the opportunities is the measure.
**Priority:** High

### TC-SA-17-04-021 — Opportunity period: the period (the period of the opportunities, e.g., the monthly, the quarterly); the period is the scope
**Type:** Positive
**Covers:** 4.3 → Opportunity period: the period (the period of the opportunities, e.g., the monthly, the quarterly)
**Preconditions:** Opportunities exist across monthly and quarterly periods.
**Steps:**
1. Set the opportunity period: the period (the period of the opportunities, e.g., the monthly, the quarterly) — verify the period is the scope.
2. View the opportunities for a monthly period and a quarterly period — verify each covers the correct period.
**Expected Result:** The opportunity period is set — the period of the opportunities (the monthly, the quarterly) is the scope.
**Priority:** High

### TC-SA-17-04-022 — Opportunity view: the view (the opportunities, the institutes, the amounts, the period); the viewing is managed
**Type:** Positive
**Covers:** 4.3 → Opportunity view: the view (the opportunities, the institutes, the amounts, the period); Rule: the opportunities are visible (the opportunities, the institutes, the amounts, the period); the viewing is managed
**Preconditions:** Opportunities exist across a period.
**Steps:**
1. View the opportunities: the view (the opportunities, the institutes, the amounts, the period) — verify the opportunities are visible.
2. Verify the view is complete for the period.
**Expected Result:** The opportunity view works — the opportunities, the institutes, the amounts, and the period are visible.
**Priority:** High

### TC-SA-17-04-023 — Opportunity export: the export (the opportunities, the format, the period); the export is the record
**Type:** Positive
**Covers:** 4.3 → Opportunity export: the export (the opportunities, the format, the period)
**Preconditions:** Opportunities exist for a period.
**Steps:**
1. Export the opportunities: the export (the opportunities, the format, the period).
2. Verify the export is generated in the selected format.
3. Verify the exported data matches the opportunity view.
**Expected Result:** The opportunities are exported — the opportunities in the selected format for the period are generated.
**Priority:** Medium

### TC-SA-17-04-024 — Renewal and upgrade opportunity viewing is audit-logged with the institute, opportunity, and timestamp
**Type:** Positive
**Covers:** 4.3 → Audit logging of the renewal and upgrade opportunity viewing; Rule: renewal and upgrade opportunity viewing is audit-logged with the institute, opportunity, and timestamp
**Preconditions:** Super Admin has viewed the renewal and upgrade opportunities.
**Steps:**
1. Open the audit trail and filter by "opportunity viewing".
2. Verify entries show the institute, the opportunity, and the timestamp.
**Expected Result:** The renewal and upgrade opportunity viewing is audit-logged with the institute, opportunity, and timestamp.
**Priority:** Critical
