FS-DOC-06Quality
Test and QA Plan
Customer Satisfaction Surveying
[YourCompany.com] · Customer Support Department · Prepared by FullSpec · [Today's Date]
This document defines the complete test and quality assurance programme for the Customer Satisfaction Surveying automation. It covers three sequential test phases: unit testing of each individual agent, integration and edge-case testing across agent handoffs, and a final end-to-end production run. The FullSpec team executes Phases 1 and 2 in full; the process owner joins Phase 3 to review real output and record approval. No phase begins until every test case in the previous phase carries a passing result.
01Testing approach
Testing runs in three phases in sequence. No phase begins until the previous phase fully passes. Phase 1 validates each agent in isolation using sandbox credentials and synthetic data. Phase 2 validates the handoff points between agents and exercises edge cases including missing data, duplicate suppression, tool unavailability, and human timeout scenarios. Phase 3 executes a complete production run using real credentials, traced from the HubSpot ticket closure trigger through to the Google Sheets row append and, where applicable, the Slack detractor alert.
1Phase 1: Unit Testing
Each agent tested in isolation
Scope
Survey Dispatch Agent and Response Processing Agent tested independently using synthetic trigger events and mock payloads.
Environment
Sandbox only. No production HubSpot pipeline, live Gmail account, or real Typeform form used at this phase.
Credential rule
Sandbox credentials exclusively. All OAuth tokens, API keys, and webhook secrets must be sandbox-scoped. No production credentials may be entered or referenced.
Pass condition
All test cases T01 through T12 return the expected output with no unhandled errors. Any failure blocks progression to Phase 2.
Who runs it
FullSpec team only.
2Phase 2: Integration and Edge-Case Testing
Agent handoffs and failure mode validation
Scope
End-to-end agent handoff from Survey Dispatch Agent to Response Processing Agent, plus all edge cases: duplicates, missing fields, tool unavailability, and human timeout.
Environment
Sandbox environment throughout. Integration tests use sandbox versions of HubSpot, Typeform, Slack, and Google Sheets.
Credential rule
Sandbox credentials only. Slack alerts must route to a dedicated test channel, not the live support manager channel.
Pass condition
All integration test cases T13 through T19 and all edge-case cases E01 through E06 pass without data loss or unhandled exceptions.
Who runs it
FullSpec team only.
3Phase 3: End-to-End Production Test
Full production run with process owner sign-off
Scope
A controlled real-world run using a designated internal test ticket, real production credentials, and live tool connections across HubSpot, Gmail, Typeform, Slack, and Google Sheets.
Environment
Production. All credentials are live. The test ticket and survey response must be voided after testing completes.
Credential rule
Production credentials active. The test email address must be an internal address owned by [YourCompany.com]. No real customer is contacted during Phase 3 testing.
Pass condition
All production test cases T20 through T25 pass, error logs are clean, and the process owner records approval in the FullSpec confirmation (test case T25).
Who runs it
FullSpec team executes. Process owner reviews outputs and records approval at T25.
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 pipelines, live Gmail sending accounts, or real Typeform forms at this stage. All OAuth tokens and API keys used here must be scoped to sandbox or developer test environments. Any test that touches a real customer record or sends a real email is an automatic failure.
Survey Dispatch Agent — estimated build time: 12 hours, complexity: Moderate.
ID
Scenario
Input
Expected Output
Pass Criteria
T01
Happy path: ticket closes, eligible customer
HubSpot ticket status changes to Closed; contact has no survey sent in past 30 days
Personalised survey email dispatched via Gmail; HubSpot contact property survey_sent_date updated; survey_sent flag set to true
Email received at sandbox inbox within 60 seconds of trigger; HubSpot property update confirmed via API read-back
T02
Eligibility check blocks re-survey
HubSpot ticket closes; contact has survey_sent_date within the last 30 days
No email sent; workflow exits at eligibility branch; a suppression log entry is written
No email in sandbox inbox; suppression reason logged in automation platform execution history
T03
Email personalisation: customer name substitution
Contact first name field populated as 'Alex'; ticket reference 'TKT-00841'; assigned agent 'Rachel Osei'
Email body contains 'Alex', 'TKT-00841', and 'Rachel Osei' with no unfilled placeholders
Manual inspection of delivered sandbox email confirms all three values present; no literal placeholder strings remain
T04
Email personalisation: missing customer first name
Contact first name field is blank in HubSpot
Email falls back to generic salutation (e.g. 'Hi there') rather than failing or sending a blank name
Fallback salutation present in delivered email; no blank or broken variable string visible
T05
HubSpot contact record not found at trigger
Ticket closes but the associated contact ID returns a 404 from HubSpot API
Workflow catches the error; no email sent; error is written to the automation platform error log with ticket ID
Error log entry present with correct ticket ID; no email dispatched; no unhandled exception
T06
Gmail API rate limit or send failure
Gmail API returns a 429 or 503 response on send attempt
Automation retries up to three times with exponential back-off; if all retries fail, error is logged with ticket ID and customer ID
Retry attempts visible in execution log; final failure entry present; no email sent after three failed attempts
T07
HubSpot property write-back failure after email sent
Email sends successfully but HubSpot PATCH request for survey_sent_date returns 500
Error captured and logged; no duplicate email sent on next trigger; support for manual property correction documented
Error log contains HubSpot contact ID and failed field name; email was sent exactly once
Response Processing Agent — estimated build time: 16 hours, complexity: Moderate.
ID
Scenario
Input
Expected Output
Pass Criteria
T08
Happy path: response received, score above detractor threshold
Typeform webhook payload with score 4, comment 'Great service', customer email, submission timestamp
HubSpot contact csat_score property set to 4; comment written to csat_comment; row appended to Google Sheet; no Slack alert sent
HubSpot API read-back confirms property values; Google Sheet row present with correct data; Slack test channel shows no message
T09
Happy path: response received, score below detractor threshold (score under 3)
Typeform webhook payload with score 2, comment 'Very disappointed', customer email
HubSpot updated; Google Sheet row appended; Slack alert posted to test channel with customer name, score, and ticket reference
Slack test channel receives formatted alert within 30 seconds of webhook; message contains customer name, score 2, and ticket reference
T10
Detractor threshold boundary: score exactly equals threshold (score = 3)
Typeform webhook payload with score 3
No Slack alert; HubSpot and Google Sheet updated normally
Slack test channel shows no alert for this submission; data writes confirmed
T11
Google Sheets row append: data mapping
Typeform payload with all standard fields populated
Google Sheet row contains: submission timestamp, customer email, ticket reference, score, verbatim comment, agent name — in correct columns
Manual inspection of sandbox Google Sheet confirms column order and data accuracy against input payload
T12
Typeform webhook authentication failure
Webhook request arrives with an invalid or missing signature header
Automation rejects the request with a 401 response; no data written to HubSpot, Sheets, or Slack
Execution log shows rejected webhook; HubSpot and Sheets unmodified; no Slack alert
Test and QA PlanPage 2 of 4
FS-DOC-06Quality
03Phase 2 — integration and edge case tests
Integration tests validate the handoff between the Survey Dispatch Agent and the Response Processing Agent, confirming that data written by the first agent is correctly consumed by the second and that the full conditional logic operates as designed across the connected tools.
ID
Scenario
Input
Expected Output
Pass Criteria
T13
Full handoff: ticket close through to Google Sheets append (no detractor)
Ticket closed in HubSpot sandbox; survey submitted via Typeform sandbox with score 4
Email sent; HubSpot survey_sent_date written; response received; HubSpot csat_score written; Google Sheet row appended; no Slack alert
All five data operations confirmed via API read-back and Sheet inspection; execution log shows no errors across both agents
T14
Full handoff: ticket close through to Slack detractor alert
Ticket closed in HubSpot sandbox; survey submitted via Typeform sandbox with score 1
All data operations from T13 complete; Slack alert posted with correct customer name, score, and ticket reference
Slack test channel message confirmed; all other data operations verified as in T13
T15
HubSpot ticket reference carried through to Slack alert
Ticket TKT-00999 closed; response submitted with score 2
Slack alert message body includes ticket reference TKT-00999
Slack message text inspected; TKT-00999 present in alert
T16
Response received for a contact with no matching HubSpot survey send log
Typeform submission from an email address not in HubSpot contacts
Agent logs a warning; no HubSpot write attempted; Google Sheet row appended with available data; no crash
Execution log contains warning with unmatched email; Sheet row present; HubSpot unchanged
T17
Google Sheets API unavailable during append
Typeform response received; Google Sheets returns 503
Automation retries up to three times; on final failure, error logged with response payload preserved for manual recovery
Retry attempts in execution log; error entry includes full response payload; HubSpot write still completes independently
T18
Slack API unavailable when detractor alert should fire
Response with score 2 received; Slack API returns 503
Automation logs the failure with customer name, score, and ticket reference; other data operations (HubSpot, Sheets) complete normally
Execution log error entry contains all three required fields; HubSpot and Sheet updated; Slack test channel shows no message
T19
Multiple tickets close in rapid succession (five tickets within 60 seconds)
Five HubSpot ticket-closed events fired within 60 seconds; all five contacts are eligible
Five separate survey emails sent; five HubSpot property writes; no emails merged or dropped
Five emails in sandbox inbox, each personalised to the correct contact; five HubSpot records updated
Edge-case tests below cover failure modes and boundary conditions that sit outside normal happy-path flows. These must all pass before Phase 3 begins.
ID
Scenario
Input
Expected Output
Pass Criteria
E01
Duplicate Typeform submission for the same survey link
Customer submits the same Typeform survey twice within five minutes (e.g. double-click or browser back)
Only the first submission is processed; duplicate is detected by submission ID de-duplication and discarded; no duplicate Google Sheet row or HubSpot write
Google Sheet contains exactly one row for the submission; HubSpot property written once; execution log shows duplicate suppressed
E02
Survey response submitted with score field missing
Typeform webhook payload arrives with the score field null or absent
Agent logs a validation error with submission ID and contact email; no HubSpot score write; Google Sheet row flagged as incomplete; no Slack alert triggered
Execution log contains validation error; HubSpot csat_score not updated; Sheet row present with empty score column and an error flag
E03
Contact email in Typeform response does not match any HubSpot contact
Typeform submission email address has a typo or belongs to an unrecognised contact
Agent logs unmatched contact warning; Google Sheet row appended with raw submission data; no HubSpot write; no crash
Sheet row present; execution log warning with submitted email; HubSpot unmodified
E04
HubSpot API returns 401 Unauthorised (token expired or revoked)
HubSpot API call made with an expired private app token
Automation halts the step, logs a critical credential error with timestamp, and does not attempt any further HubSpot writes until credentials are refreshed
Execution log contains critical error with 401 response code and affected step name; no partial writes to HubSpot; support@gofullspec.com alert triggered
E05
Survey eligibility window edge: customer surveyed exactly 30 days ago
Contact has survey_sent_date set to exactly 30 days before the current trigger timestamp
Contact is treated as eligible (30 days is the minimum gap, so day 30 is the first eligible day); survey email is sent
Email sent to sandbox inbox; execution log confirms eligibility check passed at the 30-day boundary
E06
Human timeout scenario: support manager does not follow up a detractor within 24 hours
Slack alert posted for a detractor at timestamp T; no follow-up action recorded in HubSpot within 24 hours
Automation has no further automated action (follow-up is a deliberate human step); the Slack alert remains visible; no second alert is sent automatically
Confirm in design documentation that no re-alert logic exists at this stage; execution log shows no second trigger; escalation procedure for missed follow-ups is documented in the runbook
Test and QA PlanPage 3 of 4
FS-DOC-06Quality
04Phase 3 — end-to-end production test
Important before running Phase 3: Use a designated internal test email address owned by [YourCompany.com] for all production test runs. Do not use a real customer email address at any point. After Phase 3 completes, the FullSpec team will void the test HubSpot ticket, delete or archive the test Google Sheets row, remove the test Slack alert from the channel history, and remove the test HubSpot contact property values written during the run. Confirm with the process owner that the test record has been cleared before the automation is opened to live ticket traffic.
ID
Scenario
Input
Expected Output
Pass Criteria
T20
Production trigger: real HubSpot ticket closed for internal test contact
Live HubSpot ticket moved to Closed status for an internal test contact with no survey sent in past 30 days; production credentials active
Survey email dispatched from the production Gmail account to the internal test inbox within 60 seconds; HubSpot contact survey_sent_date property updated in production CRM
Test inbox receives personalised email; subject line, salutation, ticket reference, and Typeform link all correctly rendered; HubSpot property confirmed via production API read-back
T21
Production survey submission: score above detractor threshold
Internal tester submits the live Typeform survey link from the test email with score 4 and a comment
HubSpot csat_score and csat_comment updated on production contact; Google Sheet row appended to live tracking sheet; no Slack alert sent to the production support manager channel
HubSpot production record confirmed; Google Sheet live document shows new row with correct data; support manager Slack channel shows no alert for this submission
T22
Production detractor alert: score below threshold
Internal tester submits the live Typeform survey link with score 2 and a comment
HubSpot updated; Google Sheet row appended; Slack alert posted to the production support manager channel with customer name, score 2, and ticket reference within 30 seconds
Slack production channel message confirmed by support manager or FullSpec team member; message content matches expected format; timestamp within 30 seconds of Typeform submission
T23
Error log verification: clean run
Review automation platform execution logs immediately after T20 through T22 complete
Execution log for all three runs shows no errors, no retries, and no skipped steps
Log entries for T20, T21, and T22 inspected; all steps show success status; no warning or error entries present
T24
Data integrity check: Google Sheet running calculations update correctly
Google Sheet live document reviewed after T21 and T22 rows are appended
Running average CSAT score formula recalculates to reflect the two new responses; response count increments by two; no formula errors in the sheet
Sheet average and count cells confirmed correct against manual calculation using the two test scores (4 and 2); no REF or VALUE errors visible
T25
Process owner review and approval
Process owner reviews all Phase 3 outputs: test inbox email, HubSpot property values, Google Sheet rows, Slack alert, and execution logs
Process owner confirms all outputs are correct, the flow behaves as agreed, and approves the automation for live traffic; approval is recorded in the FullSpec platform confirmation screen
Process owner approval recorded in FullSpec confirmation. Phase 3 is passed when this entry is complete. No separate sign-off block is required.
Once T25 is recorded, the FullSpec team will void all test data as described in the Phase 3 note above and confirm in writing to the process owner that the automation is cleared for live operation. Any questions before or during testing should be directed to support@gofullspec.com.
Test and QA PlanPage 4 of 4