Back to Proposal Creation

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

Proposal Creation Automation

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

This document defines the complete test and quality assurance programme for the Proposal Creation automation, covering the Proposal Assembly Agent and the Approval and Delivery Agent. Testing runs in three sequential phases: unit tests in a sandbox environment, integration and edge-case tests across agent handoffs, and a final end-to-end production run. The FullSpec team executes Phases 1 and 2 independently. Your process owner joins Phase 3 to review real output and record formal sign-off. No phase begins until the previous phase has fully passed.

01Testing approach

All testing follows three phases in strict sequence. No phase begins until every test case in the previous phase has reached a passing status. This sequencing ensures that integration and production tests are never run on top of unresolved unit failures, and that real prospect data is never touched until the automation is confirmed stable.

1
Phase 1: Unit Testing
Test each agent in isolation against sandbox data
Scope
Individual agent logic: HubSpot trigger parsing, pricing resolution, PandaDoc document generation, Slack message formatting, Gmail send composition, and HubSpot deal update writes. Each tested independently with mocked inputs.
Environment
Sandbox only. HubSpot sandbox account, PandaDoc sandbox workspace, Slack test channel (#automation-qa), Gmail test alias.
Credential rule
No production API keys permitted at this phase. All credentials must be sandbox-scoped tokens stored in the automation platform's test credential vault.
Pass condition
All test cases T01 through T14 return the expected output with zero data errors. Any single failure blocks advancement to Phase 2.
Who runs it
FullSpec team only. No process owner involvement required.
2
Phase 2: Integration and Edge Case Testing
Test agent handoffs and exception scenarios
Scope
End-to-end agent handoffs between the Proposal Assembly Agent and the Approval and Delivery Agent, plus all defined edge cases: duplicate triggers, missing CRM fields, unavailable external tools, and human approval timeout scenarios.
Environment
Sandbox for integration handoff tests. Edge-case tool-unavailability tests use controlled network-level mocking to simulate API failures without touching production systems.
Credential rule
Sandbox credentials continue. No production keys. Slack interactive button tests use the dedicated #automation-qa test channel only.
Pass condition
All integration test cases T15 through T20 pass and all edge-case test cases E01 through E06 pass or produce the correct documented fallback behaviour. Any critical failure blocks Phase 3.
Who runs it
FullSpec team only. No process owner involvement required.
3
Phase 3: End-to-End Production Test
Full live run with real deal data, process owner present
Scope
A complete production run from HubSpot deal stage change through proposal generation, Slack approval, Gmail delivery, and HubSpot deal update. Covers one clean approval path and one change-request path. Error logs inspected after each run.
Environment
Production. All production API credentials active. Test deal records use an internal test company name and an internal recipient email address. Records are voided or deleted immediately after each test.
Credential rule
Production credentials active. Confirm that all sandbox tokens have been rotated out and replaced with production-scoped credentials before this phase begins.
Pass condition
All test cases T21 through T25 pass including the process owner review case T25. Approval recorded in the FullSpec confirmation log.
Who runs it
FullSpec team executes T21 through T24. The process owner (sales manager) joins for T25 to review output and confirm sign-off.
Test and QA PlanPage 1 of 4
FS-DOC-06Quality

02Phase 1 — unit test cases

Sandbox credentials only for all Phase 1 tests. Do not connect any production HubSpot, PandaDoc, Slack, or Gmail credentials at this phase. All test deal records must be created in the HubSpot sandbox account and all generated PandaDoc documents must be created in the PandaDoc sandbox workspace. Confirm credential scope before running T01.

Proposal Assembly Agent — Unit Tests

ID
Scenario
Input
Expected Output
Pass Criteria
T01
Happy path: webhook fires on correct deal stage
HubSpot sandbox deal moves to 'Proposal Requested' stage with all required fields populated
Automation platform receives webhook payload; agent execution begins within 5 seconds
Execution log shows trigger received; no timeout or parse error
T02
Happy path: deal properties parsed correctly
Sandbox deal with contact name, company, product line A, deal value $12,000, standard discount tier 2
Structured data object contains: contact_name, company_name, product_line='A', deal_value=12000, discount_pct=10
All five fields present and correctly typed in the agent's resolved data object
T03
Happy path: pricing tier resolved correctly
Product line A, deal value $12,000, tier 2 discount rule stored in automation config
Unit price, discount amount, and net total calculated correctly and match expected values
Calculated net total equals $10,800 (12000 minus 10%); no rounding error
T04
Happy path: PandaDoc document created from template
Resolved data object from T03 injected into PandaDoc sandbox template ID 'proposal-master-v3'
New PandaDoc document created with all template variables populated; document status = 'draft'
PandaDoc API returns document_id; all mapped variables confirmed non-empty in document preview
T05
Happy path: expiry date set correctly
Deal created date = today; expiry rule = 14 days
PandaDoc document expiry_date = today + 14 calendar days
Expiry date in generated document matches expected date; no off-by-one error
T06
Failure: required HubSpot field missing (contact email)
Sandbox deal with contact_email field blank; all other fields populated
Agent halts document generation; flags missing field; does not create PandaDoc document
Execution log records 'validation_failed: contact_email missing'; no PandaDoc document created; alert posted to #automation-qa
T07
Failure: unrecognised product line code
Sandbox deal with product_line = 'ZZZ' (not in pricing config)
Agent halts; logs pricing resolution error; does not proceed to document generation
Log records 'pricing_error: unknown product_line ZZZ'; no document created; deal stage not advanced
T08
Failure: PandaDoc template variable name mismatch
Resolved data object uses field key 'client_name'; template expects 'prospect_name'
Document created but mismatched variable renders as blank; agent detects blank variable and flags error
Agent post-generation validation catches blank variable; logs 'template_variable_mismatch: prospect_name'; document not forwarded to approval step
T09
Failure: PandaDoc API returns 429 rate-limit error
Automated retry triggered after PandaDoc returns HTTP 429
Agent waits 10 seconds and retries up to 3 times before marking the run as failed
Execution log shows three retry attempts with timestamps; final status = 'pandadoc_unavailable'; Slack alert sent to #automation-qa

Approval and Delivery Agent — Unit Tests

ID
Scenario
Input
Expected Output
Pass Criteria
T10
Happy path: Slack approval message posted correctly
PandaDoc draft document_id passed to Approval and Delivery Agent; manager Slack user ID configured
Slack message posted to #automation-qa with deal summary, PandaDoc preview link, and two buttons: Approve / Request Changes
Slack API returns 200; message visible in channel with both interactive buttons rendered
T11
Happy path: manager clicks Approve
Slack interactive button payload: action_id='approve', manager user ID matches configured approver
Agent receives approval event; proceeds to Gmail send step; does not loop back
Execution log records 'approval_received: approved'; Gmail send step initiated within 3 seconds
T12
Happy path: Gmail proposal email sent to prospect
Approved PandaDoc document link + prospect email address from deal record
Gmail sends email from configured sender alias with personalised subject, prospect name, company name, and PandaDoc link in body
Gmail API returns message_id; sent message appears in Sent folder of test Gmail alias; all personalisation tokens rendered correctly
T13
Happy path: HubSpot deal updated after send
Gmail send confirmed; deal_id passed to HubSpot update step
HubSpot deal stage updated to 'Proposal Sent'; activity logged with timestamp and PandaDoc document_id stored in custom field 'pandadoc_id'
HubSpot API returns 200 for both the stage update and the activity log; deal record reflects correct values in sandbox CRM
T14
Failure: manager clicks Request Changes
Slack interactive button payload: action_id='request_changes', comment='Please add enterprise SLA section'
Agent posts notification to sales rep in #automation-qa with manager's comment and PandaDoc edit link; Gmail send step does not fire; deal stage not advanced
Execution log records 'approval_received: changes_requested'; rep notification posted; no Gmail send event in log; HubSpot deal stage unchanged
Test and QA PlanPage 2 of 4
FS-DOC-06Quality

03Phase 2 — integration and edge case tests

Integration Tests — Agent Handoffs

ID
Scenario
Input
Expected Output
Pass Criteria
T15
Handoff: Proposal Assembly Agent completes and triggers Approval and Delivery Agent
Sandbox deal passes all T01-T05 checks; Proposal Assembly Agent marks draft as complete
Approval and Delivery Agent starts within 5 seconds of Proposal Assembly Agent completion event; Slack message posted
Execution log shows sequential agent_start events with no gap exceeding 10 seconds; no manual intervention required
T16
Handoff: PandaDoc document_id correctly passed between agents
Proposal Assembly Agent outputs document_id = 'doc-sandbox-001'; Approval and Delivery Agent receives payload
Slack message preview link and Gmail body both reference 'doc-sandbox-001'; no document_id mismatch
Document ID consistent across Slack message, Gmail body, and HubSpot custom field after full run
T17
Handoff: change-request loop returns correctly to rep without retriggering assembly agent
Manager clicks Request Changes; rep edits PandaDoc manually; rep marks revision complete in configured workflow step
Approval and Delivery Agent resubmits revised document to Slack for re-approval; Proposal Assembly Agent does not refire
Log shows single Proposal Assembly Agent execution; second Slack approval message references updated document version
T18
Handoff: full approve path completes all downstream steps in sequence
Manager approves in Slack; Gmail send fires; HubSpot update fires
Gmail sent, HubSpot stage = 'Proposal Sent', activity logged, pandadoc_id stored — all within a single execution run
All three post-approval steps present in execution log with success status; no step skipped or out of order
T19
Handoff: duplicate HubSpot webhook received for same deal
HubSpot fires webhook twice for the same deal_id within 30 seconds (simulated retry)
Idempotency check detects duplicate; second execution halted; no second PandaDoc document created
Execution log records 'duplicate_trigger_suppressed: deal_id=XYZ'; single document in PandaDoc sandbox
T20
Handoff: Slack response arrives after Approval and Delivery Agent has been waiting 25 minutes
Slack approval button clicked 25 minutes after message posted (within 30-minute timeout window)
Agent accepts late response; proceeds to Gmail send; no timeout error triggered
Execution log records approval timestamp; Gmail send fires successfully; no 'timeout_exceeded' error in log

Edge Case Tests

ID
Scenario
Input
Expected Output
Pass Criteria
E01
Duplicate trigger: same deal moves to 'Proposal Requested' twice within 10 minutes
HubSpot deal stage toggled back and then forward again by rep within 10-minute window
Second trigger suppressed by idempotency guard; no second proposal generated; rep notified via #automation-qa that a document already exists for this deal
Single PandaDoc document in sandbox; notification present in Slack channel; log shows suppression event
E02
Missing data: deal_value field is zero or null at trigger time
HubSpot deal with deal_value = null enters 'Proposal Requested' stage
Proposal Assembly Agent halts at pricing resolution step; flags 'deal_value_missing'; posts alert to #automation-qa with deal link for manual correction
No PandaDoc document created; Slack alert contains correct deal URL; deal stage not advanced past 'Proposal Requested'
E03
Missing data: prospect email address absent from HubSpot contact record
Proposal assembled successfully; Gmail send step receives null value for recipient email
Approval and Delivery Agent halts at Gmail send step; logs 'recipient_email_missing'; notifies rep; HubSpot deal stage held at 'Proposal Requested'
No email sent; rep notification includes instructions to add email to HubSpot contact record and re-trigger
E04
Unavailable tool: PandaDoc API returns HTTP 503 for more than 3 consecutive retries
PandaDoc sandbox endpoint mocked to return 503 for 4 consecutive requests
Agent exhausts retry logic after 3 attempts; posts 'pandadoc_unavailable' alert to #automation-qa; execution paused; deal stage unchanged
Execution log shows 3 retry entries plus final 'max_retries_exceeded' status; no partial document created; alert visible in Slack
E05
Unavailable tool: HubSpot API rate limit hit during deal update step
HubSpot sandbox mocked to return HTTP 429 on deal stage update call
Agent queues the update and retries after 15-second back-off; succeeds on second attempt without failing the overall run
Execution log shows one 429 response, one 15-second wait, then a successful 200 response; deal stage updated correctly
E06
Human timeout: Slack approval message receives no response within 30 minutes
Approval and Delivery Agent posts Slack message; no button click received within 30-minute window
Agent posts a reminder message to the manager in #automation-qa after 30 minutes; if no response after a further 30 minutes, escalates to the configured fallback contact and pauses the run
First reminder visible in Slack at 30-minute mark; escalation message visible at 60-minute mark; execution status = 'awaiting_approval_escalated'; no proposal sent
Test and QA PlanPage 3 of 4
FS-DOC-06Quality

04Phase 3 — end-to-end production test

Important before running Phase 3: All production test runs must use an internal test email address (for example qa-test@[YourCompany.com]) as the proposal recipient. Do not use a real prospect's email address. Every PandaDoc document created during Phase 3 testing must be voided in PandaDoc and every HubSpot deal record created must be deleted or re-staged immediately after each test case is confirmed. Confirm these housekeeping steps are completed before moving to the next test case. Phase 3 may only begin after every Phase 1 and Phase 2 test case has passed.
ID
Scenario
Input
Expected Output
Pass Criteria
T21
Full production run: clean approval path, all fields populated
Production HubSpot deal with all required fields populated; product line and pricing tier confirmed; deal moved to 'Proposal Requested' by FullSpec test user
PandaDoc document generated with correct contact, pricing, and expiry date; Slack approval message posted to production sales manager channel; on approval, Gmail sent to qa-test@[YourCompany.com]; HubSpot updated to 'Proposal Sent' with activity log and pandadoc_id stored
All seven automation steps complete with success status in execution log; total elapsed time from trigger to Gmail send under 3 minutes; no blank template variables; PandaDoc document voided post-test; deal re-staged post-test
T22
Full production run: change-request path with rep revision and re-approval
Same production deal as T21; sales manager clicks Request Changes with comment in Slack
Rep notified with manager comment; rep applies edits to PandaDoc document manually; revised document re-submitted to approval loop; second Slack approval message posted; manager approves second version; Gmail sent; HubSpot updated
Execution log shows single Proposal Assembly Agent run; two Approval and Delivery Agent approval events; final Gmail send and HubSpot update both succeed; PandaDoc document voided; deal re-staged post-test
T23
Error log verification: inspect execution log for anomalies across T21 and T22
Execution logs from T21 and T22 reviewed in the automation platform's run history
No unexpected error events, no skipped steps, no duplicate write events to HubSpot, no extra PandaDoc documents created
FullSpec team confirms log is clean: zero error-level entries, all step durations within expected ranges, no orphaned documents in PandaDoc sandbox or production workspace
T24
Multi-product deal: proposal with two product lines and blended discount
Production deal with product_line_A and product_line_B both selected; blended discount rule applies; deal value $22,000
PandaDoc document contains two pricing rows, correct unit prices per product line, blended discount applied to total, net total = $19,800; all other fields correct
Both pricing rows present in generated document; calculated net total matches expected value; no pricing rows missing or duplicated; document voided post-test
T25
Process owner review and approval: sales manager reviews T21 output and confirms automation is production-ready
Sales manager reviews the PandaDoc document output from T21, the Gmail sent to the test address, and the HubSpot deal record update
Sales manager confirms: document content is accurate, formatting matches brand standards, Gmail personalisation is correct, HubSpot activity log is complete. Process owner approval recorded in FullSpec confirmation log.
Process owner sign-off recorded in the FullSpec confirmation system. No separate signature block required. This case constitutes formal acceptance that Phase 3 is complete and the automation is cleared for production go-live.
Once T25 is confirmed, the FullSpec team will update the project status to 'QA Complete' and issue the go-live confirmation to your team. Any issues identified during Phase 3 are logged as blocking items and must be resolved before go-live is declared. Contact the FullSpec team at support@gofullspec.com to report a Phase 3 failure or to request a re-run of any test case.
Test and QA PlanPage 4 of 4

More documents for this process

Every document generated for Proposal Creation.

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