Back to Quote Generation & Follow-up

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

Quote Generation & Follow-up

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

This document defines the complete quality assurance process for the Quote Generation and Follow-up automation. It covers every test case the FullSpec team runs before any code reaches production, from isolated agent unit tests through to a supervised end-to-end run on live credentials. The FullSpec team executes Phases 1 and 2 entirely; the process owner joins Phase 3 to confirm the production flow and record sign-off. No phase begins until all cases in the previous phase carry a Pass status.

01Testing approach

Testing runs in three sequential phases: Unit, Integration, and End-to-end. Each phase must reach a full Pass before the next phase opens. This gate prevents integration tests from masking agent-level defects, and prevents production credentials from being used before the full stack has been validated in sandbox. The FullSpec team owns all execution; the process owner is required only in Phase 3 to verify the business outcome and record approval.

1
Phase 1: Unit Testing
Each agent tested in isolation against sandbox credentials
Scope
Individual agent logic: trigger detection, data fetch, document generation, Slack routing, Gmail send, follow-up sequencing, Xero invoice creation.
Environment
Sandbox only. No production API credentials are used in this phase.
Credential rule
HubSpot sandbox account, PandaDoc sandbox workspace, Google Sheets test copy, Gmail test alias, Slack test workspace, Xero demo company.
Pass condition
All cases T01 through T14 return the expected output with zero unhandled errors.
Who runs it
FullSpec team only.
2
Phase 2: Integration and Edge Case Testing
Agent handoffs and failure mode coverage in sandbox
Scope
Agent-to-agent handoffs across the full chain, plus edge cases: duplicate triggers, missing data fields, tool unavailability, and manager approval timeout.
Environment
Sandbox only. Simulated failure conditions applied via mocked API responses and intentionally malformed test records.
Credential rule
Same sandbox credentials as Phase 1. No production tokens introduced.
Pass condition
All cases T15 through T21 pass and all edge cases E01 through E06 either recover gracefully or route correctly to the error handler.
Who runs it
FullSpec team only.
3
Phase 3: End-to-End Production Test
Full flow on live credentials with process owner present
Scope
One complete quote cycle traced from HubSpot stage change through PandaDoc delivery, Slack approval, Gmail send, follow-up sequence, Xero invoice creation, and CRM close.
Environment
Production. Live HubSpot, PandaDoc, Google Sheets, Gmail, Slack, and Xero accounts.
Credential rule
Production credentials used for the first time. Internal test contact address only; test deal voided after the run.
Pass condition
All cases T22 through T25 pass, including the process owner review case T25 which constitutes formal sign-off.
Who runs it
FullSpec team executes; process owner observes and completes T25 approval.
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 substitute or temporarily swap in any production API key, token, or OAuth credential during this phase. If a sandbox environment is unavailable for any tool, that tool's tests must be blocked and the phase paused until a sandbox is confirmed.

Quote Builder Agent — Estimated build time: 10 hours. Complexity: Moderate.

ID
Scenario
Input
Expected output
Pass criteria
T01
Happy path: standard quote, no discount
HubSpot deal at 'Quote Requested' stage; all required fields populated; no discount applied.
PandaDoc draft created with correct client name, line items, pricing, and expiry date. No blank variable fields.
PandaDoc API returns document ID; all template variables populated; draft status confirmed.
T02
Happy path: quote with discount below approval threshold
HubSpot deal with 10% discount applied (below 15% threshold).
PandaDoc draft created with discount reflected; approval flag NOT raised; document proceeds directly to send path.
Discount field in PandaDoc matches input; approval branch not triggered; workflow advances without Slack message.
T03
Discount at or above approval threshold
HubSpot deal with 15% discount applied.
PandaDoc draft created; approval flag raised; workflow routes to Slack approval branch.
Slack message posted to manager channel with quote summary and PandaDoc link; workflow pauses awaiting response.
T04
Missing HubSpot field: contact email absent
HubSpot deal missing prospect email address.
Workflow halts; error logged; Slack alert posted to designated error channel; no PandaDoc document created.
Error log entry present with deal ID and field name; no document created in PandaDoc; Slack error message received.
T05
Pricing row not found in Google Sheets
HubSpot deal references a product SKU that does not exist in the pricing table.
Workflow halts at pricing fetch step; error logged with SKU reference; no document created.
Error log contains SKU value and deal ID; PandaDoc draft not initiated; no data written to HubSpot.
T06
PandaDoc template variable mismatch
Google Sheets pricing fetched correctly but a HubSpot field name does not match the PandaDoc template variable key.
Document creation fails; error logged identifying the mismatched variable key; workflow halts.
PandaDoc API returns a 422 or equivalent; error captured in log with variable name; no blank-field document sent forward.

Approval and Send Agent — Estimated build time: 10 hours. Complexity: Moderate.

ID
Scenario
Input
Expected output
Pass criteria
T07
Happy path: manager approves via Slack
Slack approval message posted; manager clicks Approve within timeout window.
Approved PandaDoc document sent to prospect via Gmail with personalised cover message; HubSpot updated to 'Quote Sent'.
Gmail delivery confirmed; HubSpot stage reads 'Quote Sent'; PandaDoc document status is 'Sent'; Slack confirmation message posted.
T08
Manager rejects via Slack with comment
Manager clicks Reject in Slack and provides a short text reason.
Workflow halts send; rejection reason logged to HubSpot deal notes; Slack notification sent to sales rep with reason.
HubSpot note contains rejection text; PandaDoc document remains in draft; no Gmail send initiated; rep notified in Slack.
T09
Gmail personalisation fields populated correctly
HubSpot contact record with first name, company name, and deal title present.
Gmail cover message contains correct first name, company name, and deal-specific subject line.
Gmail message body parsed; all three personalisation tokens replaced with correct values; no literal placeholder text present.
T10
Slack workspace unreachable at approval post time
Simulated Slack API timeout during approval message post.
Retry attempted up to three times with exponential backoff; if all retries fail, error logged and fallback email sent to manager's Gmail address.
Retry count recorded in log; fallback email sent and confirmed delivered; workflow does not silently stall.
T11
Gmail send fails: authentication error
Simulated Gmail OAuth token expiry during send action.
Send attempt fails; error logged with OAuth context; Slack alert raised to FullSpec error channel; no duplicate send attempted.
Error log entry present; no email in prospect inbox; Slack alert received; token refresh mechanism triggered for retry.

Follow-up and Close Agent — Estimated build time: 12 hours. Complexity: Moderate.

ID
Scenario
Input
Expected output
Pass criteria
T12
Happy path: prospect signs before day 3 follow-up
PandaDoc signing event received within 48 hours of send.
Follow-up sequence cancelled; Xero draft invoice created with matching line items; HubSpot stage updated to 'Won'.
Xero invoice contains correct line items and totals matching PandaDoc; HubSpot stage reads 'Won'; no follow-up email sent.
T13
Day 3 follow-up sent when no response
No PandaDoc signing or open event by 72 hours post-send.
Day 3 follow-up email sent to prospect via Gmail; send logged in HubSpot.
Gmail delivery confirmed at 72-hour mark (plus or minus 5 minutes); HubSpot note updated with follow-up timestamp.
T14
Quote expires with no response: stage moved to Lost
No signing event by day 7 follow-up deadline; quote expiry date reached.
HubSpot stage updated to 'Lost'; sales rep notified via Slack; no Xero invoice created.
HubSpot stage reads 'Lost'; Slack notification delivered to rep; Xero has no corresponding draft invoice.
Test and QA PlanPage 2 of 4
FS-DOC-06Quality

03Phase 2 — integration and edge case tests

Integration tests verify that data passes correctly across agent boundaries and that the orchestration layer handles the full handoff chain without data loss or duplication. IDs continue from Phase 1.

ID
Scenario
Input
Expected output
Pass criteria
T15
Quote Builder to Approval and Send handoff: discount path
Quote Builder Agent completes a draft for a 15% discount deal and posts the handoff event.
Approval and Send Agent receives the handoff payload; Slack message posted within 30 seconds; PandaDoc document ID preserved across agents.
Slack message contains correct document ID; no data loss between agents; timestamp within 30 seconds of handoff event.
T16
Quote Builder to Approval and Send handoff: no-discount path
Quote Builder Agent completes a standard (no-discount) draft and posts handoff event.
Approval and Send Agent bypasses Slack approval step and proceeds directly to Gmail send.
Gmail send initiated without any Slack message; HubSpot updated correctly; handoff payload fields intact.
T17
Approval and Send to Follow-up and Close handoff
Approval and Send Agent logs 'Quote Sent' event to HubSpot; handoff event fires.
Follow-up and Close Agent activates and begins monitoring PandaDoc for signing event; day 3 timer starts.
Follow-up agent confirms activation in log; timer start timestamp recorded; PandaDoc webhook listener confirmed active.
T18
Full chain: quote requested to invoice created
End-to-end sandbox run with standard pricing, no discount, and a simulated signing event at hour 24.
All three agents execute in sequence; Xero draft invoice created; HubSpot stage reads 'Won'; no follow-up emails sent.
All intermediate states logged; Xero invoice line items match PandaDoc values; HubSpot final stage correct; timing within expected windows.
T19
Full chain: discount path with manager rejection then resubmission
Deal with 20% discount; manager rejects via Slack; rep corrects discount to 10% and resubmits; second run processes without approval gate.
Rejection logged; second trigger fires cleanly; no-discount path executes; quote sent to prospect.
First run rejection present in HubSpot notes; second run completes without duplicate records; single Gmail send confirmed.
T20
Xero invoice line items match PandaDoc values exactly
Signed PandaDoc document with three distinct line items and a volume discount.
Xero draft invoice contains identical line items, quantities, unit prices, and discount value.
Field-by-field comparison of Xero invoice payload and PandaDoc document data returns zero mismatches.
T21
HubSpot stage audit: all transitions logged correctly
Full sandbox run from 'Quote Requested' through 'Quote Sent' to 'Won'.
HubSpot deal activity log shows three stage transitions with correct timestamps and source attribution.
HubSpot API deal history endpoint returns all three transitions; no missing or duplicated stage entries.

Edge case tests cover conditions outside the happy path that the agents must handle without failing silently or corrupting data.

ID
Scenario
Input
Expected output
Pass criteria
E01
Duplicate HubSpot trigger: same deal fires twice in rapid succession
Two 'Quote Requested' webhook events arrive within 5 seconds for the same deal ID.
Idempotency check detects the duplicate; second run discarded; single PandaDoc document created.
Only one PandaDoc document exists for the deal; second run logged as duplicate and suppressed.
E02
Missing Google Sheets pricing data: sheet tab not found
HubSpot deal references a product category whose sheet tab has been renamed or deleted.
Workflow halts at pricing fetch; structured error message sent to sales rep via Slack with tab name reference.
No document created; Slack error message contains the expected tab name; deal stage not advanced.
E03
PandaDoc API rate limit hit during bulk test run
More than 10 document creation requests within 60 seconds exceeds PandaDoc sandbox rate limit.
Queue-based retry with exponential backoff; requests reprocessed in order; no data loss or skipped documents.
All documents eventually created; retry count logged per document; no permanent failures caused by rate limiting.
E04
Xero API unavailable at invoice creation time
Simulated Xero 503 response at the moment Follow-up and Close Agent attempts invoice creation.
Retry up to three times; if all fail, error logged and Slack alert sent to process owner; HubSpot still updated to 'Won'.
HubSpot stage reads 'Won' regardless; Xero retry attempts logged; Slack alert delivered; invoice creation queued for manual follow-up.
E05
Manager approval timeout: no Slack response within 24 hours
Slack approval message posted; manager does not respond within the 24-hour timeout window.
Timeout event fires; escalation Slack message sent to secondary approver or process owner; workflow paused pending response.
Escalation message delivered to correct channel; primary Slack thread updated with timeout notice; no auto-approve or auto-reject occurs.
E06
Prospect email address contains formatting error in HubSpot
HubSpot contact email field contains a value that fails RFC 5322 validation (e.g. missing domain).
Gmail send step validates address format before attempting send; validation fails; error logged; rep notified via Slack.
No Gmail send attempted; validation error present in log with the malformed address redacted; Slack notification delivered to rep.
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 prospect contact in HubSpot. Do not use a real prospect's address. After the test run completes, void the PandaDoc test document, delete or archive the HubSpot test deal, and delete the Xero draft invoice before any accounting period closes. The FullSpec team will confirm each cleanup step is complete before go-live is declared.
Phase 3 uses live production credentials for the first time. Confirm that all API keys, OAuth tokens, Slack workspace connections, and Xero company credentials are the production values before running T22. The FullSpec team will verify credential parity with the Integration and API Spec before the run begins.
ID
Scenario
Input
Expected output
Pass criteria
T22
Full production run: standard quote, no discount, prospect signs
Live HubSpot deal moved to 'Quote Requested' with real pricing SKUs; internal test email as prospect; simulated signing via PandaDoc test signer.
Quote Builder Agent fetches live pricing and generates PandaDoc document. Approval and Send Agent sends personalised Gmail to test address. HubSpot updated to 'Quote Sent'. Signing event triggers Follow-up and Close Agent. Xero draft invoice created. HubSpot updated to 'Won'.
Each step verified in sequence: PandaDoc document ID present; Gmail received at test inbox; HubSpot stage transitions correct; Xero invoice line items match PandaDoc values; all intermediate logs clean.
T23
Full production run: discount above threshold, manager approves via Slack
Live HubSpot deal with 15% discount applied; internal test email as prospect; process owner acts as manager in Slack.
Slack approval message posted to production sales manager channel. Manager approves. Gmail sent to test inbox. HubSpot and PandaDoc updated correctly.
Slack message received in correct production channel; approval response recorded in log; Gmail delivered within 2 minutes of approval; all HubSpot fields updated.
T24
Error log verification: confirm monitoring is active in production
FullSpec team deliberately triggers a known error condition (invalid SKU) in the production environment immediately after T23 cleanup.
Error captured in the production error log; Slack alert delivered to the designated error channel; no unhandled exception propagates.
Error log entry timestamped and contains deal ID and error type; Slack alert received within 60 seconds; system recovers without manual intervention.
T25
Process owner review and approval: formal go-live sign-off
Process owner reviews the T22 and T23 run outputs, checks HubSpot deal history, confirms Gmail delivery, inspects Xero draft invoice, and reviews the Slack approval thread.
Process owner confirms all outputs match the agreed specification and records approval in the FullSpec confirmation portal. FullSpec team logs the approval timestamp and marks the QA plan as passed.
Process owner approval recorded in the FullSpec confirmation portal. Approval timestamp and reviewer name logged by the FullSpec team. QA plan status set to Passed. No separate sign-off document required.
Once T25 is recorded as Passed, the FullSpec team will schedule the go-live briefing with the sales team and issue the SOP and Runbook. Any failed case in Phase 3 resets the phase; the FullSpec team will diagnose, fix, and rerun from T22. Contact the FullSpec team at support@gofullspec.com for any queries during or after the QA process.
Test and QA PlanPage 4 of 4

More documents for this process

Every document generated for Quote Generation & Follow-up.

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