# 4. Campaign Management — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: campaign_management.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 Create, Schedule, and Manage Campaigns | Campaign: the campaign (the campaign, the type, the content, the audience, the schedule) | TC-SA-20-04-001 |
| 4.1 Create, Schedule, and Manage Campaigns | Campaign type: the type (the type of the campaign, e.g., the email, the SMS, the in-app) | TC-SA-20-04-002 |
| 4.1 Create, Schedule, and Manage Campaigns | Campaign content: the content (the content of the campaign, the message, the offer) | TC-SA-20-04-003 |
| 4.1 Create, Schedule, and Manage Campaigns | Campaign audience: the audience (the audience of the campaign, the segment, the count) | TC-SA-20-04-004 |
| 4.1 Create, Schedule, and Manage Campaigns | Campaign schedule: the schedule (the schedule of the campaign, the date, the time) | TC-SA-20-04-005 |
| 4.1 Create, Schedule, and Manage Campaigns | Campaign status: the status (the draft, the scheduled, the active, the completed) | TC-SA-20-04-006 |
| 4.1 Create, Schedule, and Manage Campaigns | Campaign view: the view (the campaigns, the types, the content, the audiences, the schedules) | TC-SA-20-04-007 |
| 4.1 Create, Schedule, and Manage Campaigns | Audit logging of the campaign management | TC-SA-20-04-008 |
| 4.1 Create, Schedule, and Manage Campaigns | Rule: the campaign is the initiative (the campaign, the type, the content, the audience, the schedule); the campaign is the effort | TC-SA-20-04-001 |
| 4.1 Create, Schedule, and Manage Campaigns | Rule: the campaign type is the channel (the type of the campaign, e.g., the email, the SMS, the in-app); the type is the medium | TC-SA-20-04-002 |
| 4.1 Create, Schedule, and Manage Campaigns | Rule: the campaign content is the message (the content of the campaign, the message, the offer); the content is the payload | TC-SA-20-04-003 |
| 4.1 Create, Schedule, and Manage Campaigns | Rule: the campaign status is the state (the draft, the scheduled, the active, the completed); the status is the control | TC-SA-20-04-006 |
| 4.1 Create, Schedule, and Manage Campaigns | Rule: the campaign is managed (the campaigns, the types, the content, the audiences, the schedules); the control is managed | TC-SA-20-04-007 |
| 4.1 Create, Schedule, and Manage Campaigns | Rule: campaign management is audit-logged with the campaign, type, and timestamp | TC-SA-20-04-008 |
| 4.2 Target Audience Segmentation | Segment: the segment (the segment, the criteria, the users, the count) | TC-SA-20-04-009 |
| 4.2 Target Audience Segmentation | Segment criteria: the criteria (the criteria of the segment, e.g., the type, the grade, the region) | TC-SA-20-04-010 |
| 4.2 Target Audience Segmentation | Segment users: the users (the users of the segment, the count) | TC-SA-20-04-011 |
| 4.2 Target Audience Segmentation | Segment count: the count (the count of the users in the segment) | TC-SA-20-04-012 |
| 4.2 Target Audience Segmentation | Segment name: the name (the name of the segment, the label) | TC-SA-20-04-013 |
| 4.2 Target Audience Segmentation | Segment status: the status (the active, the inactive) | TC-SA-20-04-014 |
| 4.2 Target Audience Segmentation | Segment view: the view (the segments, the criteria, the users, the counts) | TC-SA-20-04-015 |
| 4.2 Target Audience Segmentation | Audit logging of the segment creation | TC-SA-20-04-016 |
| 4.2 Target Audience Segmentation | Rule: the segment is the group (the segment, the criteria, the users, the count); the segment is the slice | TC-SA-20-04-009 |
| 4.2 Target Audience Segmentation | Rule: the segment criteria are the filters (the criteria of the segment, e.g., the type, the grade, the region); the criteria are the rules | TC-SA-20-04-010 |
| 4.2 Target Audience Segmentation | Rule: the segment users are the members (the users of the segment, the count); the users are the population | TC-SA-20-04-011 |
| 4.2 Target Audience Segmentation | Rule: the segment count is the measure (the count of the users in the segment); the count is the volume | TC-SA-20-04-012 |
| 4.2 Target Audience Segmentation | Rule: the segment is created (the segments, the criteria, the users, the counts); the targeting is managed | TC-SA-20-04-015 |
| 4.2 Target Audience Segmentation | Rule: segment creation is audit-logged with the segment, criteria, and timestamp | TC-SA-20-04-016 |
| 4.3 Campaign Performance Tracking | Performance: the performance (the performance, the campaign, the metric, the value, the period) | TC-SA-20-04-017 |
| 4.3 Campaign Performance Tracking | Campaign: the campaign (the campaign, the type, the performance) | TC-SA-20-04-018 |
| 4.3 Campaign Performance Tracking | Performance metric: the metric (the metric of the performance, e.g., the open rate, the click rate, the conversion) | TC-SA-20-04-019 |
| 4.3 Campaign Performance Tracking | Performance value: the value (the value of the metric, e.g., the percentage) | TC-SA-20-04-020 |
| 4.3 Campaign Performance Tracking | Performance period: the period (the period of the performance, e.g., the daily, the weekly, the monthly) | TC-SA-20-04-021 |
| 4.3 Campaign Performance Tracking | Performance comparison: the comparison (the comparison of the performance, the campaigns, the periods) | TC-SA-20-04-022 |
| 4.3 Campaign Performance Tracking | Performance view: the view (the performance, the campaigns, the metrics, the values, the period) | TC-SA-20-04-023 |
| 4.3 Campaign Performance Tracking | Audit logging of the performance tracking | TC-SA-20-04-024 |
| 4.3 Campaign Performance Tracking | Rule: the performance is the outcome (the performance, the campaign, the metric, the value, the period); the performance is the result | TC-SA-20-04-017 |
| 4.3 Campaign Performance Tracking | Rule: the campaign is the initiative (the campaign, the type, the performance); the campaign is the effort | TC-SA-20-04-018 |
| 4.3 Campaign Performance Tracking | Rule: the performance metric is the measure (the metric of the performance, e.g., the open rate, the click rate, the conversion); the metric is the value | TC-SA-20-04-019 |
| 4.3 Campaign Performance Tracking | Rule: the performance comparison is the analysis (the comparison of the performance, the campaigns, the periods); the comparison is the insight | TC-SA-20-04-022 |
| 4.3 Campaign Performance Tracking | Rule: the performance is visible (the performance, the campaigns, the metrics, the values, the period); the tracking is managed | TC-SA-20-04-023 |
| 4.3 Campaign Performance Tracking | Rule: performance tracking is audit-logged with the performance, campaign, and timestamp | TC-SA-20-04-024 |

## 4.1 Create, Schedule, and Manage Campaigns

### TC-SA-20-04-001 — Campaign: the campaign (the campaign, the type, the content, the audience, the schedule); the campaign is the effort
**Type:** Positive
**Covers:** 4.1 → Campaign: the campaign (the campaign, the type, the content, the audience, the schedule); Rule: the campaign is the initiative (the campaign, the type, the content, the audience, the schedule); the campaign is the effort
**Preconditions:** Super Admin is logged in.
**Steps:**
1. Open Marketing & Communication → Campaign Management → Create, Schedule, and Manage Campaigns.
2. Create the campaign: the campaign (the campaign, the type, the content, the audience, the schedule) — verify the campaign is the initiative.
3. Verify the campaign shows the type, the content, the audience, and the schedule.
4. Save the campaign — verify it appears in the campaign list.
**Expected Result:** The campaign is created — the campaign, the type, the content, the audience, and the schedule are the effort.
**Priority:** Critical

### TC-SA-20-04-002 — Campaign type: the type (the type of the campaign, e.g., the email, the SMS, the in-app); the type is the medium
**Type:** Positive
**Covers:** 4.1 → Campaign type: the type (the type of the campaign, e.g., the email, the SMS, the in-app); Rule: the campaign type is the channel (the type of the campaign, e.g., the email, the SMS, the in-app); the type is the medium
**Preconditions:** A campaign is being created.
**Steps:**
1. Select the campaign type: the type (the type of the campaign, e.g., the email, the SMS, the in-app) — verify the campaign type is the channel.
2. Verify each type (email, SMS, in-app) is selectable.
3. Verify the campaign delivers through the selected channel only.
**Expected Result:** The campaign type is selected — the type of the campaign (the email, the SMS, the in-app) is the medium.
**Priority:** High

### TC-SA-20-04-003 — Campaign content: the content (the content of the campaign, the message, the offer); the content is the payload
**Type:** Positive
**Covers:** 4.1 → Campaign content: the content (the content of the campaign, the message, the offer); Rule: the campaign content is the message (the content of the campaign, the message, the offer); the content is the payload
**Preconditions:** A campaign is being created.
**Steps:**
1. Create the campaign content: the content (the content of the campaign, the message, the offer) — verify the campaign content is the message.
2. Verify the content shows the message and the offer.
3. Verify the content renders correctly in the selected channel.
**Expected Result:** The campaign content is created — the content of the campaign, the message, and the offer are the payload.
**Priority:** High

### TC-SA-20-04-004 — Campaign audience: the audience (the audience of the campaign, the segment, the count); the audience is the target
**Type:** Positive
**Covers:** 4.1 → Campaign audience: the audience (the audience of the campaign, the segment, the count)
**Preconditions:** A campaign is being created; audience segments exist.
**Steps:**
1. Select the campaign audience: the audience (the audience of the campaign, the segment, the count) — verify the audience is the target.
2. Verify the audience shows the segment and the count.
3. Verify the campaign reaches only the selected audience.
**Expected Result:** The campaign audience is selected — the audience of the campaign, the segment, and the count are the target.
**Priority:** High

### TC-SA-20-04-005 — Campaign schedule: the schedule (the schedule of the campaign, the date, the time); the schedule is the timing
**Type:** Positive
**Covers:** 4.1 → Campaign schedule: the schedule (the schedule of the campaign, the date, the time)
**Preconditions:** A campaign is being created.
**Steps:**
1. Set the campaign schedule: the schedule (the schedule of the campaign, the date, the time) — verify the campaign schedule is the timing.
2. Verify the campaign is not sent before the schedule date/time.
3. Wait for the schedule — verify the campaign starts at the exact date and time.
**Expected Result:** The campaign schedule is set — the schedule of the campaign, the date, and the time are the timing.
**Priority:** High

### TC-SA-20-04-006 — Campaign status: the status (the draft, the scheduled, the active, the completed); the status is the control
**Type:** Edge
**Covers:** 4.1 → Campaign status: the status (the draft, the scheduled, the active, the completed); Rule: the campaign status is the state (the draft, the scheduled, the active, the completed); the status is the control
**Preconditions:** Campaigns in draft, scheduled, active, and completed states exist; an invalid transition (e.g., draft → completed) is attempted (transition edge).
**Steps:**
1. View the campaign status: the status (the draft, the scheduled, the active, the completed) — verify the campaign status is the state.
2. Move a campaign through draft → scheduled → active → completed — verify each transition is correct.
3. Attempt an invalid transition (draft → completed) — verify it is blocked with a clear error.
**Expected Result:** The campaign status is shown — the draft, the scheduled, the active, and the completed are the control; invalid transitions are blocked.
**Priority:** High

### TC-SA-20-04-007 — Campaign view: the view (the campaigns, the types, the content, the audiences, the schedules); the control is managed
**Type:** Positive
**Covers:** 4.1 → Campaign view: the view (the campaigns, the types, the content, the audiences, the schedules); Rule: the campaign is managed (the campaigns, the types, the content, the audiences, the schedules); the control is managed
**Preconditions:** Multiple campaigns of different types exist.
**Steps:**
1. View the campaigns: the view (the campaigns, the types, the content, the audiences, the schedules) — verify the campaign is managed.
2. Verify each campaign shows the type, the content, the audience, and the schedule.
3. Verify the control is managed (create, edit, schedule, pause, complete).
**Expected Result:** The campaigns are viewed — the campaigns, the types, the content, the audiences, and the schedules are visible; the control is managed.
**Priority:** High

### TC-SA-20-04-008 — Campaign management is audit-logged with the campaign, type, and timestamp
**Type:** Positive
**Covers:** 4.1 → Audit logging of the campaign management; Rule: campaign management is audit-logged with the campaign, type, and timestamp
**Preconditions:** Super Admin has managed a campaign (created, scheduled, completed).
**Steps:**
1. Open the audit trail and filter by "campaign".
2. Verify entries show the campaign, the type, and the timestamp for each management action.
**Expected Result:** The campaign management is audit-logged with the campaign, type, and timestamp.
**Priority:** Critical

## 4.2 Target Audience Segmentation

### TC-SA-20-04-009 — Segment: the segment (the segment, the criteria, the users, the count); the segment is the slice
**Type:** Positive
**Covers:** 4.2 → Segment: the segment (the segment, the criteria, the users, the count); Rule: the segment is the group (the segment, the criteria, the users, the count); the segment is the slice
**Preconditions:** Super Admin is logged in; users with varying attributes exist.
**Steps:**
1. Open Marketing & Communication → Campaign Management → Target Audience Segmentation.
2. Create the segment: the segment (the segment, the criteria, the users, the count) — verify the segment is the group.
3. Verify the segment shows the criteria, the users, and the count.
4. Save the segment — verify it appears in the segment list.
**Expected Result:** The segment is created — the segment, the criteria, the users, and the count are the slice.
**Priority:** Critical

### TC-SA-20-04-010 — Segment criteria: the criteria (the criteria of the segment, e.g., the type, the grade, the region); the criteria are the rules
**Type:** Positive
**Covers:** 4.2 → Segment criteria: the criteria (the criteria of the segment, e.g., the type, the grade, the region); Rule: the segment criteria are the filters (the criteria of the segment, e.g., the type, the grade, the region); the criteria are the rules
**Preconditions:** A segment is being created.
**Steps:**
1. Set the segment criteria: the criteria (the criteria of the segment, e.g., the type, the grade, the region) — verify the segment criteria are the filters.
2. Verify each criterion (type, grade, region) is selectable.
3. Verify only users matching all criteria are included in the segment.
**Expected Result:** The segment criteria are set — the criteria of the segment (the type, the grade, the region) are the rules.
**Priority:** High

### TC-SA-20-04-011 — Segment users: the users (the users of the segment, the count); the users are the population
**Type:** Positive
**Covers:** 4.2 → Segment users: the users (the users of the segment, the count); Rule: the segment users are the members (the users of the segment, the count); the users are the population
**Preconditions:** A segment with criteria has been created.
**Steps:**
1. View the segment users: the users (the users of the segment, the count) — verify the segment users are the members.
2. Verify each user in the segment matches the segment criteria.
3. Verify a user who no longer matches the criteria is removed from the segment.
**Expected Result:** The segment users are shown — the users of the segment and the count are the population.
**Priority:** High

### TC-SA-20-04-012 — Segment count: the count (the count of the users in the segment); the count is the volume
**Type:** Edge
**Covers:** 4.2 → Segment count: the count (the count of the users in the segment); Rule: the segment count is the measure (the count of the users in the segment); the count is the volume
**Preconditions:** A segment with users exists; a segment whose criteria match zero users (empty edge) is also created.
**Steps:**
1. View the segment count: the count (the count of the users in the segment) — verify the segment count is the measure.
2. Verify the count equals the actual number of users in the segment.
3. View the empty segment — verify the count shows 0 (no error, no negative count).
**Expected Result:** The segment count is shown — the count of the users in the segment is the volume; an empty segment shows 0.
**Priority:** High

### TC-SA-20-04-013 — Segment name: the name (the name of the segment, the label); the name is the identifier
**Type:** Positive
**Covers:** 4.2 → Segment name: the name (the name of the segment, the label)
**Preconditions:** A segment is being created.
**Steps:**
1. Name the segment: the name (the name of the segment, the label) — verify the segment name is the identifier.
2. Verify the name is shown in the segment list.
3. Create a second segment with the same name — verify the duplicate is handled (blocked or clearly distinguished).
**Expected Result:** The segment name is set — the name of the segment and the label are the identifier.
**Priority:** High

### TC-SA-20-04-014 — Segment status: the status (the active, the inactive); the status is the state
**Type:** Positive
**Covers:** 4.2 → Segment status: the status (the active, the inactive)
**Preconditions:** Segments with active and inactive statuses exist.
**Steps:**
1. View the segment status: the status (the active, the inactive) — verify the segment status is the state.
2. Deactivate a segment — verify it cannot be targeted by new campaigns.
3. Reactivate it — verify it can be targeted again.
**Expected Result:** The segment status is shown — the active and the inactive are the state.
**Priority:** High

### TC-SA-20-04-015 — Segment view: the view (the segments, the criteria, the users, the counts); the targeting is managed
**Type:** Positive
**Covers:** 4.2 → Segment view: the view (the segments, the criteria, the users, the counts); Rule: the segment is created (the segments, the criteria, the users, the counts); the targeting is managed
**Preconditions:** Multiple segments exist.
**Steps:**
1. View the segments: the view (the segments, the criteria, the users, the counts) — verify the segment is created.
2. Verify each segment shows the criteria, the users, and the count.
3. Verify the targeting is managed (create, edit, deactivate).
**Expected Result:** The segments are viewed — the segments, the criteria, the users, and the counts are visible; the targeting is managed.
**Priority:** High

### TC-SA-20-04-016 — Segment creation is audit-logged with the segment, criteria, and timestamp
**Type:** Positive
**Covers:** 4.2 → Audit logging of the segment creation; Rule: segment creation is audit-logged with the segment, criteria, and timestamp
**Preconditions:** Super Admin has created a segment.
**Steps:**
1. Open the audit trail and filter by "segment".
2. Verify entries show the segment, the criteria, and the timestamp.
**Expected Result:** The segment creation is audit-logged with the segment, criteria, and timestamp.
**Priority:** Critical

## 4.3 Campaign Performance Tracking

### TC-SA-20-04-017 — Performance: the performance (the performance, the campaign, the metric, the value, the period); the performance is the result
**Type:** Positive
**Covers:** 4.3 → Performance: the performance (the performance, the campaign, the metric, the value, the period); Rule: the performance is the outcome (the performance, the campaign, the metric, the value, the period); the performance is the result
**Preconditions:** Super Admin is logged in; campaigns with recorded performance exist.
**Steps:**
1. Open Marketing & Communication → Campaign Management → Campaign Performance Tracking.
2. Track the performance: the performance (the performance, the campaign, the metric, the value, the period) — verify the performance is the outcome.
3. Verify the performance shows the campaign, the metric, the value, and the period.
4. A campaign runs — verify its performance is recorded.
**Expected Result:** The performance is tracked — the performance, the campaign, the metric, the value, and the period are the result.
**Priority:** Critical

### TC-SA-20-04-018 — Campaign: the campaign (the campaign, the type, the performance); the campaign is the effort
**Type:** Positive
**Covers:** 4.3 → Campaign: the campaign (the campaign, the type, the performance); Rule: the campaign is the initiative (the campaign, the type, the performance); the campaign is the effort
**Preconditions:** Multiple campaigns with performance data exist.
**Steps:**
1. Select the campaigns: the campaign (the campaign, the type, the performance) — verify the campaign is the initiative.
2. Verify each campaign shows the type and the performance.
3. Verify performance is tracked per campaign type (email, SMS, in-app).
**Expected Result:** The campaigns are selected — the campaign, the type, and the performance are the effort.
**Priority:** High

### TC-SA-20-04-019 — Performance metric: the metric (the metric of the performance, e.g., the open rate, the click rate, the conversion); the metric is the value
**Type:** Positive
**Covers:** 4.3 → Performance metric: the metric (the metric of the performance, e.g., the open rate, the click rate, the conversion); Rule: the performance metric is the measure (the metric of the performance, e.g., the open rate, the click rate, the conversion); the metric is the value
**Preconditions:** Campaigns with open rate, click rate, and conversion data exist.
**Steps:**
1. View the performance metric: the metric (the metric of the performance, e.g., the open rate, the click rate, the conversion) — verify the performance metric is the measure.
2. Verify each metric (open rate, click rate, conversion) is shown.
3. Verify the metric values are calculated correctly from the underlying data.
**Expected Result:** The performance metric is shown — the metric of the performance (the open rate, the click rate, the conversion) is the value.
**Priority:** High

### TC-SA-20-04-020 — Performance value: the value (the value of the metric, e.g., the percentage); the value is the result
**Type:** Positive
**Covers:** 4.3 → Performance value: the value (the value of the metric, e.g., the percentage)
**Preconditions:** Campaigns with recorded metric values exist.
**Steps:**
1. View the performance value: the value (the value of the metric, e.g., the percentage) — verify the performance value is the result.
2. Verify the value is shown as a percentage where applicable.
3. Verify the value matches the raw data (spot-check one campaign).
**Expected Result:** The performance value is shown — the value of the metric (the percentage) is the result.
**Priority:** High

### TC-SA-20-04-021 — Performance period: the period (the period of the performance, e.g., the daily, the weekly, the monthly); the period is the scope
**Type:** Positive
**Covers:** 4.3 → Performance period: the period (the period of the performance, e.g., the daily, the weekly, the monthly)
**Preconditions:** Campaign performance data spans multiple days, weeks, and months.
**Steps:**
1. Set the performance period: the period (the period of the performance, e.g., the daily, the weekly, the monthly) — verify the performance period is the scope.
2. Switch between daily, weekly, and monthly — verify the values aggregate correctly per period.
3. Verify the period filter changes the displayed values.
**Expected Result:** The performance period is set — the period of the performance (the daily, the weekly, the monthly) is the scope.
**Priority:** High

### TC-SA-20-04-022 — Performance comparison: the comparison (the comparison of the performance, the campaigns, the periods); the comparison is the insight
**Type:** Edge
**Covers:** 4.3 → Performance comparison: the comparison (the comparison of the performance, the campaigns, the periods); Rule: the performance comparison is the analysis (the comparison of the performance, the campaigns, the periods); the comparison is the insight
**Preconditions:** Multiple campaigns with performance data exist; a comparison between two campaigns with identical metrics (tie edge) is also prepared.
**Steps:**
1. Compare the performance: the comparison (the comparison of the performance, the campaigns, the periods) — verify the performance comparison is the analysis.
2. Compare two campaigns over the same period — verify the comparison shows both campaigns' metrics side by side.
3. Compare the tied campaigns — verify the tie is displayed correctly (equal values, no error).
**Expected Result:** The performance comparison is shown — the comparison of the performance, the campaigns, and the periods are the insight; ties are handled.
**Priority:** High

### TC-SA-20-04-023 — Performance view: the view (the performance, the campaigns, the metrics, the values, the period); the tracking is managed
**Type:** Positive
**Covers:** 4.3 → Performance view: the view (the performance, the campaigns, the metrics, the values, the period); Rule: the performance is visible (the performance, the campaigns, the metrics, the values, the period); the tracking is managed
**Preconditions:** Multiple campaigns with performance data exist.
**Steps:**
1. View the performance: the view (the performance, the campaigns, the metrics, the values, the period) — verify the performance is visible.
2. Verify the view shows the campaigns, the metrics, the values, and the period.
3. Verify the tracking is managed (filter, sort, export).
**Expected Result:** The performance is viewed — the performance, the campaigns, the metrics, the values, and the period are visible; the tracking is managed.
**Priority:** High

### TC-SA-20-04-024 — Performance tracking is audit-logged with the performance, campaign, and timestamp
**Type:** Positive
**Covers:** 4.3 → Audit logging of the performance tracking; Rule: performance tracking is audit-logged with the performance, campaign, and timestamp
**Preconditions:** Super Admin has viewed/tracked campaign performance.
**Steps:**
1. Open the audit trail and filter by "performance".
2. Verify entries show the performance, the campaign, and the timestamp.
**Expected Result:** The performance tracking is audit-logged with the performance, campaign, and timestamp.
**Priority:** Critical
