Back to New Client Onboarding Handoff

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

New Client Onboarding Handoff

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

This document defines the complete test and quality assurance programme for the New Client Onboarding Handoff automation. It is written for the FullSpec team responsible for building and verifying the three-agent workflow: Handoff Trigger Agent, Workspace Provisioning Agent, and Communications Agent. Testing runs in three sequential phases. No phase begins until the previous phase fully passes. The process owner joins Phase 3 to validate production behaviour and record sign-off.

01Testing approach

Testing is structured in three phases that must be completed in strict sequence. Every test case in a phase must reach a passing state before work begins on the next phase. This gates broken integration assumptions from reaching the production environment and ensures that each agent is verified in isolation before being tested as part of the full chain.

1
Phase 1: Unit Testing
Each agent tested in isolation against sandbox credentials
Scope
Individual agent logic: trigger parsing, field mapping, API calls, and output validation for Handoff Trigger Agent, Workspace Provisioning Agent, and Communications Agent separately.
Environment
Sandbox only. DocuSign Developer account, HubSpot sandbox portal, Google Drive test folder, Notion test workspace, Slack test channel (#onboarding-qa), Gmail sandbox alias.
Credential rule
No production API keys, OAuth tokens, or real deal records may be used at any point during Phase 1. All credentials must reference sandbox or developer accounts.
Pass condition
All test cases T01 through T15 return expected outputs with zero unhandled errors. Failure modes must produce the defined error state, not a silent skip.
Who runs it
FullSpec team only. Process owner is not involved in Phase 1.
2
Phase 2: Integration and Edge Case Testing
Agent handoffs and failure boundary conditions tested end to end in sandbox
Scope
Agent-to-agent handoff sequencing, data propagation across tool boundaries, and edge case behaviour for duplicate records, missing fields, unavailable APIs, and human timeout scenarios.
Environment
Sandbox only. Same credential set as Phase 1. No production data introduced.
Credential rule
Sandbox credentials only. Edge case simulations (API downtime, missing data) must be triggered via mock payloads or deliberate sandbox configuration, not by altering production systems.
Pass condition
All integration test cases T16 through T23 and all edge case cases E01 through E07 resolve to defined pass states. Retry logic, fallback routing, and error logging must be verified for every edge case.
Who runs it
FullSpec team only. Process owner is not involved in Phase 2.
3
Phase 3: End-to-End Production Test
Full workflow run against live credentials with real-format data
Scope
Complete automation sequence from DocuSign webhook to HubSpot audit log entry, using production credentials and a designated internal test client record.
Environment
Production. Live DocuSign account, live HubSpot portal, live Google Drive, live Notion, live Slack, and live Gmail OAuth. Test records must be clearly labelled and voided after the run.
Credential rule
Production credentials are permitted in Phase 3 only. Access must be scoped to the minimum permissions defined in the Integration and API Spec. No credentials are logged or stored in test artefacts.
Pass condition
All end-to-end cases T24 through T27 pass, including the process owner review case T27. The process owner records approval in the FullSpec confirmation tool. No separate signoff block is required.
Who runs it
FullSpec team runs T24 through T26. Process owner joins for T27 (review and approval). FullSpec records the outcome.
Test and QA PlanPage 1 of 4
FS-DOC-06Quality

02Phase 1 — unit test cases

Sandbox credentials only. Do not use production API keys, live OAuth tokens, real HubSpot deal IDs, or genuine DocuSign envelopes at any point during Phase 1. All inputs must be synthetic. Any test run that inadvertently touches a production system must be halted and logged immediately.

Handoff Trigger Agent: receives DocuSign webhook, extracts contract metadata, and updates HubSpot. Test cases cover the happy path plus key failure modes for webhook parsing and CRM field mapping.

ID
Scenario
Input
Expected Output
Pass Criteria
T01
Happy path: fully executed contract received
DocuSign webhook payload with status: completed, all required fields present (client name, deal value, contact email, envelope ID)
HubSpot deal updated to Closed Won; close date, contract value, and contact fields populated; deal tagged with onboarding workflow flag
HubSpot API returns 200; all mapped fields match input values; workflow tag present on deal record
T02
Webhook payload missing client email address
DocuSign payload with status: completed but recipient email field null
Agent halts; error event logged with envelope ID and missing field label; no partial HubSpot update written
No HubSpot write occurs; error log contains envelope ID, field name 'recipient_email', and timestamp
T03
Webhook payload with status: sent (not yet completed)
DocuSign payload with status: sent
Agent ignores event; no action taken; event discarded silently with a debug log entry
No downstream action triggered; debug log records payload status and reason for skip
T04
HubSpot deal ID not found (deal deleted or ID mismatch)
Valid DocuSign payload referencing a HubSpot deal ID that does not exist in the sandbox portal
Agent logs a not-found error; retries once after 60 seconds; if still not found, sends alert to error Slack channel and halts
Retry occurs exactly once; error Slack message posted to #automation-errors with deal ID and envelope ID; no further action
T05
HubSpot API returns 429 rate limit error
Valid DocuSign payload; HubSpot sandbox configured to return 429 on first call
Agent applies exponential backoff (30s, 60s, 120s); succeeds on retry within three attempts; deal updated correctly
Retry sequence logged with timestamps; final HubSpot write succeeds; no error alert raised if resolved within three retries
T06
Duplicate webhook delivery (same envelope ID received twice within 60 seconds)
Two identical DocuSign payloads with matching envelope IDs delivered 10 seconds apart
Second payload detected as duplicate via idempotency key check; second processing run skipped; single HubSpot update only
HubSpot shows exactly one update event; idempotency log records duplicate detection with envelope ID and skipped timestamp

Workspace Provisioning Agent: receives confirmation from the Handoff Trigger Agent, creates the Google Drive folder, populates the Notion workspace, and uploads the signed PDF.

ID
Scenario
Input
Expected Output
Pass Criteria
T07
Happy path: complete deal data received from Handoff Trigger Agent
HubSpot deal object with client name, contract value, scope, key contact name and email, envelope ID, and signed PDF URL
Google Drive folder created from template named '[ClientName] - Onboarding'; signed PDF uploaded; Notion page created from template with all fields pre-filled; Drive and Notion URLs written back to HubSpot deal record
Drive folder exists at correct path; PDF filename matches '[ClientName]_SignedContract.pdf'; Notion page title matches client name; HubSpot deal record contains both URLs
T08
Google Drive template folder not found (template ID misconfigured)
Valid deal data; Drive API call references a folder template ID that does not exist in sandbox
Agent logs error with template ID reference; halts Drive and Notion steps; sends alert to #automation-errors; does not attempt partial folder creation
No Drive folder created; error log contains template ID and error message; Slack alert posted; Notion step not triggered
T09
Notion API returns 503 service unavailable
Valid deal data; Drive folder successfully created; Notion API returns 503 on page creation call
Agent retries Notion call up to three times with 30-second intervals; if all retries fail, logs error with deal ID and Drive folder URL; sends alert; Drive folder is retained
Retry sequence logged; Drive folder not rolled back; error alert includes Drive URL so manual Notion creation is possible; no silent failure
T10
Signed PDF download from DocuSign fails (URL expired or access revoked)
Valid deal data; DocuSign document download URL returns 404
Agent logs PDF retrieval failure with envelope ID; creates Drive folder and Notion page without PDF; posts warning to #automation-errors noting missing document
Drive folder and Notion page created successfully; HubSpot updated with folder and page URLs; warning log and Slack alert reference missing PDF and envelope ID
T11
Client name contains special characters (e.g. ampersand, slash, apostrophe)
Deal record where client name is 'O'Brien & Sons / Trading'
Drive folder and Notion page created with sanitised name ('OBrien and Sons Trading'); HubSpot note records original name and sanitised version
No API error on folder or page creation; sanitised name applied consistently across both tools; original name preserved in HubSpot note

Communications Agent: sends the internal Slack handoff brief and the external Gmail welcome email using deal data from HubSpot.

ID
Scenario
Input
Expected Output
Pass Criteria
T12
Happy path: all template variables present, Slack and Gmail both reachable
HubSpot deal data with client name, scope, contract value, account manager name, Notion URL, Drive URL; Slack sandbox channel active; Gmail OAuth token valid
Slack message posted to #delivery-handoff with all fields populated and links present; welcome email delivered to sandbox recipient address with personalised subject and body; HubSpot deal timeline note added confirming both sends
Slack message visible in test channel within 30 seconds; email received in sandbox inbox within 60 seconds; HubSpot note timestamp within 90 seconds of trigger
T13
Gmail OAuth token expired
Valid deal data; Gmail OAuth token for account manager has expired (simulate by revoking sandbox token)
Agent logs OAuth failure with account manager email address; Slack message still sent successfully; error alert posted to #automation-errors requesting token refresh; email send queued for retry after token refresh
Slack message delivered; Gmail send not attempted silently; error log identifies specific OAuth account; alert text includes refresh instructions
T14
Slack channel not found or bot not a member
Valid deal data; Slack API call targets a channel ID that does not exist in sandbox workspace
Agent logs channel-not-found error with channel ID; email send proceeds independently; error alert posted to #automation-errors (using fallback channel ID)
Gmail welcome email delivered successfully; error log contains invalid channel ID; fallback alert delivered to a pre-configured error channel
T15
HubSpot account manager field is blank (no owner assigned to deal)
Deal record where the HubSpot deal owner field is null
Agent substitutes a default sender address (configured as a fallback in the automation platform settings); welcome email sent from default address; Slack message includes a note flagging missing deal owner
Email sent from fallback address; Slack message body contains text indicating deal owner was not set; HubSpot note records fallback sender used
Test and QA PlanPage 2 of 4
FS-DOC-06Quality

03Phase 2 — integration and edge case tests

Phase 2 verifies that the three agents hand off correctly to each other in sequence and that the full sandbox chain produces the expected combined output. Integration test IDs continue from the Phase 1 sequence.

ID
Scenario
Input
Expected Output
Pass Criteria
T16
Handoff Trigger Agent to Workspace Provisioning Agent: successful handoff
T01 passes; Handoff Trigger Agent emits confirmed deal object to the orchestration layer
Workspace Provisioning Agent receives deal object within 5 seconds; Drive folder and Notion page created; signed PDF uploaded
No data loss between agents; all HubSpot field values from T01 appear unchanged in the Notion page and Drive folder name
T17
Workspace Provisioning Agent to Communications Agent: successful handoff
T07 passes; Workspace Provisioning Agent emits confirmation with Drive URL and Notion URL
Communications Agent receives confirmation; Slack message includes valid Drive and Notion hyperlinks; Gmail email body includes Notion URL as a clickable link
Both URLs in Slack message and email resolve to the correct sandbox folder and page; links are not broken or malformed
T18
End-to-end sandbox chain: all agents in sequence, happy path
Single synthetic DocuSign webhook payload with all required fields; no errors injected
Full sequence completes: HubSpot updated, Drive folder created, Notion page populated, PDF uploaded, Slack message posted, welcome email sent, HubSpot audit note logged
All six outputs present within 3 minutes of webhook receipt; HubSpot timeline note is the final entry; no error events in the run log
T19
Workspace Provisioning Agent fails mid-run: Communications Agent must not fire
Valid DocuSign payload; Notion API configured to return 503 on all retries during this test run
Workspace Provisioning Agent exhausts retries and halts; Communications Agent does not receive a trigger signal; no Slack or email sent; error alert raised
Communications Agent run log shows no execution record; Slack channel has no new message; error alert in #automation-errors references workspace step failure
T20
HubSpot data completeness gate: incomplete fields trigger manual step prompt
DocuSign payload where contract value field maps to a blank HubSpot deal field
Automation pauses at completeness gate; Slack prompt posted to sales rep requesting missing field; workflow resumes after field is populated (simulated by manually updating the sandbox deal)
Pause event logged with deal ID and missing field name; Slack prompt delivered to correct sandbox user; workflow resumes within 60 seconds of sandbox field update
T21
Retry logic: transient API failure on Google Drive, recovers on second attempt
Valid deal data; Drive API configured to return 503 on first call only, then 200
Agent retries Drive call after 30 seconds; folder created successfully on second attempt; no error alert raised; run continues to Notion step
Run log shows one retry event; Drive folder exists; no error Slack message; total additional latency under 35 seconds
T22
HubSpot audit log entry written as final step after Communications Agent completes
Full sandbox chain completes (T18 scenario)
HubSpot deal timeline contains a timestamped note reading 'Onboarding handoff sequence completed: workspace created, brief sent, welcome email delivered'
HubSpot API confirms note creation via timeline activity endpoint; note body matches expected template text; timestamp is within 10 seconds of Gmail send confirmation
T23
Multi-client concurrency: two webhooks received within 30 seconds of each other
Two distinct synthetic DocuSign payloads with different envelope IDs and client names, delivered 20 seconds apart
Both onboarding sequences run independently and in parallel; outputs for Client A and Client B are fully separated in Drive, Notion, Slack, and HubSpot; no field crossover between records
Two distinct Drive folders created with correct client names; two separate Notion pages; two separate Slack messages; two separate HubSpot notes; no field from Client A appears in Client B record or vice versa

Edge case tests verify behaviour at the boundaries of expected input. These are tested in sandbox only. Each case must resolve to a defined, observable state with no silent failures.

ID
Scenario
Input
Expected Output
Pass Criteria
E01
Duplicate contract: same client onboarded twice within 24 hours
Two DocuSign payloads with the same client name and same contact email but different envelope IDs (e.g. re-sign scenario)
Both envelopes processed; second run creates a new Drive folder with a suffix (e.g. '[ClientName] - Onboarding 2'); HubSpot note on second run flags potential duplicate for review
No merge or overwrite of first run's assets; second folder name is unique; HubSpot note on second deal contains text 'Possible duplicate: review before proceeding'
E02
Missing deal data: all optional HubSpot fields blank, only required fields present
Deal record with only client name, contact email, and envelope ID populated; contract value, scope, and account manager all null
Workspace created with available data; Notion template fields for missing values display '[Not provided]' placeholder; Slack message omits missing sections cleanly; Gmail sent from fallback address
No agent crash; all three agents complete; output artefacts contain placeholder text for missing fields; run log notes which fields were absent
E03
Unavailable tool: Notion API returns 503 for entire test window (15 minutes)
Valid deal data; Notion API endpoint configured unreachable for duration of test
Handoff Trigger Agent and Drive steps complete; Notion step retries three times then halts; error alert sent; Drive folder and PDF remain intact; Communications Agent does not fire
Drive assets preserved; Notion not created; error alert in #automation-errors includes deal ID, Drive URL, and instruction to create Notion page manually; Communications Agent shows no execution
E04
Unavailable tool: Slack API unreachable
Valid deal data; Slack API configured to return connection timeout
Gmail welcome email sent successfully; Slack message retried twice then logged as failed; error alert delivered via a secondary channel (email to support@gofullspec.com in test config); HubSpot note still written
Gmail email delivered; Slack message absent; error email sent to configured fallback address; HubSpot note includes text 'Slack delivery failed: manual handoff brief required'
E05
Human timeout: sales rep does not complete missing CRM fields within 24 hours
DocuSign payload triggering completeness gate pause (T20 scenario); sandbox deal field left blank for simulated 24-hour window
Automation remains paused; a reminder Slack message is sent to the sales rep at the 24-hour mark; if still unresolved after 48 hours, escalation alert sent to the configured operations lead
Reminder message delivered at correct interval (verified using fast-forward simulation in sandbox); escalation alert contains deal ID, missing field, and operations lead name
E06
Malformed DocuSign payload: JSON structure valid but required keys absent
DocuSign webhook payload that is valid JSON but lacks the 'envelopeId' and 'recipients' keys entirely
Agent rejects payload at validation step; logs rejection with raw payload hash; no downstream action triggered; error alert posted to #automation-errors
No HubSpot write; no Drive, Notion, Slack, or Gmail action; error log contains payload hash and list of missing keys; alert delivered within 30 seconds
E07
Google Drive storage quota reached on test account
Valid deal data; Drive sandbox account configured at storage limit
Drive folder creation fails with quota error; agent logs error with account identifier and quota message; Notion and Communications steps do not proceed; error alert instructs reviewer to clear Drive space
Drive folder absent; error log contains 'STORAGE_QUOTA_EXCEEDED' string; Slack alert delivered; Notion and Gmail steps show no execution record
Test and QA PlanPage 3 of 4
FS-DOC-06Quality

04Phase 3 — end-to-end production test

Important before running Phase 3: use an internal test email address as the client recipient (e.g. qa-test@[YourCompany.com]) to prevent a real welcome email reaching an unintended contact. Create the test deal in HubSpot clearly labelled 'QA TEST - DO NOT PROCESS'. After each production run, void or delete the test deal record in HubSpot, remove the Drive folder, archive the Notion page, and delete the Slack message. Confirm all cleanup steps are completed before the go-live date.
Production OAuth tokens must be in place for all account managers before Phase 3 runs. Confirm Gmail OAuth, DocuSign production webhook endpoint registration, and HubSpot private app token scope (deals read/write, timeline write, contacts read) are all live and verified prior to starting T24.
ID
Scenario
Input
Expected Output
Pass Criteria
T24
Full production run: complete onboarding sequence triggered by a real DocuSign webhook
A designated internal test contract signed in the live DocuSign account using an internal test client record; all HubSpot fields pre-populated with realistic but clearly labelled test data
HubSpot deal moves to Closed Won within 60 seconds of signing; Drive folder created from production template and named correctly; Notion page created and pre-filled; signed PDF uploaded to Drive; Slack handoff brief posted to the live delivery channel; welcome email delivered to qa-test inbox; HubSpot audit note logged as final step
All seven outputs confirmed present and correctly populated within 5 minutes of DocuSign signing event; no manual intervention required; run log shows zero unhandled errors
T25
Error log verification: confirm production logging is active and accessible
T24 run complete; deliberate minor fault injected immediately after (e.g. send a malformed secondary webhook payload to the same endpoint)
Malformed payload rejected and logged in the production error log; log entry is queryable and contains payload hash, rejection reason, and timestamp; no action taken on the malformed payload
Error log accessible via the automation platform's monitoring interface; entry for the malformed payload present within 60 seconds; entry fields include timestamp, payload hash, and rejection reason string
T26
Post-run audit trail: HubSpot timeline confirms full sequence completion
T24 run complete; FullSpec team reviews the HubSpot deal timeline for the test record
Deal timeline contains at minimum four entries: Closed Won stage change, onboarding workflow triggered, workspace assets linked, and handoff completion note; each entry is timestamped and authored by the automation integration user
All four timeline entries present; timestamps are in correct chronological order; no gaps greater than 5 minutes between consecutive entries; integration user name matches the configured HubSpot private app identity
T27
Process owner review and approval: end-to-end output reviewed by the process owner against acceptance criteria
T24 and T25 and T26 all passed; process owner invited to review the full test run output including the Slack message, welcome email content, Notion page, Drive folder structure, and HubSpot timeline
Process owner confirms each output matches the agreed template and acceptance criteria; any requested adjustments are logged as change items; process owner records approval in the FullSpec confirmation tool, marking Phase 3 as complete and the automation as ready for go-live
Process owner approval recorded in FullSpec confirmation tool with date and name. All change items, if any, are documented and triaged before go-live. This case constitutes the final quality gate for the automation.
After T27 approval is recorded, the FullSpec team will complete the post-test cleanup checklist: void the QA test deal in HubSpot, delete the test Drive folder, archive the Notion test page, delete the Slack test message, and confirm the DocuSign test envelope is voided. The automation is then cleared for live operation. Any questions during or after Phase 3 testing can be directed to support@gofullspec.com.
Test and QA PlanPage 4 of 4

More documents for this process

Every document generated for New Client Onboarding Handoff.

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