# 3. Scalability Management — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: scalability_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 |
|---------|--------------------|----------|
| 3.1 Auto-scaling for Traffic Spikes | Scaling | TC-SA-24-03-001 |
| 3.1 Auto-scaling for Traffic Spikes | Traffic | TC-SA-24-03-002 |
| 3.1 Auto-scaling for Traffic Spikes | Capacity | TC-SA-24-03-003 |
| 3.1 Auto-scaling for Traffic Spikes | Scaling trigger | TC-SA-24-03-004 |
| 3.1 Auto-scaling for Traffic Spikes | Scaling status | TC-SA-24-03-005 |
| 3.1 Auto-scaling for Traffic Spikes | Scaling count | TC-SA-24-03-006 |
| 3.1 Auto-scaling for Traffic Spikes | Scaling view | TC-SA-24-03-007 |
| 3.1 Auto-scaling for Traffic Spikes | Audit logging of the auto-scaling configuration | TC-SA-24-03-008 |
| 3.1 Auto-scaling for Traffic Spikes | Rule: the scaling is the growth/expansion | TC-SA-24-03-001 |
| 3.1 Auto-scaling for Traffic Spikes | Rule: the traffic is the load/demand | TC-SA-24-03-002 |
| 3.1 Auto-scaling for Traffic Spikes | Rule: the capacity is the limit/ceiling | TC-SA-24-03-003 |
| 3.1 Auto-scaling for Traffic Spikes | Rule: the scaling status is the state/control | TC-SA-24-03-005 |
| 3.1 Auto-scaling for Traffic Spikes | Rule: the system handles the load — scaling is managed | TC-SA-24-03-007 |
| 3.1 Auto-scaling for Traffic Spikes | Rule: audit-logged with scaling, trigger, and timestamp | TC-SA-24-03-008 |
| 3.2 Load Balancing | Load | TC-SA-24-03-009 |
| 3.2 Load Balancing | Server | TC-SA-24-03-010 |
| 3.2 Load Balancing | Distribution | TC-SA-24-03-011 |
| 3.2 Load Balancing | Balancing status | TC-SA-24-03-012 |
| 3.2 Load Balancing | Balancing count | TC-SA-24-03-013 |
| 3.2 Load Balancing | Balancing view | TC-SA-24-03-014 |
| 3.2 Load Balancing | Balancing export | TC-SA-24-03-015 |
| 3.2 Load Balancing | Audit logging of the load balancing | TC-SA-24-03-016 |
| 3.2 Load Balancing | Rule: the load is the demand/weight | TC-SA-24-03-009 |
| 3.2 Load Balancing | Rule: the server is the node/machine | TC-SA-24-03-010 |
| 3.2 Load Balancing | Rule: the distribution is the spread/balance | TC-SA-24-03-011 |
| 3.2 Load Balancing | Rule: the balancing status is the state/control | TC-SA-24-03-012 |
| 3.2 Load Balancing | Rule: the load is even — balancing is managed | TC-SA-24-03-014 |
| 3.2 Load Balancing | Rule: audit-logged with load, server, and timestamp | TC-SA-24-03-016 |
| 3.3 Traffic and Usage Monitoring | Traffic | TC-SA-24-03-017 |
| 3.3 Traffic and Usage Monitoring | Volume | TC-SA-24-03-018 |
| 3.3 Traffic and Usage Monitoring | Usage | TC-SA-24-03-019 |
| 3.3 Traffic and Usage Monitoring | User | TC-SA-24-03-020 |
| 3.3 Traffic and Usage Monitoring | Traffic status | TC-SA-24-03-021 |
| 3.3 Traffic and Usage Monitoring | Traffic count | TC-SA-24-03-022 |
| 3.3 Traffic and Usage Monitoring | Traffic view | TC-SA-24-03-023 |
| 3.3 Traffic and Usage Monitoring | Audit logging of the traffic and usage monitoring | TC-SA-24-03-024 |
| 3.3 Traffic and Usage Monitoring | Rule: the traffic is the load/demand | TC-SA-24-03-017 |
| 3.3 Traffic and Usage Monitoring | Rule: the volume is the amount/size | TC-SA-24-03-018 |
| 3.3 Traffic and Usage Monitoring | Rule: the usage is the activity/consumption | TC-SA-24-03-019 |
| 3.3 Traffic and Usage Monitoring | Rule: the traffic status is the state/control | TC-SA-24-03-021 |
| 3.3 Traffic and Usage Monitoring | Rule: the traffic is visible — monitoring is managed | TC-SA-24-03-023 |
| 3.3 Traffic and Usage Monitoring | Rule: audit-logged with traffic, volume, and timestamp | TC-SA-24-03-024 |

---

## 3.1 Auto-scaling for Traffic Spikes

### TC-SA-24-03-001 — Auto-scaling is performed automatically for traffic spikes
**Type:** Positive
**Covers:** 3.1 → Scaling; Rule: the scaling is the growth/expansion
**Preconditions:** Super Admin logged in; auto-scaling is configured; a traffic spike can be generated
**Steps:**
1. Observe the system at normal traffic
2. Generate a traffic spike that exceeds the configured threshold
3. Verify the system scales automatically without manual intervention
**Expected Result:** The scaling of the system (scaling, traffic, capacity, date) is done automatically for the spike; the scaling is the growth/expansion of the system and no manual action is required
**Priority:** Critical

### TC-SA-24-03-002 — Traffic volume is displayed accurately
**Type:** Positive
**Covers:** 3.1 → Traffic; Rule: the traffic is the load/demand
**Preconditions:** Super Admin logged in; traffic data is being collected
**Steps:**
1. Open the Auto-scaling view
2. View the traffic of the system (volume, date)
3. Independently measure the incoming traffic and compare
**Expected Result:** The traffic of the system is displayed with the exact volume and date; the traffic is the load/demand and matches the independently measured value
**Priority:** High

### TC-SA-24-03-003 — System capacity is displayed as the correct limit
**Type:** Positive
**Covers:** 3.1 → Capacity; Rule: the capacity is the limit/ceiling
**Preconditions:** Super Admin logged in; the system has a defined capacity
**Steps:**
1. Open the Auto-scaling view
2. View the capacity of the system (limit, date)
3. Verify the capacity matches the actual configured ceiling
**Expected Result:** The capacity of the system is displayed as the exact limit; the capacity is the ceiling and matches the actual configured value
**Priority:** High

### TC-SA-24-03-004 — Scaling trigger fires exactly at the configured threshold
**Type:** Edge
**Covers:** 3.1 → Scaling trigger
**Preconditions:** Super Admin logged in; a scaling trigger threshold is configured
**Steps:**
1. Drive traffic just below the threshold and verify no scaling occurs
2. Drive traffic exactly at the threshold and verify the scaling trigger fires
3. Drive traffic above the threshold and verify the scaling trigger fires
**Expected Result:** The trigger of the scaling (threshold, date) fires exactly at the configured threshold; traffic below the threshold never triggers scaling and traffic at/above it always does; the trigger is the threshold
**Priority:** High

### TC-SA-24-03-005 — Scaling status is shown as scaled-up, scaled-down, or stable
**Type:** Positive
**Covers:** 3.1 → Scaling status; Rule: the scaling status is the state/control
**Preconditions:** Super Admin logged in; the system has experienced scale-up, scale-down, and stable periods
**Steps:**
1. View the scaling status during a scale-up period
2. View the scaling status during a scale-down period
3. View the scaling status during a stable period
**Expected Result:** The scaling status is displayed as scaled-up, scaled-down, or stable and always matches the actual scaling state; the status is the state/control
**Priority:** High

### TC-SA-24-03-006 — Scaling count is accurate
**Type:** Positive
**Covers:** 3.1 → Scaling count
**Preconditions:** Super Admin logged in; multiple scaling events have occurred
**Steps:**
1. Open the Auto-scaling view
2. View the scaling count (count of the scalings)
3. Manually count the scaling events and compare
**Expected Result:** The scaling count shows the exact count of the scalings; the count is the measure and matches the actual scaling events
**Priority:** High

### TC-SA-24-03-007 — Scaling view shows scalings, traffic, capacities, and dates
**Type:** Positive
**Covers:** 3.1 → Scaling view; Rule: the system handles the load — scaling is managed
**Preconditions:** Super Admin logged in; scaling data exists
**Steps:**
1. Open the scaling view
2. Verify the view lists the scalings, the traffic, the capacities, and the dates
3. Verify the system handling of the load is visible and the growth is complete
**Expected Result:** The scaling view displays the scalings, the traffic, the capacities, and the dates; the system handles the load and the scaling is managed
**Priority:** Medium

### TC-SA-24-03-008 — Auto-scaling configuration is audit-logged
**Type:** Positive
**Covers:** 3.1 → Audit logging of the auto-scaling configuration; Rule: audit-logged with scaling, trigger, and timestamp
**Preconditions:** Super Admin logged in; audit log accessible
**Steps:**
1. Perform an auto-scaling configuration action (view/change the trigger)
2. Open the audit log
3. Verify an entry exists with the scaling, the trigger, and the timestamp
**Expected Result:** The auto-scaling configuration is audit-logged with the scaling, the trigger, and the timestamp
**Priority:** Critical

## 3.2 Load Balancing

### TC-SA-24-03-009 — Load is balanced with load, server, distribution, and date
**Type:** Positive
**Covers:** 3.2 → Load; Rule: the load is the demand/weight
**Preconditions:** Super Admin logged in; multiple servers exist and load data is being collected
**Steps:**
1. Open the Load Balancing view
2. Observe the load entries (load, server, distribution, date)
3. Verify the load reflects the actual demand on the system
**Expected Result:** The load of the system is balanced and displayed with the load, the server, the distribution, and the date; the load is the demand/weight of the system
**Priority:** Critical

### TC-SA-24-03-010 — A specific server can be selected and inspected
**Type:** Positive
**Covers:** 3.2 → Server; Rule: the server is the node/machine
**Preconditions:** Super Admin logged in; multiple servers exist
**Steps:**
1. Open the Load Balancing view
2. Select a specific server
3. Verify the server details (name, date) and its load data are shown
**Expected Result:** The selected server (the node of the system, with its name and date) is shown with its load data; the server is the machine being balanced
**Priority:** High

### TC-SA-24-03-011 — Load distribution method can be set and is applied
**Type:** Positive
**Covers:** 3.2 → Distribution; Rule: the distribution is the spread/balance
**Preconditions:** Super Admin logged in; multiple distribution methods are available
**Steps:**
1. Open the Load Balancing view
2. Set the distribution of the load (method, date)
3. Verify the load is spread across servers according to the selected method
**Expected Result:** The distribution of the load (method, date) can be set and the load is spread across the servers according to the selected method; the distribution is the spread/balance of the load
**Priority:** High

### TC-SA-24-03-012 — Balancing status is shown as balanced or unbalanced
**Type:** Edge
**Covers:** 3.2 → Balancing status; Rule: the balancing status is the state/control
**Preconditions:** Super Admin logged in; a scenario exists where one server is overloaded relative to the others
**Steps:**
1. View the balancing status while load is evenly spread
2. Create a load imbalance (one server overloaded) and view the balancing status
3. Restore even distribution and view the balancing status again
**Expected Result:** The balancing status is displayed as balanced or unbalanced and always matches the actual distribution; an overloaded server is never shown as balanced; the status is the state/control
**Priority:** High

### TC-SA-24-03-013 — Balancing count is accurate
**Type:** Positive
**Covers:** 3.2 → Balancing count
**Preconditions:** Super Admin logged in; multiple distributions have occurred
**Steps:**
1. Open the Load Balancing view
2. View the balancing count (count of the distributions)
3. Manually count the distributions and compare
**Expected Result:** The balancing count shows the exact count of the distributions; the count is the measure and matches the actual distributions
**Priority:** High

### TC-SA-24-03-014 — Balancing view shows loads, servers, distributions, and dates
**Type:** Positive
**Covers:** 3.2 → Balancing view; Rule: the load is even — balancing is managed
**Preconditions:** Super Admin logged in; balancing data exists
**Steps:**
1. Open the balancing view
2. Verify the view lists the loads, the servers, the distributions, and the dates
3. Verify the load is visible and the distribution is complete
**Expected Result:** The balancing view displays the loads, the servers, the distributions, and the dates; the load is even and the balancing is managed
**Priority:** Medium

### TC-SA-24-03-015 — Balancing export works, including a zero-row selection
**Type:** Edge
**Covers:** 3.2 → Balancing export
**Preconditions:** Super Admin logged in; a server with load data and a server with no load data exist
**Steps:**
1. Export the loads for a server with data and verify the file contents
2. Export the loads for a server with no data
3. Verify the zero-row export completes without error
**Expected Result:** The export of the loads (loads, format, server) produces a valid file matching the selected format and server; the zero-row export completes cleanly with an empty-but-valid file and no error
**Priority:** Medium

### TC-SA-24-03-016 — Load balancing is audit-logged
**Type:** Positive
**Covers:** 3.2 → Audit logging of the load balancing; Rule: audit-logged with load, server, and timestamp
**Preconditions:** Super Admin logged in; audit log accessible
**Steps:**
1. Perform a load balancing action (view/export a server)
2. Open the audit log
3. Verify an entry exists with the load, the server, and the timestamp
**Expected Result:** The load balancing is audit-logged with the load, the server, and the timestamp
**Priority:** Critical

## 3.3 Traffic and Usage Monitoring

### TC-SA-24-03-017 — Traffic and usage are monitored with traffic, volume, date, and usage
**Type:** Positive
**Covers:** 3.3 → Traffic; Rule: the traffic is the load/demand
**Preconditions:** Super Admin logged in; traffic and usage data are being collected
**Steps:**
1. Open the Traffic and Usage Monitoring view
2. Observe the monitored traffic entries (traffic, volume, date)
3. Verify the traffic reflects the actual demand on the system
**Expected Result:** The traffic of the system is monitored and displayed with the traffic, the volume, and the date; the traffic is the load/demand of the system
**Priority:** Critical

### TC-SA-24-03-018 — Traffic volume is displayed as the correct amount
**Type:** Positive
**Covers:** 3.3 → Volume; Rule: the volume is the amount/size
**Preconditions:** Super Admin logged in; traffic data exists
**Steps:**
1. Open the Traffic and Usage Monitoring view
2. View the volume of the traffic (count, date)
3. Independently count the traffic volume and compare
**Expected Result:** The volume of the traffic is displayed as the exact amount; the volume is the size and matches the independently counted value
**Priority:** High

### TC-SA-24-03-019 — Usage is displayed per user with the correct activity
**Type:** Positive
**Covers:** 3.3 → Usage; Rule: the usage is the activity/consumption
**Preconditions:** Super Admin logged in; multiple users have usage data
**Steps:**
1. Open the Traffic and Usage Monitoring view
2. View the usage (usage, user, date) for a user
3. Independently verify the user's activity and compare
**Expected Result:** The usage is displayed with the usage, the user, and the date; the usage is the activity/consumption of the user and matches the independently verified value
**Priority:** High

### TC-SA-24-03-020 — A specific user can be selected and their usage inspected
**Type:** Positive
**Covers:** 3.3 → User
**Preconditions:** Super Admin logged in; multiple users exist with usage data
**Steps:**
1. Open the Traffic and Usage Monitoring view
2. Select a specific user
3. Verify the user details (name, usage) are shown
**Expected Result:** The selected user (the user, with their name and usage) is shown; the user is the actor whose usage is being watched
**Priority:** High

### TC-SA-24-03-021 — Traffic status is shown as normal, high, or low
**Type:** Edge
**Covers:** 3.3 → Traffic status; Rule: the traffic status is the state/control
**Preconditions:** Super Admin logged in; periods exist with normal, high, and low traffic
**Steps:**
1. View a period with normal traffic and verify its status
2. View a period with high traffic and verify its status
3. View a period with low traffic and verify its status
**Expected Result:** The traffic status is displayed as normal, high, or low and always matches the actual traffic level; the status is the state/control
**Priority:** High

### TC-SA-24-03-022 — Traffic count by status is accurate
**Type:** Positive
**Covers:** 3.3 → Traffic count
**Preconditions:** Super Admin logged in; periods exist in multiple traffic states
**Steps:**
1. Open the Traffic and Usage Monitoring view
2. View the traffic count (count of the traffic by status)
3. Manually count periods per status and compare
**Expected Result:** The traffic count shows the exact count of the traffic in each status; the count is the measure and matches the actual periods
**Priority:** High

### TC-SA-24-03-023 — Traffic view shows traffic, volumes, usages, and dates
**Type:** Positive
**Covers:** 3.3 → Traffic view; Rule: the traffic is visible — monitoring is managed
**Preconditions:** Super Admin logged in; traffic and usage data exist
**Steps:**
1. Open the traffic view
2. Verify the view lists the traffic, the volumes, the usages, and the dates
3. Verify the traffic is visible and the watch is complete
**Expected Result:** The traffic view displays the traffic, the volumes, the usages, and the dates; the traffic is visible and the monitoring is managed
**Priority:** Medium

### TC-SA-24-03-024 — Traffic and usage monitoring is audit-logged
**Type:** Positive
**Covers:** 3.3 → Audit logging of the traffic and usage monitoring; Rule: audit-logged with traffic, volume, and timestamp
**Preconditions:** Super Admin logged in; audit log accessible
**Steps:**
1. Perform a traffic and usage monitoring action (view/select a user)
2. Open the audit log
3. Verify an entry exists with the traffic, the volume, and the timestamp
**Expected Result:** The traffic and usage monitoring is audit-logged with the traffic, the volume, and the timestamp
**Priority:** Critical
