Back to Lead Nurture Sequence

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

Lead Nurture Sequence

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

This document defines the structured test and quality assurance programme for the Lead Nurture Sequence automation. It covers all three testing phases: unit tests for each individual agent, integration and edge-case tests for agent handoffs and failure scenarios, and a final end-to-end production run. The FullSpec team executes Phases 1 and 2 entirely in sandbox environments. Your process owner joins Phase 3 to confirm the live sequence behaves as agreed before sign-off is recorded.

01Testing approach

Testing runs in three sequential phases. No phase begins until the previous phase has fully passed, meaning every test case in that phase carries a confirmed pass result with no outstanding failures or unresolved defects. Any failure in an earlier phase resets that phase; the FullSpec team resolves the issue, re-runs the affected cases from the beginning of that phase, and confirms full passage before proceeding.

1
Phase 1: Unit Testing
Each agent tested in isolation against defined inputs and outputs
Scope
Individual agent logic: Lead Qualification Agent, Sequence Messaging Agent, Sales Alert Agent — each tested independently with no live handoffs between them.
Environment
Sandbox only. HubSpot sandbox account, Gmail test inbox, Calendly test event type, Slack test workspace. No production data or live credentials.
Credential rule
All credentials must be sandbox or test-mode credentials. Production API keys must not be present in the environment during Phase 1.
Pass condition
All cases T01 through T12 return expected outputs with no errors. Each agent's failure-mode cases must also resolve to the defined fallback or flag behaviour.
Who runs it
FullSpec team only. Process owner is not required during Phase 1.
2
Phase 2: Integration and Edge-Case Testing
Agent-to-agent handoffs and failure resilience validated end to end in sandbox
Scope
Full agent handoff chain from HubSpot trigger through qualification, sequence messaging, and Slack alert. Plus edge-case scenarios covering duplicate records, missing field data, tool unavailability, and human-timeout paths.
Environment
Sandbox only. Integrated sandbox stack with all four tools connected: HubSpot sandbox, Gmail test inbox, Calendly test event, Slack test channel.
Credential rule
Sandbox credentials only. The Google Sheets scoring reference must point to a test sheet with a copy of the ICP scoring matrix, not the live sheet.
Pass condition
All integration cases T13 through T19 pass. All edge-case cases E01 through E06 resolve to the defined safe fallback with no unhandled exceptions or silent failures.
Who runs it
FullSpec team only. Process owner may observe but is not required during Phase 2.
3
Phase 3: End-to-End Production Test
Full live-environment run with process owner review and recorded approval
Scope
A single controlled lead record injected into the live production environment and traced through every automation step: qualification, welcome email, CRM logging, follow-up scheduling, booking detection, and Slack alert.
Environment
Production. Live HubSpot account, live Gmail sending domain, live Calendly account, live Slack sales channel. All credentials are production-grade.
Credential rule
Production credentials active. The test contact record must use an internal test email address controlled by the FullSpec team or the process owner. The record must be voided and deleted after the test completes.
Pass condition
All cases T20 through T23 pass, including the final process-owner approval case T23. Approval is recorded in the FullSpec project confirmation log.
Who runs it
FullSpec team runs T20 through T22. The process owner participates in T23 to review outputs and record approval.
Test and QA PlanPage 1 of 4
FS-DOC-06Quality

02Phase 1 — unit test cases

Sandbox credentials only during Phase 1. Do not connect production HubSpot, Gmail, Calendly, or Slack accounts at any point during this phase. All contact records created during unit testing must use fabricated email addresses on a test domain (e.g. testlead@sandbox.internal). No real prospect data may be used.

Lead Qualification Agent — complexity: Moderate. Estimated build time: 10 hours.

ID
Scenario
Input
Expected Output
Pass Criteria
T01
Happy path: fully qualified lead
HubSpot contact with lifecycle stage = Lead; all ICP fields populated (company size, industry, enquiry topic, lead source); fit score computed as above threshold.
Qualification tag 'ICP: Qualified' written to HubSpot contact; score field populated; contact advances to Sequence Messaging Agent trigger.
Tag and score visible on HubSpot contact record within 30 seconds of trigger. No error logged.
T02
Happy path: disqualified lead
HubSpot contact with lifecycle stage = Lead; ICP fields populated but fit score below threshold (e.g. company size too small, wrong industry).
Qualification tag 'ICP: Disqualified' written to HubSpot contact; contact does not proceed to sequence; flagged for long-term nurture.
Disqualified tag present on contact. No email sent. No further agent triggered.
T03
Edge: mandatory ICP field missing (enquiry topic blank)
HubSpot contact with lifecycle stage = Lead; enquiry topic field empty; all other fields present.
Agent applies 'ICP: Needs Review' tag; creates a HubSpot task assigned to the process owner; does not proceed to sequence.
Review tag present. Task created in HubSpot. No email sent. Error not thrown silently.
T04
Edge: Google Sheets scoring reference unreachable
HubSpot contact triggers agent; Google Sheets API returns a 503 error.
Agent retries twice with a 10-second interval; on third failure, applies 'ICP: Scoring Error' tag and creates a HubSpot task for manual review.
Tag and task present after three failed retry attempts. Retry count and timestamps logged.
T05
Failure: duplicate contact record
Two HubSpot contacts with identical email address both carrying lifecycle stage = Lead arrive within 60 seconds of each other.
Agent detects the duplicate via email deduplication check; processes only the first record; applies a 'Duplicate: Merged' note to the second and suppresses it from the sequence.
Only one sequence initiation logged. Second contact record shows suppression note. No duplicate email sent.

Sequence Messaging Agent — complexity: Moderate. Estimated build time: 12 hours.

ID
Scenario
Input
Expected Output
Pass Criteria
T06
Happy path: welcome email sent and CRM logged
Contact tagged 'ICP: Qualified'; first name, enquiry topic, and lead source fields populated in HubSpot; Gmail connected.
Personalised welcome email sent via Gmail within 2 minutes of qualification tag being applied; touchpoint logged in HubSpot; lifecycle stage updated to 'Contacted'.
Email received in test inbox with correct first name and enquiry topic. HubSpot contact shows 'Contacted' stage and email activity entry.
T07
Happy path: Day 2 follow-up sent on schedule
Contact in 'Contacted' stage; no reply detected; no Calendly booking detected; 2 business days elapsed since welcome email.
Second follow-up email sent via Gmail using Day 2 template; HubSpot touchpoint logged; next follow-up timer set for Day 4.
Email received in test inbox on correct schedule. HubSpot shows second touchpoint. Day 4 timer active.
T08
Happy path: Day 4 follow-up sent and sequence closes
Contact in sequence; no reply and no booking after Day 2 email; 4 business days elapsed since welcome email.
Third follow-up email sent via Gmail; after sending, contact tagged 'Long-Term Nurture' and removed from active sequence in HubSpot.
Email received. HubSpot contact shows 'Long-Term Nurture' tag. No further emails scheduled. Sequence closed cleanly.
T09
Happy path: sequence stops on Calendly booking detection
Contact is mid-sequence (welcome email sent, Day 2 pending); Calendly webhook fires confirming a booking by the same email address.
Sequence paused immediately; no further emails sent; contact lifecycle stage updated to 'Meeting Booked' in HubSpot; handoff signal sent to Sales Alert Agent.
No Day 2 email sent after booking confirmed. HubSpot stage updated. Sales Alert Agent trigger received.
T10
Edge: personalisation field (first name) missing
Contact tagged 'ICP: Qualified'; first name field blank in HubSpot; all other fields present.
Agent substitutes fallback salutation ('Hi there') in email body; email still sent on schedule; HubSpot note added flagging the missing field.
Email delivered with fallback salutation. No send failure. HubSpot note present on contact.
T11
Failure: Gmail API rate limit exceeded (429 response)
High-volume scenario: 30 emails queued simultaneously; Gmail API returns 429 on sends 11 onwards.
Agent respects exponential back-off (2 s, 4 s, 8 s); queues remaining sends; retries within the same scheduling window; logs rate-limit event.
All 30 emails eventually delivered within the scheduling window. No email dropped. Rate-limit retry events visible in workflow log.
T12
Failure: Calendly webhook not received (silent miss)
Contact books via Calendly but the webhook delivery fails (simulated by disabling the endpoint); sequence timer continues.
After 15-minute webhook timeout, agent polls Calendly API directly for the contact's email; detects the booking; stops the sequence and updates HubSpot.
Sequence stops after polling confirms booking. HubSpot stage updated. No duplicate follow-up sent. Polling fallback logged.

Sales Alert Agent — complexity: Simple. Estimated build time: 6 hours.

ID
Scenario
Input
Expected Output
Pass Criteria
T13
Happy path: Calendly booking alert posted to Slack
Handoff signal from Sequence Messaging Agent containing lead name, company, meeting time, and HubSpot contact URL.
Formatted Slack message posted to the sales channel within 60 seconds: includes lead name, company, meeting datetime, and a clickable HubSpot link.
Slack message appears in correct channel. All four data fields present. HubSpot link resolves to correct contact record.
T14
Edge: Slack API unavailable (503 response)
Booking signal received; Slack API returns 503 on first attempt.
Agent retries up to 3 times at 30-second intervals; on persistent failure, logs the alert details to a fallback HubSpot note on the contact record and creates an owner task.
Retry log shows 3 attempts. HubSpot fallback note present. No silent failure. Task created for sales manager.
Test and QA PlanPage 2 of 4
FS-DOC-06Quality

03Phase 2 — integration and edge case tests

Phase 2 validates that agents hand off correctly to one another and that the overall sequence handles unexpected real-world conditions safely. All tests run in the integrated sandbox environment. IDs continue from the Phase 1 sequence.

ID
Scenario
Input
Expected Output
Pass Criteria
T15
Full handoff: Lead Qualification Agent to Sequence Messaging Agent
New HubSpot contact with lifecycle stage = Lead and full ICP fields; Lead Qualification Agent fires and applies 'ICP: Qualified' tag.
Sequence Messaging Agent detects the qualification tag via workflow trigger; initiates welcome email send within 2 minutes; logs the handoff in the workflow audit trail.
Welcome email sent in sandbox inbox. Workflow log shows unbroken chain from qualification trigger to email send. No manual intervention needed.
T16
Full handoff: Sequence Messaging Agent to Sales Alert Agent on booking
Contact mid-sequence; Calendly booking webhook received by Sequence Messaging Agent; booking signal constructed and passed to Sales Alert Agent.
Sales Alert Agent receives signal and posts Slack message within 60 seconds; Sequence Messaging Agent confirms sequence stopped; HubSpot stage updated to 'Meeting Booked'.
Slack alert posted. Sequence stopped. HubSpot updated. No further emails sent. All three outcomes confirmed in sandbox.
T17
Disqualified lead does not enter sequence
Lead Qualification Agent applies 'ICP: Disqualified' tag to a contact.
Sequence Messaging Agent trigger evaluates the tag condition and does not fire; no email sent; no Slack alert triggered; contact tagged for long-term nurture.
Zero emails in test inbox for this contact. No Slack message. HubSpot shows 'Long-Term Nurture' tag.
T18
Three-touchpoint sequence completes without response
Qualified contact; time simulation advances through Day 0, Day 2, and Day 4 milestones with no reply and no booking detected at any point.
Welcome email, Day 2 follow-up, and Day 4 follow-up all sent to sandbox inbox on correct schedule; after Day 4 email, contact tagged 'Long-Term Nurture' and sequence closed.
Three emails in sandbox inbox in correct order and timing. HubSpot shows three touchpoints logged. Final tag applied. No fourth email scheduled.
T19
Sequence Messaging Agent receives qualification tag for a contact already in sequence
A contact already in the active sequence (Day 2 pending) has a re-qualification event fire (e.g. form submission update triggers agent again).
Agent detects the contact is already in an active sequence via status check; suppresses the duplicate sequence initiation; logs a deduplication event; existing sequence continues unaffected.
No duplicate welcome email sent. Existing sequence intact. Deduplication log entry present.

Edge-case tests below address failure resilience, data quality gaps, tool unavailability, and human-timeout scenarios. These use the E-series ID prefix.

ID
Scenario
Input
Expected Output
Pass Criteria
E01
Duplicate contact: same email submitted twice within 5 minutes
Two separate HubSpot contact creation events with identical email addresses and lifecycle stage = Lead arrive within 5 minutes of each other.
Lead Qualification Agent processes the first record; identifies the second as a duplicate via email match; suppresses the second from the sequence; merges or flags the second record in HubSpot.
Only one sequence instance runs for this email address. Second contact record shows suppression or merge note. No duplicate emails sent to the prospect.
E02
Missing critical data: email address blank on HubSpot contact
HubSpot contact record with lifecycle stage = Lead but the email field is empty.
Lead Qualification Agent detects missing email; does not attempt to score or tag; creates a HubSpot task for manual data correction assigned to the process owner; logs the event.
No qualification attempted. No email sent. HubSpot task visible. Event logged with contact ID and field name.
E03
HubSpot API unavailable during CRM stage update
Sequence Messaging Agent attempts to write a touchpoint and update lifecycle stage; HubSpot API returns 503.
Agent queues the write operation; retries with exponential back-off (5 s, 15 s, 45 s) up to 3 times; on persistent failure, logs to the workflow error queue with contact ID and intended write payload for manual resolution.
Three retry attempts logged with timestamps. Error queue entry present with full payload. HubSpot record eventually updated if API recovers within retry window.
E04
Lead replies to an automated email
A reply arrives in the Gmail inbox from a contact who is mid-sequence (Day 2 pending).
Sequence Messaging Agent detects the reply via Gmail inbox polling; pauses the remaining sequence for this contact; applies a 'Reply Received' tag in HubSpot; does not attempt to interpret or respond to the reply content.
No Day 2 email sent after reply detected. HubSpot tag applied. Reply content untouched and visible for rep review. No automated response sent.
E05
Calendly service outage during active sequence
Sequence Messaging Agent attempts a Calendly booking check; Calendly API returns 503 for a sustained period (simulated 10-minute outage).
Agent marks the booking check as pending; continues the rest of the sequence logic; retries the Calendly check at the next scheduled interval; does not block or fail the email send step.
Email send step completes on schedule. Calendly check logged as pending. Retry confirmed at next interval. No contact stuck in an error state.
E06
Human review timeout: 'ICP: Needs Review' contact not actioned within 48 hours
Contact flagged as 'ICP: Needs Review' by Lead Qualification Agent; no human action taken on the HubSpot task within 48 hours.
Automation platform detects the task is overdue; sends a Slack reminder to the designated sales manager channel with the contact name and HubSpot link; task remains open until manually resolved.
Slack reminder posted at or after the 48-hour mark. Task still open and unmodified. No automated sequence started for this contact. Reminder contains correct contact details.
Test and QA PlanPage 3 of 4
FS-DOC-06Quality

04Phase 3 — end-to-end production test

Important before running Phase 3: use only an internal test email address controlled by the FullSpec team or your designated process owner (e.g. qa-test@[YourCompany.com]). Do not use a real prospect's email address. After the test completes, the FullSpec team will void and permanently delete the test contact record from HubSpot, remove the test event from Calendly, and delete the test email thread from the Gmail sent folder. Confirm these cleanup steps are completed before the sequence goes live to real leads.

Phase 3 runs the complete automation against the live production environment using a single controlled test record. Every step of the sequence is traced and verified. The FullSpec team runs cases T20 through T22. The process owner participates in T23 to review all outputs and record approval. Approval captured in T23 is the formal sign-off for go-live; no separate signature block is required.

ID
Scenario
Steps Covered
Expected Output
Pass Criteria
T20
Full end-to-end sequence: lead created through to sequence close
HubSpot contact created with lifecycle stage = Lead and all ICP fields populated using the internal test address. Time simulation used to advance Day 2 and Day 4 triggers. No reply or booking injected.
Lead Qualification Agent scores and tags the contact 'ICP: Qualified'. Welcome email arrives in the test inbox within 2 minutes. Day 2 and Day 4 follow-ups arrive on schedule. After Day 4 email, contact is tagged 'Long-Term Nurture' and removed from active sequence. HubSpot shows three touchpoints, correct lifecycle stages at each step, and a closed sequence status.
All three emails received in production test inbox in correct order with accurate personalisation. HubSpot contact record shows: qualification tag, 'Contacted' stage after Touch 1, three activity log entries, and 'Long-Term Nurture' tag after Touch 3. No manual steps required at any point.
T21
Booking detection and Slack alert in production
A new internal test contact enters the sequence; after the welcome email is sent, a Calendly test booking is made using the test email address against a live event type.
Sequence Messaging Agent detects the Calendly booking via webhook; stops the sequence; updates HubSpot contact stage to 'Meeting Booked'; Sales Alert Agent posts a formatted Slack message to the live sales channel within 60 seconds of the booking.
No Day 2 email sent after booking confirmed. HubSpot contact shows 'Meeting Booked' stage and a booking activity log entry. Slack message visible in the production sales channel with correct lead name, meeting time, and HubSpot link. Link resolves to the correct contact record.
T22
Error log and monitoring verification
Review the workflow platform's error log and audit trail after T20 and T21 have run.
Zero unhandled exceptions in the error log for both test runs. All workflow steps show completed status. Retry events (if any) are logged with timestamps and resolved. No silent failures present.
Error log reviewed and confirmed clean by the FullSpec team. Any retry events are documented and explained. Audit trail shows a continuous, unbroken execution chain for both test contacts from trigger to close.
T23
Process owner review and go-live approval
The process owner (Jordan Marsh, Sales Manager) reviews: both test email inboxes, the HubSpot contact records for both test runs, the Slack sales channel for the booking alert, and the workflow audit trail provided by the FullSpec team.
The process owner confirms: emails are correctly personalised and professionally formatted; HubSpot records are accurate at every stage; the Slack alert is clear and contains the right information; no unexpected behaviour was observed in either test run. Approval is recorded in the FullSpec project confirmation log.
Process owner approval recorded in the FullSpec confirmation log. Test contact records deleted from HubSpot, Calendly, and Gmail by the FullSpec team before go-live. Sequence cleared for live lead traffic.
After T23 approval is recorded, the FullSpec team will remove all sandbox credentials from the environment, confirm production API connections are the only active credentials, and notify the process owner at support@gofullspec.com that the sequence is live. Any issues identified after go-live should be reported to support@gofullspec.com with the affected HubSpot contact ID and a description of the unexpected behaviour.
Test and QA PlanPage 4 of 4

More documents for this process

Every document generated for Lead Nurture Sequence.

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