# 4. Affiliate Performance Reports — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: affiliate_performance_reports.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 Affiliate Conversion Analytics | Conversion: the conversion (the conversion, the affiliate, the rate, the period) | TC-SA-19-04-001 |
| 4.1 Affiliate Conversion Analytics | Affiliate: the affiliate (the affiliate, the name, the conversion) | TC-SA-19-04-002 |
| 4.1 Affiliate Conversion Analytics | Conversion rate: the rate (the rate of the conversion, the percentage) | TC-SA-19-04-003 |
| 4.1 Affiliate Conversion Analytics | Conversion count: the count (the count of the conversions) | TC-SA-19-04-004 |
| 4.1 Affiliate Conversion Analytics | Conversion period: the period (the period of the conversions, e.g., the monthly, the quarterly, the annual) | TC-SA-19-04-005 |
| 4.1 Affiliate Conversion Analytics | Conversion trend: the trend (the trend of the conversions, the period, the change) | TC-SA-19-04-006 |
| 4.1 Affiliate Conversion Analytics | Conversion export: the export (the conversions, the format, the period) | TC-SA-19-04-007 |
| 4.1 Affiliate Conversion Analytics | Audit logging of the conversion analysis | TC-SA-19-04-008 |
| 4.1 Affiliate Conversion Analytics | Rule: the conversion is the result (the conversion, the affiliate, the rate, the period); the conversion is the outcome | TC-SA-19-04-001 |
| 4.1 Affiliate Conversion Analytics | Rule: the affiliate is the partner (the affiliate, the name, the conversion); the affiliate is the source | TC-SA-19-04-002 |
| 4.1 Affiliate Conversion Analytics | Rule: the conversion rate is the measure (the rate of the conversion, the percentage); the rate is the value | TC-SA-19-04-003 |
| 4.1 Affiliate Conversion Analytics | Rule: the conversion trend is the direction (the trend of the conversions, the period, the change); the trend is the insight | TC-SA-19-04-006 |
| 4.1 Affiliate Conversion Analytics | Rule: the conversion is visible (the conversion, the affiliates, the rates, the period); the analysis is managed | TC-SA-19-04-005 |
| 4.1 Affiliate Conversion Analytics | Rule: conversion analysis is audit-logged with the conversion, period, and timestamp | TC-SA-19-04-008 |
| 4.2 Commission Reports | Commission: the commission (the commission, the affiliate, the amount, the date) | TC-SA-19-04-009 |
| 4.2 Commission Reports | Affiliate: the affiliate (the affiliate, the name, the commission) | TC-SA-19-04-010 |
| 4.2 Commission Reports | Commission amount: the amount (the amount of the commission, the currency) | TC-SA-19-04-011 |
| 4.2 Commission Reports | Commission status: the status (the pending, the earned, the paid) | TC-SA-19-04-012 |
| 4.2 Commission Reports | Commission period: the period (the period of the commissions, e.g., the monthly, the quarterly, the annual) | TC-SA-19-04-013 |
| 4.2 Commission Reports | Commission comparison: the comparison (the comparison of the commissions, the affiliates, the periods) | TC-SA-19-04-014 |
| 4.2 Commission Reports | Commission export: the export (the commissions, the format, the period) | TC-SA-19-04-015 |
| 4.2 Commission Reports | Audit logging of the commission reporting | TC-SA-19-04-016 |
| 4.2 Commission Reports | Rule: the commission is the earning (the commission, the affiliate, the amount, the date); the commission is the value | TC-SA-19-04-009 |
| 4.2 Commission Reports | Rule: the affiliate is the partner (the affiliate, the name, the commission); the affiliate is the source | TC-SA-19-04-010 |
| 4.2 Commission Reports | Rule: the commission amount is the value (the amount of the commission, the currency); the amount is the measure | TC-SA-19-04-011 |
| 4.2 Commission Reports | Rule: the commission status is the state (the pending, the earned, the paid); the status is the control | TC-SA-19-04-012 |
| 4.2 Commission Reports | Rule: the commissions are visible (the commissions, the affiliates, the amounts, the period); the report is managed | TC-SA-19-04-013 |
| 4.2 Commission Reports | Rule: commission reporting is audit-logged with the commission, period, and timestamp | TC-SA-19-04-016 |
| 4.3 Top-Performing Affiliates and Courses | Top affiliate: the affiliate (the affiliate, the affiliate, the name, the performance, the rank) | TC-SA-19-04-017 |
| 4.3 Top-Performing Affiliates and Courses | Top course: the course (the course, the course, the name, the performance, the rank) | TC-SA-19-04-018 |
| 4.3 Top-Performing Affiliates and Courses | Performance: the performance (the performance, the performance, the metric, the value) | TC-SA-19-04-019 |
| 4.3 Top-Performing Affiliates and Courses | Rank: the rank (the rank of the affiliate or course, the position) | TC-SA-19-04-020 |
| 4.3 Top-Performing Affiliates and Courses | Performance period: the period (the period of the performance, e.g., the monthly, the quarterly, the annual) | TC-SA-19-04-021 |
| 4.3 Top-Performing Affiliates and Courses | Performance comparison: the comparison (the comparison of the performance, the affiliates, the courses, the periods) | TC-SA-19-04-022 |
| 4.3 Top-Performing Affiliates and Courses | Performance export: the export (the performance, the format, the period) | TC-SA-19-04-023 |
| 4.3 Top-Performing Affiliates and Courses | Audit logging of the top performer reporting | TC-SA-19-04-024 |
| 4.3 Top-Performing Affiliates and Courses | Rule: the top affiliate is the leader (the affiliate, the name, the performance, the rank); the affiliate is the partner | TC-SA-19-04-017 |
| 4.3 Top-Performing Affiliates and Courses | Rule: the top course is the leader (the course, the name, the performance, the rank); the course is the content | TC-SA-19-04-018 |
| 4.3 Top-Performing Affiliates and Courses | Rule: the performance is the measure (the performance, the metric, the value); the performance is the value | TC-SA-19-04-019 |
| 4.3 Top-Performing Affiliates and Courses | Rule: the rank is the position (the rank of the affiliate or course, the position); the rank is the order | TC-SA-19-04-020 |
| 4.3 Top-Performing Affiliates and Courses | Rule: the top performers are visible (the affiliates, the courses, the performance, the period); the report is managed | TC-SA-19-04-021 |
| 4.3 Top-Performing Affiliates and Courses | Rule: top performer reporting is audit-logged with the performance, period, and timestamp | TC-SA-19-04-024 |

## 4.1 Affiliate Conversion Analytics

### TC-SA-19-04-001 — Conversion: the conversion (the conversion, the affiliate, the rate, the period); the conversion is the outcome
**Type:** Positive
**Covers:** 4.1 → Conversion: the conversion (the conversion, the affiliate, the rate, the period); Rule: the conversion is the result (the conversion, the affiliate, the rate, the period); the conversion is the outcome
**Preconditions:** Super Admin is logged in; affiliate conversion data exists.
**Steps:**
1. Open Custom Reporting → Affiliate Performance Reports.
2. Analyze the affiliate conversions: the conversion (the conversion, the affiliate, the rate, the period) — verify the conversion is the result.
3. Verify each conversion shows the affiliate, the rate, and the period.
4. A referred user subscribes — verify the conversion appears in the analysis.
**Expected Result:** The conversion is analyzed — the conversion, the affiliate, the rate, and the period are the outcome.
**Priority:** Critical

### TC-SA-19-04-002 — Affiliate: the affiliate (the affiliate, the name, the conversion); the affiliate is the source
**Type:** Positive
**Covers:** 4.1 → Affiliate: the affiliate (the affiliate, the name, the conversion); Rule: the affiliate is the partner (the affiliate, the name, the conversion); the affiliate is the source
**Preconditions:** Conversion data exists for multiple affiliates.
**Steps:**
1. Select the affiliates: the affiliate (the affiliate, the name, the conversion) — verify the affiliate is the partner.
2. Verify conversions are segmented by affiliate.
3. Verify each affiliate's conversion rate is accurate.
**Expected Result:** The affiliate is shown — the affiliate, the name, and the conversion are the source.
**Priority:** High

### TC-SA-19-04-003 — Conversion rate: the rate (the rate of the conversion, the percentage); the rate is the value
**Type:** Edge
**Covers:** 4.1 → Conversion rate: the rate (the rate of the conversion, the percentage); Rule: the conversion rate is the measure (the rate of the conversion, the percentage); the rate is the value
**Preconditions:** Conversion data exists; an affiliate with zero clicks (division edge) also exists.
**Steps:**
1. View the conversion rate: the rate (the rate of the conversion, the percentage) — verify the rate is the measure.
2. Verify the rate is calculated correctly (conversions / clicks × 100).
3. View an affiliate with zero clicks — verify the rate shows 0% (no division error).
**Expected Result:** The conversion rate is shown — the rate of the conversion and the percentage are the value; a zero-click affiliate is handled.
**Priority:** High

### TC-SA-19-04-004 — Conversion count: the count (the count of the conversions); the count is the volume
**Type:** Positive
**Covers:** 4.1 → Conversion count: the count (the count of the conversions)
**Preconditions:** Conversion data exists.
**Steps:**
1. View the conversion count: the count (the count of the conversions) — verify the count is the measure.
2. Verify the count matches the actual number of conversions.
3. A referred user subscribes — verify the count increments by 1.
**Expected Result:** The conversion count is shown — the count of the conversions is the volume.
**Priority:** High

### TC-SA-19-04-005 — Conversion period: the period (the period of the conversions, e.g., the monthly, the quarterly, the annual); the analysis is managed
**Type:** Positive
**Covers:** 4.1 → Conversion period: the period (the period of the conversions, e.g., the monthly, the quarterly, the annual); Rule: the conversion is visible (the conversion, the affiliates, the rates, the period); the analysis is managed
**Preconditions:** Conversion data exists across monthly, quarterly, and annual periods.
**Steps:**
1. Set the conversion period: the period (the period of the conversions, e.g., the monthly, the quarterly, the annual) — verify the period is the scope.
2. Switch between monthly, quarterly, and annual — verify the conversions update for each period.
3. Verify the conversion is visible for the period.
**Expected Result:** The conversion period is set — the period of the conversions (the monthly, the quarterly, the annual) is the scope; the analysis is managed.
**Priority:** High

### TC-SA-19-04-006 — Conversion trend: the trend (the trend of the conversions, the period, the change); the trend is the insight
**Type:** Positive
**Covers:** 4.1 → Conversion trend: the trend (the trend of the conversions, the period, the change); Rule: the conversion trend is the direction (the trend of the conversions, the period, the change); the trend is the insight
**Preconditions:** Conversion data exists across multiple periods.
**Steps:**
1. View the conversion trend: the trend (the trend of the conversions, the period, the change) — verify the trend is the direction.
2. Verify the trend shows the conversions over time with the period and the change.
3. Verify the trend values are accurate.
**Expected Result:** The conversion trend is shown — the trend of the conversions, the period, and the change are the insight.
**Priority:** High

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

### TC-SA-19-04-008 — Conversion analysis is audit-logged with the conversion, period, and timestamp
**Type:** Positive
**Covers:** 4.1 → Audit logging of the conversion analysis; Rule: conversion analysis is audit-logged with the conversion, period, and timestamp
**Preconditions:** Super Admin has analyzed the affiliate conversions.
**Steps:**
1. Open the audit trail and filter by "conversion".
2. Verify entries show the conversion, the period, and the timestamp.
**Expected Result:** The conversion analysis is audit-logged with the conversion, period, and timestamp.
**Priority:** Critical

## 4.2 Commission Reports

### TC-SA-19-04-009 — Commission: the commission (the commission, the affiliate, the amount, the date); the commission is the value
**Type:** Positive
**Covers:** 4.2 → Commission: the commission (the commission, the affiliate, the amount, the date); Rule: the commission is the earning (the commission, the affiliate, the amount, the date); the commission is the value
**Preconditions:** Commission data exists.
**Steps:**
1. Report the commissions: the commission (the commission, the affiliate, the amount, the date) — verify the commission is the earning.
2. Verify each commission shows the affiliate, the amount, and the date.
3. A new commission is earned — verify it appears in the report.
**Expected Result:** The commission is reported — the commission, the affiliate, the amount, and the date are the value.
**Priority:** Critical

### TC-SA-19-04-010 — Affiliate: the affiliate (the affiliate, the name, the commission); the affiliate is the source
**Type:** Positive
**Covers:** 4.2 → Affiliate: the affiliate (the affiliate, the name, the commission); Rule: the affiliate is the partner (the affiliate, the name, the commission); the affiliate is the source
**Preconditions:** Commission data exists for multiple affiliates.
**Steps:**
1. Select the affiliates: the affiliate (the affiliate, the name, the commission) — verify the affiliate is the partner.
2. Verify commissions are segmented by affiliate.
3. Verify each affiliate's commission total is accurate.
**Expected Result:** The affiliate is shown — the affiliate, the name, and the commission are the source.
**Priority:** High

### TC-SA-19-04-011 — Commission amount: the amount (the amount of the commission, the currency); the amount is the measure
**Type:** Positive
**Covers:** 4.2 → Commission amount: the amount (the amount of the commission, the currency); Rule: the commission amount is the value (the amount of the commission, the currency); the amount is the measure
**Preconditions:** Commission data with amounts in multiple currencies exists.
**Steps:**
1. View the commission amount: the amount (the amount of the commission, the currency) — verify the amount is the value.
2. Verify each amount shows the correct currency.
3. Verify the totals are calculated correctly per currency.
**Expected Result:** The commission amount is shown — the amount of the commission and the currency are the measure.
**Priority:** High

### TC-SA-19-04-012 — Commission status: the status (the pending, the earned, the paid); the status is the control
**Type:** Positive
**Covers:** 4.2 → Commission status: the status (the pending, the earned, the paid); Rule: the commission status is the state (the pending, the earned, the paid); the status is the control
**Preconditions:** Commission data with pending, earned, and paid statuses exists.
**Steps:**
1. View the commission status: the status (the pending, the earned, the paid) — verify the status is the state.
2. Verify commissions are segmented by status.
3. A pending commission is paid — verify its status updates to paid in the report.
**Expected Result:** The commission status is shown — the pending, the earned, and the paid are the control.
**Priority:** High

### TC-SA-19-04-013 — Commission period: the period (the period of the commissions, e.g., the monthly, the quarterly, the annual); the report is managed
**Type:** Positive
**Covers:** 4.2 → Commission period: the period (the period of the commissions, e.g., the monthly, the quarterly, the annual); Rule: the commissions are visible (the commissions, the affiliates, the amounts, the period); the report is managed
**Preconditions:** Commission data exists across monthly, quarterly, and annual periods.
**Steps:**
1. Set the commission period: the period (the period of the commissions, e.g., the monthly, the quarterly, the annual) — verify the period is the scope.
2. Switch between monthly, quarterly, and annual — verify the commissions update for each period.
3. Verify the commissions are visible for the period.
**Expected Result:** The commission period is set — the period of the commissions (the monthly, the quarterly, the annual) is the scope; the report is managed.
**Priority:** High

### TC-SA-19-04-014 — Commission comparison: the comparison (the comparison of the commissions, the affiliates, the periods); the comparison is the insight
**Type:** Positive
**Covers:** 4.2 → Commission comparison: the comparison (the comparison of the commissions, the affiliates, the periods)
**Preconditions:** Commission data exists across multiple affiliates and periods.
**Steps:**
1. Compare the commissions: the comparison (the comparison of the commissions, the affiliates, the periods) — verify the comparison is the analysis.
2. Verify the comparison shows the commissions across the selected affiliates and periods.
3. Verify the comparison values are accurate.
**Expected Result:** The commission comparison works — the comparison of the commissions across the affiliates and periods is the insight.
**Priority:** High

### TC-SA-19-04-015 — Commission export: the export (the commissions, the format, the period); the export is the record
**Type:** Positive
**Covers:** 4.2 → Commission export: the export (the commissions, the format, the period)
**Preconditions:** Commission data exists for a period.
**Steps:**
1. Export the commissions: the export (the commissions, the format, the period).
2. Verify the export is generated in the selected format.
3. Verify the exported data matches the commission report.
**Expected Result:** The commissions are exported — the commissions in the selected format for the period are generated.
**Priority:** Medium

### TC-SA-19-04-016 — Commission reporting is audit-logged with the commission, period, and timestamp
**Type:** Positive
**Covers:** 4.2 → Audit logging of the commission reporting; Rule: commission reporting is audit-logged with the commission, period, and timestamp
**Preconditions:** Super Admin has reported the commissions.
**Steps:**
1. Open the audit trail and filter by "commission".
2. Verify entries show the commission, the period, and the timestamp.
**Expected Result:** The commission reporting is audit-logged with the commission, period, and timestamp.
**Priority:** Critical

## 4.3 Top-Performing Affiliates and Courses

### TC-SA-19-04-017 — Top affiliate: the affiliate (the affiliate, the affiliate, the name, the performance, the rank); the affiliate is the partner
**Type:** Positive
**Covers:** 4.3 → Top affiliate: the affiliate (the affiliate, the affiliate, the name, the performance, the rank); Rule: the top affiliate is the leader (the affiliate, the name, the performance, the rank); the affiliate is the partner
**Preconditions:** Performance data exists for multiple affiliates.
**Steps:**
1. View the top affiliates: the affiliate (the affiliate, the affiliate, the name, the performance, the rank) — verify the top affiliate is the leader.
2. Verify each top affiliate shows the name, the performance, and the rank.
3. Verify the ranking order matches the performance values.
**Expected Result:** The top affiliate is shown — the affiliate, the name, the performance, and the rank are the partner.
**Priority:** Critical

### TC-SA-19-04-018 — Top course: the course (the course, the course, the name, the performance, the rank); the course is the content
**Type:** Positive
**Covers:** 4.3 → Top course: the course (the course, the course, the name, the performance, the rank); Rule: the top course is the leader (the course, the name, the performance, the rank); the course is the content
**Preconditions:** Performance data exists for multiple courses.
**Steps:**
1. View the top courses: the course (the course, the course, the name, the performance, the rank) — verify the top course is the leader.
2. Verify each top course shows the name, the performance, and the rank.
3. Verify the ranking order matches the performance values.
**Expected Result:** The top course is shown — the course, the name, the performance, and the rank are the content.
**Priority:** High

### TC-SA-19-04-019 — Performance: the performance (the performance, the performance, the metric, the value); the performance is the value
**Type:** Positive
**Covers:** 4.3 → Performance: the performance (the performance, the performance, the metric, the value); Rule: the performance is the measure (the performance, the metric, the value); the performance is the value
**Preconditions:** Performance data with metrics exists.
**Steps:**
1. View the performance: the performance (the performance, the performance, the metric, the value) — verify the performance is the measure.
2. Verify each performance shows the metric and the value.
3. Verify the performance values are accurate.
**Expected Result:** The performance is shown — the performance, the metric, and the value are the value.
**Priority:** High

### TC-SA-19-04-020 — Rank: the rank (the rank of the affiliate or course, the position); the rank is the order
**Type:** Edge
**Covers:** 4.3 → Rank: the rank (the rank of the affiliate or course, the position); Rule: the rank is the position (the rank of the affiliate or course, the position); the rank is the order
**Preconditions:** Performance data exists; two affiliates with identical performance values (tie edge) also exist.
**Steps:**
1. View the rank: the rank (the rank of the affiliate or course, the position) — verify the rank is the position.
2. Verify ranks are sequential (1, 2, 3, ...) in performance order.
3. View two affiliates with identical performance — verify the tie is handled consistently (no duplicate or skipped rank).
**Expected Result:** The rank is shown — the rank of the affiliate or course and the position are the order; ties are handled consistently.
**Priority:** High

### TC-SA-19-04-021 — Performance period: the period (the period of the performance, e.g., the monthly, the quarterly, the annual); the report is managed
**Type:** Positive
**Covers:** 4.3 → Performance period: the period (the period of the performance, e.g., the monthly, the quarterly, the annual); Rule: the top performers are visible (the affiliates, the courses, the performance, the period); the report is managed
**Preconditions:** Performance data exists across monthly, quarterly, and annual periods.
**Steps:**
1. Set the performance period: the period (the period of the performance, e.g., the monthly, the quarterly, the annual) — verify the period is the scope.
2. Switch between monthly, quarterly, and annual — verify the top performers update for each period.
3. Verify the top performers are visible for the period.
**Expected Result:** The performance period is set — the period of the performance (the monthly, the quarterly, the annual) is the scope; the report is managed.
**Priority:** High

### TC-SA-19-04-022 — Performance comparison: the comparison (the comparison of the performance, the affiliates, the courses, the periods); the comparison is the insight
**Type:** Positive
**Covers:** 4.3 → Performance comparison: the comparison (the comparison of the performance, the affiliates, the courses, the periods)
**Preconditions:** Performance data exists across multiple affiliates, courses, and periods.
**Steps:**
1. Compare the performance: the comparison (the comparison of the performance, the affiliates, the courses, the periods) — verify the comparison is the analysis.
2. Verify the comparison shows the performance across the selected affiliates, courses, and periods.
3. Verify the comparison values are accurate.
**Expected Result:** The performance comparison works — the comparison of the performance across the affiliates, courses, and periods is the insight.
**Priority:** High

### TC-SA-19-04-023 — Performance export: the export (the performance, the format, the period); the export is the record
**Type:** Positive
**Covers:** 4.3 → Performance export: the export (the performance, the format, the period)
**Preconditions:** Performance data exists for a period.
**Steps:**
1. Export the performance: the export (the performance, the format, the period).
2. Verify the export is generated in the selected format.
3. Verify the exported data matches the top performer report.
**Expected Result:** The performance is exported — the performance in the selected format for the period is generated.
**Priority:** Medium

### TC-SA-19-04-024 — Top performer reporting is audit-logged with the performance, period, and timestamp
**Type:** Positive
**Covers:** 4.3 → Audit logging of the top performer reporting; Rule: top performer reporting is audit-logged with the performance, period, and timestamp
**Preconditions:** Super Admin has reported the top performers.
**Steps:**
1. Open the audit trail and filter by "top performer".
2. Verify entries show the performance, the period, and the timestamp.
**Expected Result:** The top performer reporting is audit-logged with the performance, period, and timestamp.
**Priority:** Critical
