Test Cases: Broadcast Delivery

⚠️ Corrected — read the Communications index first. Delivery is plain SMTP, sent one email per member in-process (no queue/worker) when you hit Send. On staging, verify landed mail in MailHog at 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

Test Data

SegmentMembersEmails
Test Segment5 membersKnown test emails
Large Segment150 membersAll active members

Test Cases

TC-COMM-031: Send Broadcast to Small Segment

StepActionExpected Result
1Create broadcast for small test segment (5 members).Broadcast ready.
2Click "Send Now".Confirmation dialog displayed.
3Confirm sending.API POST /api/broadcasts/:id/send called.
4Verify immediate feedback."Broadcast sent" message displayed.
5Verify status changes.Status updates to "SENT".
6Check email delivery.All 5 members receive email.
7Verify personalization.Each email has correct recipient name.

TC-COMM-032: Send Broadcast to Large Segment

StepActionExpected Result
1Create broadcast for "All Active Members" (150+).Broadcast ready.
2Click "Send Now".Warning about large recipient count.
3Confirm.Broadcast queued for sending.
4Verify progress.Progress indicator or "Sending..." status.
5Wait for completion.Status changes to "SENT" when done.
6Verify all sent.150 emails processed.

TC-COMM-033: Scheduled Broadcast Delivery

StepActionExpected Result
1Create scheduled broadcast for 1 minute from now.Broadcast scheduled.
2Wait until scheduled time passes.-
3Verify automatic sending.Status changes to "SENT" at scheduled time.
4Verify emails received.Recipients receive email around scheduled time.

TC-COMM-034: Email Content Verification

StepActionExpected Result
1Send broadcast with rich content.Broadcast sent.
2Open received email.Email displayed.
3Verify subject line.Matches broadcast subject.
4Verify from address.Organization email address.
5Verify body content.HTML rendered correctly.
6Verify links work.Hyperlinks clickable and correct.
7Verify personalization.Recipient's name appears correctly.

TC-COMM-035: Email Unsubscribe Link

StepActionExpected Result
1Receive broadcast email.Email in inbox.
2Locate unsubscribe link (footer).Link visible.
3Click unsubscribe.Unsubscribe page or confirmation.
4Verify preference updated.Member marked as unsubscribed.
5Send another broadcast.Unsubscribed member does NOT receive.

TC-COMM-036: Send Fails - Invalid Segment

StepActionExpected Result
1Create broadcast with now-deleted segment.-
2Attempt to send.Error: "Segment not found".
3Verify broadcast remains DRAFT.Not marked as sent.

TC-COMM-037: Send Fails - Empty Segment

StepActionExpected Result
1Create segment with 0 members.Segment exists but empty.
2Create broadcast using this segment.-
3Attempt to send.Warning: "Segment has no recipients".
4Verify not sent.No emails processed.

TC-COMM-038: Partial Send Failure Handling

StepActionExpected Result
1Segment includes invalid email addresses.e.g., malformed@invalid
2Send broadcast.Processing starts.
3Verify partial success.Valid emails delivered, invalid skipped.
4Verify error logging.Failed deliveries logged with reasons.
5Verify statistics.Shows: 148 sent, 2 failed.

TC-COMM-039: Broadcast Open Tracking

StepActionExpected Result
1Send broadcast with tracking enabled.Broadcast sent.
2Recipient opens email.Tracking pixel loaded.
3Check broadcast statistics.Open count increments.
4Verify open rate calculated.(Opens / Delivered) * 100.

TC-COMM-040: Broadcast Click Tracking

StepActionExpected Result
1Include trackable link in broadcast.Link wrapped with tracking.
2Recipient clicks link.Redirected through tracking URL.
3Check statistics.Click count increments.
4Verify link destination.User reaches intended URL.

TC-COMM-041: Send to Segment with Unsubscribed Members

StepActionExpected Result
1Segment "All Active" includes unsubscribed member.-
2Send broadcast.Processing starts.
3Verify unsubscribed member excluded.Does NOT receive email.
4Verify statistics.Shows actual recipients (excluding unsubscribed).

TC-COMM-042: Retry Failed Deliveries

StepActionExpected Result
1Some deliveries failed (temporary error).Errors logged.
2Access broadcast with failures.Failed list visible.
3Click "Retry Failed".Re-attempts delivery to failed addresses.
4Verify retry results.Some may succeed on retry.

TC-COMM-043: Email Service Down

StepActionExpected Result
1Simulate email service unavailable.Service offline.
2Attempt to send broadcast.Error handling triggered.
3Verify user feedback."Email service temporarily unavailable".
4Verify broadcast status.Remains DRAFT or marked for retry.

TC-COMM-044: View Delivery Report

StepActionExpected Result
1Open sent broadcast.Broadcast details displayed.
2Access "Delivery Report".Report displayed.
3Verify statistics.Total, Delivered, Opened, Clicked, Failed.
4Verify recipient list.Can see individual delivery status.
5Export report.CSV download available.

TC-COMM-045: Concurrent Broadcast Sending

StepActionExpected Result
1Two admins send different broadcasts simultaneously.Both initiated.
2Verify both processed.Queue handles both.
3Verify 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" }

]

}