# 5. Campaign Analytics — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: campaign_analytics.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 Track Redemptions per Code | Redemption tracking: the tracking (the code, the redemptions, the period) | TC-SA-13-05-001 |
| 5.1 Track Redemptions per Code | Redemption scope: the scope (the code, the redemptions) | TC-SA-13-05-002 |
| 5.1 Track Redemptions per Code | Redemption count: the count (the number of redemptions per code) | TC-SA-13-05-003 |
| 5.1 Track Redemptions per Code | Redemption period: the period (the period of the redemptions) | TC-SA-13-05-004 |
| 5.1 Track Redemptions per Code | Redemption view: the view (the redemptions per code, per period) | TC-SA-13-05-005 |
| 5.1 Track Redemptions per Code | Redemption record: the redemptions recorded (the code, the redemptions, the period) | TC-SA-13-05-006 |
| 5.1 Track Redemptions per Code | Audit logging of the redemption tracking | TC-SA-13-05-007 |
| 5.1 Track Redemptions per Code | Rule: the redemption tracking is explicit (the code, the redemptions, the period); the tracking is the visibility | TC-SA-13-05-001 |
| 5.1 Track Redemptions per Code | Rule: the redemption scope is the code and the redemptions; the scope is the control | TC-SA-13-05-002 |
| 5.1 Track Redemptions per Code | Rule: the redemption count is the metric (the number of redemptions per code); the count is the measure | TC-SA-13-05-003 |
| 5.1 Track Redemptions per Code | Rule: the redemption period is the timing (the period of the redemptions); the period is the context | TC-SA-13-05-004 |
| 5.1 Track Redemptions per Code | Rule: the redemptions are visible (the redemptions per code, per period); the tracking is managed | TC-SA-13-05-005 |
| 5.1 Track Redemptions per Code | Rule: redemption tracking is audit-logged with the code, redemptions, and timestamp | TC-SA-13-05-007 |
| 5.2 Measure Campaign Performance | Performance measurement: the measurement (the campaign, the reach, the engagement, the conversion, the revenue) | TC-SA-13-05-008 |
| 5.2 Measure Campaign Performance | Performance scope: the scope (the campaign, the performance) | TC-SA-13-05-009 |
| 5.2 Measure Campaign Performance | Reach metric: the reach (the number of users reached) | TC-SA-13-05-010 |
| 5.2 Measure Campaign Performance | Engagement metric: the engagement (the clicks, the opens) | TC-SA-13-05-011 |
| 5.2 Measure Campaign Performance | Conversion metric: the conversion (the enrollments, the redemptions) | TC-SA-13-05-012 |
| 5.2 Measure Campaign Performance | Revenue metric: the revenue (the revenue per campaign) | TC-SA-13-05-013 |
| 5.2 Measure Campaign Performance | Audit logging of the performance measurement | TC-SA-13-05-014 |
| 5.2 Measure Campaign Performance | Rule: the performance measurement is explicit (the campaign, the reach, the engagement, the conversion, the revenue); the measurement is the visibility | TC-SA-13-05-008 |
| 5.2 Measure Campaign Performance | Rule: the performance scope is the campaign and the performance; the scope is the control | TC-SA-13-05-009 |
| 5.2 Measure Campaign Performance | Rule: the reach metric is the audience (the number of users reached); the reach is the measure | TC-SA-13-05-010 |
| 5.2 Measure Campaign Performance | Rule: the engagement metric is the interaction (the clicks, the opens); the engagement is the measure | TC-SA-13-05-011 |
| 5.2 Measure Campaign Performance | Rule: the conversion metric is the outcome (the enrollments, the redemptions); the conversion is the measure | TC-SA-13-05-012 |
| 5.2 Measure Campaign Performance | Rule: performance measurement is audit-logged with the campaign, metrics, and timestamp | TC-SA-13-05-014 |
| 5.3 Revenue Attribution to Promotions | Revenue attribution: the attribution (the promotion, the revenue, the contribution) | TC-SA-13-05-015 |
| 5.3 Revenue Attribution to Promotions | Attribution scope: the scope (the promotion, the revenue) | TC-SA-13-05-016 |
| 5.3 Revenue Attribution to Promotions | Revenue per promotion: the revenue (the revenue per promotion) | TC-SA-13-05-017 |
| 5.3 Revenue Attribution to Promotions | Contribution metric: the contribution (the promotion's contribution to the revenue) | TC-SA-13-05-018 |
| 5.3 Revenue Attribution to Promotions | Attribution view: the view (the revenue per promotion, per period) | TC-SA-13-05-019 |
| 5.3 Revenue Attribution to Promotions | Attribution record: the attribution recorded (the promotion, the revenue, the contribution) | TC-SA-13-05-020 |
| 5.3 Revenue Attribution to Promotions | Audit logging of the revenue attribution | TC-SA-13-05-021 |
| 5.3 Revenue Attribution to Promotions | Rule: the revenue attribution is explicit (the promotion, the revenue, the contribution); the attribution is the visibility | TC-SA-13-05-015 |
| 5.3 Revenue Attribution to Promotions | Rule: the attribution scope is the promotion and the revenue; the scope is the control | TC-SA-13-05-016 |
| 5.3 Revenue Attribution to Promotions | Rule: the revenue per promotion is the value (the revenue per promotion); the revenue is the measure | TC-SA-13-05-017 |
| 5.3 Revenue Attribution to Promotions | Rule: the contribution metric is the share (the promotion's contribution to the revenue); the contribution is the measure | TC-SA-13-05-018 |
| 5.3 Revenue Attribution to Promotions | Rule: the attribution is visible (the revenue per promotion, per period); the attribution is managed | TC-SA-13-05-019 |
| 5.3 Revenue Attribution to Promotions | Rule: revenue attribution is audit-logged with the promotion, revenue, and timestamp | TC-SA-13-05-021 |

## 5.1 Track Redemptions per Code

### TC-SA-13-05-001 — Redemption tracking: the tracking (the code, the redemptions, the period); the tracking is the visibility
**Type:** Positive
**Covers:** 5.1 → Redemption tracking: the tracking (the code, the redemptions, the period); Rule: the redemption tracking is explicit (the code, the redemptions, the period); the tracking is the visibility
**Preconditions:** Discount codes have been redeemed.
**Steps:**
1. View the redemptions per code: the codes (the discount codes), the redemptions (the number of redemptions per code), and the period (the period of the redemptions).
2. Verify the redemptions are explicit and visible.
**Expected Result:** The redemptions per code are tracked — the code, the redemptions, and the period are visible.
**Priority:** Critical

### TC-SA-13-05-002 — Redemption scope: the scope (the code, the redemptions); the scope is the control
**Type:** Positive
**Covers:** 5.1 → Redemption scope: the scope (the code, the redemptions); Rule: the redemption scope is the code and the redemptions; the scope is the control
**Preconditions:** The redemption tracking is available.
**Steps:**
1. Open the redemption scope.
2. Verify the scope is the code and the redemptions.
3. Verify the scope is the control for the tracking.
**Expected Result:** The redemption scope is the code and the redemptions — the scope is the control.
**Priority:** Medium

### TC-SA-13-05-003 — Redemption count: the count (the number of redemptions per code); the count is the measure
**Type:** Positive
**Covers:** 5.1 → Redemption count: the count (the number of redemptions per code); Rule: the redemption count is the metric (the number of redemptions per code); the count is the measure
**Preconditions:** A discount code has been redeemed multiple times.
**Steps:**
1. View the redemption count for the code.
2. Verify the number of redemptions per code is shown.
3. Verify the count matches the actual redemptions.
**Expected Result:** The redemption count shows the number of redemptions per code — the count is the measure.
**Priority:** High

### TC-SA-13-05-004 — Redemption period: the period (the period of the redemptions); the period is the context
**Type:** Positive
**Covers:** 5.1 → Redemption period: the period (the period of the redemptions); Rule: the redemption period is the timing (the period of the redemptions); the period is the context
**Preconditions:** Redemptions have occurred across multiple periods.
**Steps:**
1. View the redemption period.
2. Verify the period of the redemptions is shown.
3. Verify the period is the context for the redemptions.
**Expected Result:** The redemption period is the period of the redemptions — the period is the context.
**Priority:** High

### TC-SA-13-05-005 — Redemption view: the view (the redemptions per code, per period); the redemptions are visible and the tracking is managed
**Type:** Positive
**Covers:** 5.1 → Redemption view: the view (the redemptions per code, per period); Rule: the redemptions are visible (the redemptions per code, per period); the tracking is managed
**Preconditions:** Multiple discount codes have redemptions.
**Steps:**
1. Open the redemption view.
2. Verify the redemptions per code and per period are visible.
3. For a specific discount code, view the code's redemptions (the count, the period, the trend).
4. Verify the tracking is managed.
**Expected Result:** The redemptions are visible — the redemptions per code and per period are shown.
**Priority:** High

### TC-SA-13-05-006 — Redemption record: the redemptions recorded (the code, the redemptions, the period); the export is the record
**Type:** Positive
**Covers:** 5.1 → Redemption record: the redemptions recorded (the code, the redemptions, the period)
**Preconditions:** Redemptions have been tracked.
**Steps:**
1. Open the redemption record.
2. Verify it shows the code, the redemptions, and the period.
3. Export the redemptions (the redemption report, the period) and verify the export is the record.
**Expected Result:** The redemptions are recorded — the code, the redemptions, and the period are shown and exportable.
**Priority:** High

### TC-SA-13-05-007 — Redemption tracking is audit-logged with the code, redemptions, and timestamp
**Type:** Positive
**Covers:** 5.1 → Audit logging of the redemption tracking; Rule: redemption tracking is audit-logged with the code, redemptions, and timestamp
**Preconditions:** Redemption tracking events have occurred.
**Steps:**
1. Open the audit trail and filter by "redemption tracking".
2. Verify entries show the code, the redemptions, and the timestamp.
**Expected Result:** The redemption tracking is audit-logged with the code, redemptions, and timestamp.
**Priority:** Critical

## 5.2 Measure Campaign Performance

### TC-SA-13-05-008 — Performance measurement: the measurement (the campaign, the reach, the engagement, the conversion, the revenue); the measurement is the visibility
**Type:** Positive
**Covers:** 5.2 → Performance measurement: the measurement (the campaign, the reach, the engagement, the conversion, the revenue); Rule: the performance measurement is explicit (the campaign, the reach, the engagement, the conversion, the revenue); the measurement is the visibility
**Preconditions:** Promotional campaigns have run with performance data.
**Steps:**
1. View the campaign performance: the campaigns (the promotional campaigns), the reach (the number of users reached), the engagement (the clicks, the opens), the conversion (the enrollments, the redemptions), and the revenue (the revenue per campaign).
2. Verify the performance is explicit and visible.
**Expected Result:** The campaign performance is measured — the campaign, the reach, the engagement, the conversion, and the revenue are visible.
**Priority:** Critical

### TC-SA-13-05-009 — Performance scope: the scope (the campaign, the performance); the scope is the control
**Type:** Positive
**Covers:** 5.2 → Performance scope: the scope (the campaign, the performance); Rule: the performance scope is the campaign and the performance; the scope is the control
**Preconditions:** The performance measurement is available.
**Steps:**
1. Open the performance scope.
2. Verify the scope is the campaign and the performance.
3. Verify the scope is the control for the measurement.
**Expected Result:** The performance scope is the campaign and the performance — the scope is the control.
**Priority:** Medium

### TC-SA-13-05-010 — Reach metric: the reach (the number of users reached); the reach is the measure
**Type:** Positive
**Covers:** 5.2 → Reach metric: the reach (the number of users reached); Rule: the reach metric is the audience (the number of users reached); the reach is the measure
**Preconditions:** A campaign has reached users.
**Steps:**
1. View the reach metric for the campaign.
2. Verify the number of users reached is shown.
3. Verify the reach is the audience measure.
**Expected Result:** The reach metric shows the number of users reached — the reach is the measure.
**Priority:** High

### TC-SA-13-05-011 — Engagement metric: the engagement (the clicks, the opens); the engagement is the measure
**Type:** Positive
**Covers:** 5.2 → Engagement metric: the engagement (the clicks, the opens); Rule: the engagement metric is the interaction (the clicks, the opens); the engagement is the measure
**Preconditions:** A campaign has generated engagement (clicks, opens).
**Steps:**
1. View the engagement metric for the campaign.
2. Verify the clicks and the opens are shown.
3. Verify the engagement is the interaction measure.
**Expected Result:** The engagement metric shows the clicks and the opens — the engagement is the measure.
**Priority:** High

### TC-SA-13-05-012 — Conversion metric: the conversion (the enrollments, the redemptions); the conversion is the measure
**Type:** Positive
**Covers:** 5.2 → Conversion metric: the conversion (the enrollments, the redemptions); Rule: the conversion metric is the outcome (the enrollments, the redemptions); the conversion is the measure
**Preconditions:** A campaign has generated conversions (enrollments, redemptions).
**Steps:**
1. View the conversion metric for the campaign.
2. Verify the enrollments and the redemptions are shown.
3. Verify the conversion is the outcome measure.
**Expected Result:** The conversion metric shows the enrollments and the redemptions — the conversion is the measure.
**Priority:** High

### TC-SA-13-05-013 — Revenue metric: the revenue (the revenue per campaign); the revenue is the value
**Type:** Positive
**Covers:** 5.2 → Revenue metric: the revenue (the revenue per campaign)
**Preconditions:** A campaign has generated revenue.
**Steps:**
1. View the revenue metric for the campaign.
2. Verify the revenue per campaign is shown.
3. Verify the revenue is the value measure.
**Expected Result:** The revenue metric shows the revenue per campaign — the revenue is the value.
**Priority:** High

### TC-SA-13-05-014 — Performance measurement is audit-logged with the campaign, metrics, and timestamp
**Type:** Positive
**Covers:** 5.2 → Audit logging of the performance measurement; Rule: performance measurement is audit-logged with the campaign, metrics, and timestamp
**Preconditions:** Performance measurement events have occurred.
**Steps:**
1. Open the audit trail and filter by "campaign performance".
2. Verify entries show the campaign, the metrics, and the timestamp.
3. Export the performance (the performance report, the period) and verify the export is the record.
**Expected Result:** The performance measurement is audit-logged with the campaign, metrics, and timestamp.
**Priority:** Critical

## 5.3 Revenue Attribution to Promotions

### TC-SA-13-05-015 — Revenue attribution: the attribution (the promotion, the revenue, the contribution); the attribution is the visibility
**Type:** Positive
**Covers:** 5.3 → Revenue attribution: the attribution (the promotion, the revenue, the contribution); Rule: the revenue attribution is explicit (the promotion, the revenue, the contribution); the attribution is the visibility
**Preconditions:** Promotions (campaigns, discount codes) have generated revenue.
**Steps:**
1. View the revenue attribution: the promotions (the promotional campaigns, the discount codes), the revenue (the revenue per promotion), and the contribution (the promotion's contribution to the revenue).
2. Verify the attribution is explicit and visible.
**Expected Result:** The revenue attribution is shown — the promotion, the revenue, and the contribution are visible.
**Priority:** Critical

### TC-SA-13-05-016 — Attribution scope: the scope (the promotion, the revenue); the scope is the control
**Type:** Positive
**Covers:** 5.3 → Attribution scope: the scope (the promotion, the revenue); Rule: the attribution scope is the promotion and the revenue; the scope is the control
**Preconditions:** The revenue attribution is available.
**Steps:**
1. Open the attribution scope.
2. Verify the scope is the promotion and the revenue.
3. Verify the scope is the control for the attribution.
**Expected Result:** The attribution scope is the promotion and the revenue — the scope is the control.
**Priority:** Medium

### TC-SA-13-05-017 — Revenue per promotion: the revenue (the revenue per promotion); the revenue is the measure
**Type:** Positive
**Covers:** 5.3 → Revenue per promotion: the revenue (the revenue per promotion); Rule: the revenue per promotion is the value (the revenue per promotion); the revenue is the measure
**Preconditions:** A promotion has generated revenue.
**Steps:**
1. View the revenue per promotion.
2. Verify the revenue per promotion is shown.
3. Verify the revenue is the value measure.
**Expected Result:** The revenue per promotion is shown — the revenue is the measure.
**Priority:** High

### TC-SA-13-05-018 — Contribution metric: the contribution (the promotion's contribution to the revenue); the contribution is the measure
**Type:** Positive
**Covers:** 5.3 → Contribution metric: the contribution (the promotion's contribution to the revenue); Rule: the contribution metric is the share (the promotion's contribution to the revenue); the contribution is the measure
**Preconditions:** Multiple promotions have generated revenue.
**Steps:**
1. View the contribution metric.
2. Verify the promotion's contribution to the revenue (the share) is shown.
3. Verify the contribution is the share measure.
**Expected Result:** The contribution metric shows the promotion's contribution to the revenue — the contribution is the measure.
**Priority:** High

### TC-SA-13-05-019 — Attribution view: the view (the revenue per promotion, per period); the attribution is visible and the attribution is managed
**Type:** Positive
**Covers:** 5.3 → Attribution view: the view (the revenue per promotion, per period); Rule: the attribution is visible (the revenue per promotion, per period); the attribution is managed
**Preconditions:** Multiple promotions have revenue across periods.
**Steps:**
1. Open the attribution view.
2. Verify the revenue per promotion and per period is visible.
3. For a specific promotion (a specific campaign, a specific code), view the promotion's revenue (the revenue, the contribution, the period).
4. Verify the attribution is managed.
**Expected Result:** The attribution is visible — the revenue per promotion and per period is shown.
**Priority:** High

### TC-SA-13-05-020 — Attribution record: the attribution recorded (the promotion, the revenue, the contribution); the export is the record
**Type:** Positive
**Covers:** 5.3 → Attribution record: the attribution recorded (the promotion, the revenue, the contribution)
**Preconditions:** Revenue attribution has been tracked.
**Steps:**
1. Open the attribution record.
2. Verify it shows the promotion, the revenue, and the contribution.
3. Export the attribution (the attribution report, the period) and verify the export is the record.
**Expected Result:** The attribution is recorded — the promotion, the revenue, and the contribution are shown and exportable.
**Priority:** High

### TC-SA-13-05-021 — Revenue attribution is audit-logged with the promotion, revenue, and timestamp
**Type:** Positive
**Covers:** 5.3 → Audit logging of the revenue attribution; Rule: revenue attribution is audit-logged with the promotion, revenue, and timestamp
**Preconditions:** Revenue attribution events have occurred.
**Steps:**
1. Open the audit trail and filter by "revenue attribution".
2. Verify entries show the promotion, the revenue, and the timestamp.
**Expected Result:** The revenue attribution is audit-logged with the promotion, revenue, and timestamp.
**Priority:** Critical
