Back to Proactive Customer Communication

Test and QA Plan

How the build is validated before go-live: three sequential test phases, edge cases, and production verification.

4 pagesPDF · Quality
FS-DOC-06Quality

Test and QA Plan

Proactive Customer Communication

[YourCompany.com] · Customer Support Department · Prepared by FullSpec · [Today's Date]

This document defines the complete test and quality assurance strategy for the Proactive Customer Communication automation. It covers all three test phases, unit through to production, with individually numbered test cases for every agent, integration point, and edge condition in scope. The FullSpec team runs Phases 1 and 2 entirely in sandbox environments. Your process owner joins the FullSpec team for Phase 3 production validation and records final approval within the FullSpec confirmation log. No phase begins until every test case in the preceding phase achieves a full pass.

01Testing approach

Testing is structured as three sequential phases: Unit, Integration, and End-to-end. Each phase must reach a full pass on all in-scope test cases before the next phase is permitted to begin. A single failing case blocks progression. This sequencing ensures that component-level defects are resolved before cross-agent handoffs are exercised, and that integration stability is confirmed before any production credentials or live customer data are touched.

1
Phase 1 — Unit Testing
Estimated time: 1 to 2 business days
Scope
Each agent tested in isolation: Status Monitor Agent, Message Drafting Agent, Delivery and Logging Agent. No cross-agent calls exercised.
Environment
Sandbox only. HubSpot sandbox account, Slack test workspace, Twilio test credentials, Intercom test environment, Gmail alias.
Credential rule
No production API keys, tokens, or OAuth grants permitted at any point during Phase 1.
Pass condition
All cases T01 through T15 return expected outputs with no unhandled exceptions. Error-path cases must trigger the correct fallback behaviour.
Who runs it
FullSpec team. No process owner involvement required.
2
Phase 2 — Integration and Edge Case Testing
Estimated time: 2 to 3 business days
Scope
Agent-to-agent handoffs, full channel routing across Gmail, Intercom, and Twilio, Slack approval interface, and HubSpot write-back. Edge cases covering duplicates, missing data, tool unavailability, and human timeout.
Environment
Sandbox for all delivery and CRM calls. Slack test workspace for approval flow.
Credential rule
Sandbox credentials only. Production HubSpot, Twilio, and Intercom keys must not be used.
Pass condition
All cases T16 through T24 and E01 through E07 pass. Edge cases must demonstrate graceful degradation, not hard failures.
Who runs it
FullSpec team. No process owner involvement required.
3
Phase 3 — End-to-End Production Test
Estimated time: 1 business day, with process owner present
Scope
Full production run across all three agents using live credentials, a designated internal test contact, and verified real status changes. Covers standard path, sensitive path, all three delivery channels, and HubSpot logging.
Environment
Production. Live HubSpot, Gmail, Intercom, Twilio, and Slack credentials active.
Credential rule
Production credentials used. Test records must be clearly labelled and voided after each run. No real customer records used as triggers.
Pass condition
All cases T25 through T30 pass, including the process owner review-and-approval case (T30). Owner sign-off recorded in the FullSpec confirmation log.
Who runs it
FullSpec team, with the process owner (Support Manager) present and completing case T30.
Test and QA PlanPage 1 of 4
FS-DOC-06Quality

02Phase 1 — unit test cases

All Phase 1 tests must be executed against sandbox credentials only. Do not connect production HubSpot properties, live Twilio numbers, active Intercom workspaces, or real Gmail accounts during this phase. Any test run that touches a production credential is invalid and must be repeated in a clean sandbox session.

Status Monitor Agent — complexity: Moderate. Estimated build time: 8 hours.

ID
Scenario
Input
Expected Output
Pass Criteria
T01
Happy path: notification-eligible status change detected
HubSpot sandbox record moves to status 'Order Shipped'
Structured data package emitted: customer name, status, preferred channel, no sensitivity flag
Package fields all populated; no null values on required fields; emitted within 5 seconds of trigger
T02
Status change to a non-notification-eligible value
HubSpot record moves to internal status 'In Progress'
No data package emitted; trigger suppressed silently
Zero downstream events fired; no error raised; audit log shows suppression entry
T03
Customer preference field populated: email
HubSpot record has preferred_channel = 'email'
Data package includes channel: 'gmail'
Channel value maps correctly to Gmail delivery path
T04
Customer preference field populated: SMS
HubSpot record has preferred_channel = 'sms'
Data package includes channel: 'twilio'
Channel value maps correctly to Twilio delivery path
T05
Customer preference field populated: in-app
HubSpot record has preferred_channel = 'intercom'
Data package includes channel: 'intercom'
Channel value maps correctly to Intercom delivery path
T06
Missing channel preference: default fallback
HubSpot record has preferred_channel = null
Data package includes channel: 'gmail' (default)
Fallback applied without error; fallback event logged
T07
HubSpot API returns 401 Unauthorized
Sandbox credential deliberately invalidated
Agent retries twice then logs error; no data package emitted
Retry count = 2; error entry written to automation platform log with HTTP status 401
T08
HubSpot API returns 429 Rate Limit
Simulated rate-limit response header injected
Agent pauses for Retry-After interval then retries; data package emitted on successful retry
Back-off respected; successful emission on retry; no duplicate trigger fired

Message Drafting Agent — complexity: Moderate. Estimated build time: 10 hours.

ID
Scenario
Input
Expected Output
Pass Criteria
T09
Happy path: standard status, non-sensitive, email channel
Data package with status 'Order Shipped', channel 'gmail', no sensitivity flag
Personalised email body selected from correct template; message marked auto-approve
Template ID matches status type; customer name present in body; no Slack approval event fired
T10
Happy path: sensitive status flagged, Slack approval triggered
Data package with status 'Delivery Delayed', sensitivity_flag = true
Draft posted to designated Slack approval channel; message held pending supervisor action
Slack message posted within 10 seconds; message contains approve and edit action buttons; no send event fired
T11
Template selection: SMS channel
Data package with status 'Appointment Rescheduled', channel 'twilio'
SMS-length template selected (under 160 characters); personalised correctly
Character count under 160; no HTML elements in body; customer name correct
T12
Template selection: in-app Intercom channel
Data package with status 'Subscription Renewal Due', channel 'intercom'
Intercom message body composed with correct format; marked auto-approve
Body uses plain text compatible with Intercom API; no Gmail-specific headers present
T13
No matching template found for status type
Data package with status value not present in template library
Agent raises a template-not-found error; no message drafted; alert posted to Slack ops channel
Error code TEMPLATE_NOT_FOUND logged; Slack ops alert fired; no downstream send triggered
T14
Customer name field null in data package
Data package with customer_name = null
Agent substitutes fallback salutation 'Valued Customer'; sensitivity flag raised
Fallback salutation present in draft; sensitivity_flag set to true; draft routed to Slack approval
T15
Slack API unavailable when posting sensitive draft
Sensitive draft ready; Slack sandbox endpoint returns 503
Agent retries twice; if still failing, message held in queue and ops alert fired via email to support@gofullspec.com
Retry count = 2; queue entry created; ops alert email confirmed delivered in sandbox
Test and QA PlanPage 2 of 4
FS-DOC-06Quality

Delivery and Logging Agent — complexity: Moderate. Estimated build time: 10 hours.

ID
Scenario
Input
Expected Output
Pass Criteria
T16
Happy path: auto-approved message sent via Gmail
Approved message object, channel 'gmail', sandbox recipient address
Email delivered to sandbox inbox; HubSpot activity note written; Slack digest entry created
Gmail send API returns 200; HubSpot note ID returned; Slack digest message visible in test workspace
T17
Happy path: supervisor-approved message sent via Twilio
Supervisor-approved message object, channel 'twilio', Twilio test number
SMS delivered to test number; HubSpot activity note written; send timestamp recorded
Twilio API returns message SID; HubSpot note timestamp within 30 seconds of approval
T18
Happy path: auto-approved message sent via Intercom
Approved message object, channel 'intercom', sandbox conversation
Intercom message created in sandbox conversation; HubSpot activity note written
Intercom API returns 200 with conversation ID; HubSpot note references correct channel
T19
Hourly Slack digest posted correctly
Three completed send records in the preceding 60-minute window
Digest message posted to team Slack channel listing all three sends with customer identifiers masked
Digest posted within 2 minutes of the hour boundary; count in digest matches send records
T20
Gmail send fails with 500 error
Sandbox Gmail endpoint returns 500
Agent retries twice; if still failing, error logged and ops alert sent; HubSpot note marked 'send-failed'
Retry count = 2; HubSpot note status = 'send-failed'; ops alert confirmed in sandbox log
T21
Twilio returns invalid phone number error
Malformed E.164 number in data package
Send aborted; HubSpot note records channel error and invalid number; no retry attempted
Error code 21211 handled; HubSpot note contains error detail; no send event fired
T22
HubSpot write-back fails after successful send
Gmail send returns 200; HubSpot PATCH endpoint returns 503
Agent retries write-back twice; if still failing, logs unlogged-send alert to ops channel
Send confirmed; write-back retry count = 2; unlogged-send alert fired; no message resent

03Phase 2 — integration and edge case tests

Phase 2 validates cross-agent handoffs and full channel routing with all three agents running in sequence. Test IDs continue from the Phase 1 sequence. All runs use sandbox credentials.

ID
Scenario
Input
Expected Output
Pass Criteria
T23
Full handoff: Status Monitor to Message Drafting, standard path
HubSpot sandbox status change to 'Order Shipped'; channel preference 'email'
Status Monitor emits package; Drafting Agent receives it within 3 seconds and returns auto-approved email draft
No data loss between agents; draft fields match input package exactly; timing under 3 seconds
T24
Full handoff: Status Monitor to Message Drafting, sensitive path
HubSpot sandbox status change to 'Delivery Delayed'; sensitivity rules active
Status Monitor emits package with sensitivity_flag = true; Drafting Agent posts Slack approval request; no send until approved
Slack approval message visible in test workspace; approval button functional; send only fires after button pressed
T25
Full handoff: Message Drafting to Delivery and Logging, Gmail path
Auto-approved email draft received by Delivery Agent
Email sent to sandbox address; HubSpot note created; Slack digest updated
All three outputs confirmed; end-to-end latency under 15 seconds from trigger
T26
Full handoff: Message Drafting to Delivery and Logging, SMS path
Supervisor-approved SMS draft, Twilio test credentials
SMS sent to Twilio test number; HubSpot note references 'sms' channel
Twilio message SID returned; HubSpot note channel field = 'sms'
T27
Full handoff: Message Drafting to Delivery and Logging, Intercom path
Auto-approved Intercom draft, sandbox conversation
Intercom message posted; HubSpot note created; Slack digest updated
Intercom conversation ID in HubSpot note; digest count incremented
T28
Supervisor rejects Slack draft and edits before approving
Sensitive draft in Slack; supervisor clicks edit, modifies body, then approves
Edited message body used for send; original draft not sent; HubSpot note reflects edited content
Edited body confirmed in send payload; no version of original draft delivered

Edge case tests are run separately within Phase 2. These cases verify graceful degradation, not happy-path outcomes. A passing result is correct error handling, not a successful send.

ID
Scenario
Input
Expected Output
Pass Criteria
E01
Duplicate trigger: same record fires twice within 60 seconds
HubSpot webhook fires for the same contact ID and status within 60 seconds
Second trigger detected as duplicate; suppressed; only one data package emitted
Deduplication log entry present; downstream agents receive exactly one package
E02
Missing customer email address in HubSpot record
Data package channel = 'gmail'; email field = null
Send aborted; HubSpot note records missing-email error; ops alert fired
No send event; HubSpot note status = 'missing-contact-data'; alert confirmed
E03
Missing phone number for SMS channel
Data package channel = 'twilio'; phone field = null
Send aborted; fallback to email if email present; if both null, alert fired
Fallback logic confirmed; if fallback used, HubSpot note records channel-override
E04
Slack unavailable for supervisor approval (503 for 10 minutes)
Sensitive draft ready; Slack returns 503 for 10 consecutive minutes
Message held in queue; ops alert sent to support@gofullspec.com; auto-escalation after configurable timeout
Queue entry confirmed; ops alert email confirmed; no message sent without approval
E05
Supervisor does not respond to Slack approval within timeout window (default: 2 hours)
Sensitive draft posted to Slack; no action taken for 2 hours
Escalation alert posted to backup supervisor Slack handle; original draft remains held
Escalation message visible in Slack with original draft link; primary draft not auto-sent
E06
Intercom API rate limit reached mid-batch
Batch of 5 Intercom sends; rate limit hit after send 3
Remaining sends queued; retry after Retry-After header interval; all 5 eventually confirmed
No messages lost; HubSpot notes created for all 5; no duplicate sends
E07
Google Sheets preference lookup unavailable
Status Monitor attempts to cross-reference Google Sheets; endpoint returns 503
Agent falls back to HubSpot-stored preference only; if null, defaults to email; Sheets error logged
Fallback applied; no trigger blocked; Sheets error in audit log
Test and QA PlanPage 3 of 4
FS-DOC-06Quality

04Phase 3 — end-to-end production test

Important before running Phase 3: use only the designated internal test contact record in HubSpot (labelled 'FullSpec QA Test Contact'). All delivery channels must point to internal addresses and test numbers, not real customer contacts. Every test record created or modified during Phase 3 must be voided and reverted immediately after the session. The FullSpec team will coordinate the revert with your HubSpot admin before closing the session. Do not proceed to Phase 3 until Phase 2 has a full pass certificate from the FullSpec team.

Phase 3 uses live production credentials across all connected tools. The purpose is to confirm that the automation behaves identically in the production environment to how it performed in sandbox, and that all credentials, permission scopes, and HubSpot property mappings are correctly configured. The process owner (Support Manager) must be present for the duration of this session.

ID
Scenario
Input
Expected Output
Pass Criteria
T29
Production full run: standard status, email channel, end-to-end trace
Live HubSpot test contact moved to 'Order Shipped' status by FullSpec team
Status Monitor detects change within 10 seconds; Drafting Agent produces email draft; Delivery Agent sends to internal test address; HubSpot activity note created; Slack digest updated
Each agent step confirmed in automation platform run log; email received at internal address; HubSpot note visible on test contact; digest entry in production Slack channel
T30
Production full run: sensitive status, Slack approval, SMS delivery
Live HubSpot test contact moved to 'Delivery Delayed' status
Sensitivity flag raised; Slack approval posted to production approval channel; supervisor approves; SMS sent to internal test number; HubSpot note logged
Slack approval message received in production channel; SMS delivered to internal test number (Twilio test credential); HubSpot note channel = 'sms'; approval timestamp recorded
T31
Production full run: Intercom channel delivery
Live HubSpot test contact, channel preference = 'intercom', non-sensitive status
Intercom message posted to internal test conversation; HubSpot note created referencing Intercom conversation ID
Intercom API confirms 200; conversation ID present in HubSpot note; no email or SMS sent
T32
Error log verification: confirm all run events written correctly
Review automation platform run log for T29 through T31
Each run shows: trigger event, agent steps, tool calls, response codes, output payloads, and timestamps
No gaps in log sequence; all HTTP response codes 2xx; no unhandled exceptions; latency per step within acceptable range (status monitor under 10s, drafting under 5s, delivery under 10s)
T33
HubSpot write-back audit: confirm all notes correct and timestamped
Review test contact HubSpot timeline after T29 through T31
Three activity notes present, one per run; each note contains: channel used, send timestamp, message summary, approval status (auto or supervisor)
Notes present in correct chronological order; no duplicate notes; all fields populated
T34
Process owner review and approval: full session sign-off
Process owner (Support Manager) reviews run logs, HubSpot notes, Slack digests, and delivery confirmations for T29 through T33 alongside the FullSpec team
Process owner confirms all outputs match expected behaviour and approves the automation for go-live. Approval recorded in the FullSpec confirmation log with timestamp and reviewer name.
FullSpec confirmation log entry created with process owner name, date, and explicit go-live approval status. No separate signature block required. This case constitutes the formal QA sign-off.
Once T34 is recorded in the FullSpec confirmation log, the FullSpec team will revert all test records in HubSpot, remove the QA test contact flag, and update the project milestone to 'QA Passed'. The automation is then eligible for the go-live switch. Contact support@gofullspec.com with any questions arising from this test session.
Test and QA PlanPage 4 of 4

More documents for this process

Every document generated for Proactive Customer Communication.

Launch Plan
Operations · Owner
View
ROI and Business Case
Finance · Owner
View
Process Runbook / SOP
Operations · Owner
View
Developer Handover Pack
Technical · Developer
View
Integration and API Spec
Technical · Developer
View