Test Cases: Broadcast Delivery
stg-webmail.membervu.com. The branded HTML shell adds the org name/logo + a per-recipient unsubscribe link; no merge-tag substitution happens. Open-rate / delivery-tracking analytics are not implemented — don't test them.
Module: Communications - Broadcast Delivery
Backend Service: Email sending service, broadcast queue
Related Endpoints: POST /api/broadcasts/:id/send
Prerequisites
- Email service configured and operational.
- Test segment with known members.
- Email testing tools available (Mailtrap, email log viewer).
Test Data
| Segment | Members | Emails |
|---|---|---|
| Test Segment | 5 members | Known test emails |
| Large Segment | 150 members | All active members |
Test Cases
TC-COMM-031: Send Broadcast to Small Segment
| Step | Action | Expected Result |
|---|---|---|
| 1 | Create broadcast for small test segment (5 members). | Broadcast ready. |
| 2 | Click "Send Now". | Confirmation dialog displayed. |
| 3 | Confirm sending. | API POST /api/broadcasts/:id/send called. |
| 4 | Verify immediate feedback. | "Broadcast sent" message displayed. |
| 5 | Verify status changes. | Status updates to "SENT". |
| 6 | Check email delivery. | All 5 members receive email. |
| 7 | Verify personalization. | Each email has correct recipient name. |
TC-COMM-032: Send Broadcast to Large Segment
| Step | Action | Expected Result |
|---|---|---|
| 1 | Create broadcast for "All Active Members" (150+). | Broadcast ready. |
| 2 | Click "Send Now". | Warning about large recipient count. |
| 3 | Confirm. | Broadcast queued for sending. |
| 4 | Verify progress. | Progress indicator or "Sending..." status. |
| 5 | Wait for completion. | Status changes to "SENT" when done. |
| 6 | Verify all sent. | 150 emails processed. |
TC-COMM-033: Scheduled Broadcast Delivery
| Step | Action | Expected Result |
|---|---|---|
| 1 | Create scheduled broadcast for 1 minute from now. | Broadcast scheduled. |
| 2 | Wait until scheduled time passes. | - |
| 3 | Verify automatic sending. | Status changes to "SENT" at scheduled time. |
| 4 | Verify emails received. | Recipients receive email around scheduled time. |
TC-COMM-034: Email Content Verification
| Step | Action | Expected Result |
|---|---|---|
| 1 | Send broadcast with rich content. | Broadcast sent. |
| 2 | Open received email. | Email displayed. |
| 3 | Verify subject line. | Matches broadcast subject. |
| 4 | Verify from address. | Organization email address. |
| 5 | Verify body content. | HTML rendered correctly. |
| 6 | Verify links work. | Hyperlinks clickable and correct. |
| 7 | Verify personalization. | Recipient's name appears correctly. |
TC-COMM-035: Email Unsubscribe Link
| Step | Action | Expected Result |
|---|---|---|
| 1 | Receive broadcast email. | Email in inbox. |
| 2 | Locate unsubscribe link (footer). | Link visible. |
| 3 | Click unsubscribe. | Unsubscribe page or confirmation. |
| 4 | Verify preference updated. | Member marked as unsubscribed. |
| 5 | Send another broadcast. | Unsubscribed member does NOT receive. |
TC-COMM-036: Send Fails - Invalid Segment
| Step | Action | Expected Result |
|---|---|---|
| 1 | Create broadcast with now-deleted segment. | - |
| 2 | Attempt to send. | Error: "Segment not found". |
| 3 | Verify broadcast remains DRAFT. | Not marked as sent. |
TC-COMM-037: Send Fails - Empty Segment
| Step | Action | Expected Result |
|---|---|---|
| 1 | Create segment with 0 members. | Segment exists but empty. |
| 2 | Create broadcast using this segment. | - |
| 3 | Attempt to send. | Warning: "Segment has no recipients". |
| 4 | Verify not sent. | No emails processed. |
TC-COMM-038: Partial Send Failure Handling
| Step | Action | Expected Result |
|---|---|---|
| 1 | Segment includes invalid email addresses. | e.g., malformed@invalid |
| 2 | Send broadcast. | Processing starts. |
| 3 | Verify partial success. | Valid emails delivered, invalid skipped. |
| 4 | Verify error logging. | Failed deliveries logged with reasons. |
| 5 | Verify statistics. | Shows: 148 sent, 2 failed. |
TC-COMM-039: Broadcast Open Tracking
| Step | Action | Expected Result |
|---|---|---|
| 1 | Send broadcast with tracking enabled. | Broadcast sent. |
| 2 | Recipient opens email. | Tracking pixel loaded. |
| 3 | Check broadcast statistics. | Open count increments. |
| 4 | Verify open rate calculated. | (Opens / Delivered) * 100. |
TC-COMM-040: Broadcast Click Tracking
| Step | Action | Expected Result |
|---|---|---|
| 1 | Include trackable link in broadcast. | Link wrapped with tracking. |
| 2 | Recipient clicks link. | Redirected through tracking URL. |
| 3 | Check statistics. | Click count increments. |
| 4 | Verify link destination. | User reaches intended URL. |
TC-COMM-041: Send to Segment with Unsubscribed Members
| Step | Action | Expected Result |
|---|---|---|
| 1 | Segment "All Active" includes unsubscribed member. | - |
| 2 | Send broadcast. | Processing starts. |
| 3 | Verify unsubscribed member excluded. | Does NOT receive email. |
| 4 | Verify statistics. | Shows actual recipients (excluding unsubscribed). |
TC-COMM-042: Retry Failed Deliveries
| Step | Action | Expected Result |
|---|---|---|
| 1 | Some deliveries failed (temporary error). | Errors logged. |
| 2 | Access broadcast with failures. | Failed list visible. |
| 3 | Click "Retry Failed". | Re-attempts delivery to failed addresses. |
| 4 | Verify retry results. | Some may succeed on retry. |
TC-COMM-043: Email Service Down
| Step | Action | Expected Result |
|---|---|---|
| 1 | Simulate email service unavailable. | Service offline. |
| 2 | Attempt to send broadcast. | Error handling triggered. |
| 3 | Verify user feedback. | "Email service temporarily unavailable". |
| 4 | Verify broadcast status. | Remains DRAFT or marked for retry. |
TC-COMM-044: View Delivery Report
| Step | Action | Expected Result |
|---|---|---|
| 1 | Open sent broadcast. | Broadcast details displayed. |
| 2 | Access "Delivery Report". | Report displayed. |
| 3 | Verify statistics. | Total, Delivered, Opened, Clicked, Failed. |
| 4 | Verify recipient list. | Can see individual delivery status. |
| 5 | Export report. | CSV download available. |
TC-COMM-045: Concurrent Broadcast Sending
| Step | Action | Expected Result |
|---|---|---|
| 1 | Two admins send different broadcasts simultaneously. | Both initiated. |
| 2 | Verify both processed. | Queue handles both. |
| 3 | Verify no conflicts. | Each broadcast delivered correctly. |
API Test Cases
TC-COMM-API-009: POST /api/broadcasts/:id/send
Request: POST /api/broadcasts/BC-2024-002/send
Expected Response: 200 OK
{
"success": true,
"broadcastId": "BC-2024-002",
"status": "SENT",
"recipientCount": 85,
"sentAt": "timestamp",
"deliveryStats": {
"queued": 85,
"sent": 85,
"failed": 0
}
}
TC-COMM-API-010: POST /api/broadcasts/:id/send - Empty Segment
Expected Response: 400 Bad Request
{
"error": "EMPTY_SEGMENT",
"message": "Cannot send broadcast: segment has no recipients"
}
TC-COMM-API-011: GET /api/broadcasts/:id/delivery-report
Expected Response: 200 OK
{
"broadcastId": "BC-2024-001",
"subject": "January Newsletter",
"sentAt": "timestamp",
"stats": {
"totalRecipients": 150,
"delivered": 148,
"opened": 97,
"clicked": 45,
"failed": 2,
"unsubscribed": 3
},
"openRate": 65.5,
"clickRate": 30.4,
"failedRecipients": [
{ "email": "invalid@...", "error": "Invalid email address" }
]
}