Back to Tax Preparation Workflow

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

Tax Preparation Workflow

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

This document defines the full test and quality assurance programme for the Tax Preparation Workflow automation. It is written for the FullSpec engineering team and covers every test case required before the workflow enters production. Testing runs in three sequential phases: unit tests in sandbox, integration and edge-case tests in sandbox, and end-to-end validation in production. No phase begins until the previous phase has fully passed. The process owner joins Phase 3 to confirm real output and record approval.

01Testing approach

All testing runs in three phases in sequence. No phase begins until every test case in the previous phase has reached a pass status and been logged in the FullSpec test tracker. Phase 1 isolates each agent individually in sandbox. Phase 2 tests handoffs between agents and exercises edge cases. Phase 3 executes one complete end-to-end run in the production environment with real credentials and real data, concluded by process owner sign-off.

1
Phase 1: Unit Testing
Each agent tested in isolation, sandbox only
Scope
Individual agent logic: Document Gap Detector, Receipt Collection Coordinator, Package Builder and Dispatcher. No cross-agent data flow tested here.
Environment
Sandbox only. QuickBooks sandbox company, Gmail test account, Hubdoc staging environment, Google Drive test folder, Slack test workspace, DocuSign demo account.
Credential rule
Sandbox credentials exclusively. No production OAuth tokens, no live QuickBooks company data, no real employee email addresses.
Pass condition
All cases T01 through T14 return the expected output with no unhandled errors. Any failure blocks progression to Phase 2.
Who runs it
FullSpec team. Process owner not required.
2
Phase 2: Integration and Edge Case Testing
Agent handoffs and failure scenarios, sandbox only
Scope
End-to-end data flow between all three agents, including trigger handoffs, payload shape validation, and all identified edge cases: duplicates, missing data, tool unavailability, and human timeout.
Environment
Sandbox only. Same sandbox credentials as Phase 1. No production systems contacted.
Credential rule
Sandbox credentials exclusively. Production credentials must remain stored but must not be activated during Phase 2.
Pass condition
All cases T15 through T22 and E01 through E07 reach the expected outcome. Edge cases must produce a recoverable state, not a silent failure.
Who runs it
FullSpec team. Process owner not required.
3
Phase 3: End-to-End Production Test
Full production run with live credentials and real data
Scope
One complete workflow run from tax-period trigger through DocuSign sign-off, using production credentials, a real QuickBooks company period, and real Google Drive folder structure.
Environment
Production. Live QuickBooks Online company (test period), live Gmail account (internal test address), live Google Drive, live Slack workspace, live DocuSign account.
Credential rule
Production OAuth tokens activated for this phase only. All tokens scoped to minimum required permissions as defined in the Integration and API Spec. Revoke sandbox tokens before running.
Pass condition
All cases T23 through T27 pass, including process owner review and recorded approval. No manual intervention required outside the designed exception-handling step.
Who runs it
FullSpec team executes and monitors. Process owner (Finance Manager or Bookkeeper) reviews output and records approval as the final test case T27.
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 use production QuickBooks company data, real employee email addresses, live Hubdoc documents, or production DocuSign envelopes at any point during this phase. Use the designated sandbox accounts listed in the Developer Handover Pack credential table.

Agent 1: Document Gap Detector. Estimated build time: 10 hours. Complexity: Moderate. Trigger: QuickBooks report export completes. Tools: QuickBooks, Google Drive.

ID
Scenario
Input
Expected Output
Pass Criteria
T01
Happy path: all documents present
QuickBooks sandbox export with 40 transactions, all categorised, all receipts matched in checklist
Gap list returned with zero missing items; workflow proceeds to Receipt Collection Coordinator trigger
Gap list payload contains 0 missing_items entries; no follow-up email triggered; next-agent trigger fires within 30 seconds
T02
Missing receipts for multiple employees
QuickBooks export with 15 transactions flagged as uncategorised or receipt-missing across 3 employees
Structured gap list with 15 entries grouped by employee name and transaction reference
Gap list contains exactly 15 entries; each entry includes employee_id, transaction_ref, amount, and date fields; grouping key matches employee
T03
Zero transactions in export
QuickBooks API returns an empty transaction array for the selected date range
Agent logs a warning, does not produce a gap list, and raises a Slack alert to the FullSpec monitoring channel
No gap list written to Drive; Slack alert message received within 60 seconds; run marked as halted pending human review
T04
QuickBooks API authentication failure
OAuth token is expired or revoked before the export call
Agent catches 401 response, logs the error with timestamp, and halts the run with an alert
Error log entry contains status_code: 401 and token_hint field; no partial gap list written; alert fires to monitoring channel
T05
Checklist template missing from Google Drive
QuickBooks export succeeds but the expected checklist template file is not found in the configured Drive folder
Agent logs a file-not-found error and halts; no gap list produced; alert raised
Error message references the expected file path; run status set to error; monitoring alert delivered
T06
Transactions with no vendor or employee mapping
Export contains 5 transactions with null vendor_id and null employee_id fields
Gap list includes the 5 entries under an 'Unassigned' group; they are not silently dropped
Gap list contains an unassigned_group array with exactly 5 entries; each entry retains the original transaction_ref and amount

Agent 2: Receipt Collection Coordinator. Estimated build time: 16 hours. Complexity: Complex. Trigger: Gap list produced by Document Gap Detector. Tools: Gmail, Hubdoc, QuickBooks, Slack.

ID
Scenario
Input
Expected Output
Pass Criteria
T07
Happy path: all receipts received and matched
Gap list with 10 items; sandbox Gmail receives 10 receipt images within the test window; Hubdoc OCR extracts all fields cleanly
All 10 transactions matched; receipt log shows status: matched for each; no Slack exception alert raised
Matched log count equals 10; all entries have confidence_score >= 0.90; Slack exception channel shows 0 new messages
T08
Personalised email formatting per employee
Gap list with 3 employees, each with different transaction counts (2, 5, 1)
3 separate emails sent, each listing only that employee's transactions with correct references and amounts
Email count in sandbox sent folder equals 3; each email body contains only transaction_refs belonging to the addressed employee; no cross-contamination
T09
Receipt submitted but OCR extraction fails
One receipt image is blurry and Hubdoc returns confidence_score < 0.70
Transaction escalated to Slack exception alert with image reference and transaction ref; not added to matched log
Slack alert received for the specific transaction_ref; matched log does not include this entry; unmatched_items count incremented by 1
T10
Duplicate receipt submitted for same transaction
Two images submitted for the same transaction_ref; both processed by Hubdoc
First match accepted; second flagged as duplicate and logged; no double-entry in matched log
Matched log contains exactly one entry per transaction_ref; duplicate_flag: true appears in the second Hubdoc record; no error thrown
T11
No reply from employee within reminder window
Gap list item with no receipt received after the configured reminder interval (48 hours in sandbox, simulated)
Automated follow-up email sent; if still no reply after second interval, item escalated to Slack
Follow-up email count in sandbox sent folder equals 1 for the item; Slack escalation message appears after second interval with employee name and transaction_ref
T12
Gmail send failure (SMTP error)
Gmail API returns a 500 error on send attempt
Error logged with timestamp and recipient address; retry attempted after 5 minutes; alert raised if retry also fails
Log entry contains smtp_error and recipient_address; retry fires after 300 seconds; if retry fails, monitoring alert contains the failed recipient list

Agent 3: Package Builder and Dispatcher. Estimated build time: 12 hours. Complexity: Moderate. Trigger: Bookkeeper confirms all exceptions resolved. Tools: Google Drive, DocuSign, Slack.

ID
Scenario
Input
Expected Output
Pass Criteria
T13
Happy path: full package assembled and dispatched
All matched receipts, QuickBooks reports, and reconciled statements confirmed complete; bookkeeper trigger fires
Structured Google Drive folder created with correct subfolder hierarchy; DocuSign envelope sent to configured approver; Slack notification posted
Drive folder contains reports/, receipts/, and statements/ subfolders each with correct file count; DocuSign envelope status is sent; Slack message appears in finance channel within 60 seconds
T14
DocuSign envelope template not found or misconfigured
Package assembly completes but the configured DocuSign template_id returns 404 from the API
Error logged; Slack alert sent to Finance Manager with error detail; Drive package retained intact; DocuSign send not attempted
Error log contains docusign_template_id and 404 status; Slack alert delivered; Drive folder content unchanged; no orphan envelope created in DocuSign account
Test and QA PlanPage 2 of 4
FS-DOC-06Quality

03Phase 2 — integration and edge case tests

Phase 2 tests the data flow between agents and verifies that the correct payload shape is passed at each handoff. All tests run in sandbox. IDs continue from T15.

ID
Scenario
Input
Expected Output
Pass Criteria
T15
Handoff: Document Gap Detector to Receipt Collection Coordinator
Document Gap Detector produces a valid gap list with 8 entries in the expected JSON schema
Receipt Collection Coordinator receives the payload, parses all 8 entries, and begins the email send sequence
Coordinator log shows 8 items ingested; email sequence triggered within 10 seconds of gap list write; no schema validation errors
T16
Handoff: Receipt Collection Coordinator to Package Builder (all matched)
Coordinator matched log shows 100% match rate; bookkeeper confirmation trigger fires
Package Builder receives the matched log and file manifest; begins Drive assembly immediately
Package Builder log shows file_manifest received with correct item count; Drive assembly starts within 15 seconds; no manual intervention logged
T17
Handoff: Receipt Collection Coordinator to Package Builder (with exceptions resolved)
Coordinator matched log has 2 items marked as manually_resolved by bookkeeper; remainder auto-matched
Package Builder includes manually resolved items in the package without treating them as errors
Drive package contains all items including the 2 manually resolved ones; package checklist shows manual_resolution: true for those entries; no items silently excluded
T18
Gap list payload schema mismatch
Document Gap Detector emits a gap list with a missing required field (transaction_ref omitted from one entry)
Receipt Collection Coordinator rejects the malformed entry, logs a schema error, and continues processing the valid entries
Schema error log contains the malformed entry index and the missing field name; valid entries processed normally; malformed entry escalated to Slack
T19
Slack notification delivery across all three agents
Run the full sandbox workflow end-to-end with one exception item
Three distinct Slack messages delivered: exception alert from Coordinator, package-ready notification from Package Builder, and a run-complete summary
Slack test workspace shows exactly 3 messages in the correct channels; each message contains the correct run_id reference; no duplicate messages
T20
QuickBooks rate limit hit during export
Simulate a 429 Too Many Requests response from the QuickBooks API during the report pull
Automation applies exponential backoff (30s, 60s, 120s) and retries up to 3 times before halting and alerting
Retry log shows 3 attempts with correct intervals; after third failure, run halts and monitoring alert contains the rate-limit error detail and run_id
T21
Hubdoc service temporarily unavailable
Hubdoc API returns 503 during receipt processing
Agent queues the affected receipts for retry; retries after 10 minutes; if still unavailable, escalates to Slack
Queue log shows affected receipt IDs; retry fires after 600 seconds; Slack escalation includes service_name: Hubdoc and affected_receipt_count
T22
DocuSign envelope completed but Slack notification fails
DocuSign webhook fires envelope_completed event; Slack API returns 500 on notification attempt
Slack failure is logged; DocuSign envelope status is not affected; retry of Slack notification attempted after 2 minutes
DocuSign envelope remains in completed state; Slack retry fires after 120 seconds; if retry succeeds, delayed notification delivered; error log records the original failure

Edge case tests cover scenarios outside the normal workflow path. These must all resolve to a recoverable or correctly flagged state. No edge case should produce a silent failure.

ID
Scenario
Input
Expected Output
Pass Criteria
E01
Duplicate run triggered for the same tax period
Workflow triggered twice for the same period identifier within the same day
Second trigger detected as a duplicate; run not started; de-duplication log entry created; alert sent to monitoring channel
Only one active run_id exists for the period; de-duplication log contains both trigger timestamps; monitoring alert references the duplicate trigger source
E02
Employee email address missing from QuickBooks record
Gap list contains an entry where the employee record has no email_address field
Entry skipped for email send; logged as undeliverable; Slack alert lists the employee name and transaction_ref for manual contact
Email send queue does not include the entry; undeliverable_log count incremented; Slack alert contains employee_name and transaction_ref
E03
Receipt amount in Hubdoc does not match QuickBooks transaction amount (tolerance exceeded)
Hubdoc extracts $124.50 from a receipt; QuickBooks transaction amount is $142.00 (delta exceeds 5% threshold)
Item flagged as amount_mismatch; not added to matched log; Slack exception alert includes both amounts and transaction_ref
Matched log excludes the item; exception log entry contains hubdoc_amount, qb_amount, and delta_percent fields; Slack alert delivered with both values
E04
Google Drive storage quota exceeded during package assembly
Drive API returns a 403 storageQuotaExceeded error during file upload
Assembly halts; error logged with file name and Drive folder path; Slack alert sent to Finance Manager with remediation instruction
No partial package written beyond the point of failure; error log contains the Drive folder path and the file that triggered the quota error; Slack alert includes a link to Drive storage settings
E05
Bookkeeper does not confirm exception resolution within the configured timeout (72 hours)
Slack exception alert posted; no bookkeeper response or manual confirmation received after 72 hours
Escalation alert sent to Finance Manager (TR) with the open exception count and a link to the Slack thread; run remains paused
Escalation fires at exactly the 72-hour mark; escalation message addressed to Finance Manager role; run status remains paused, not cancelled
E06
Receipt file type not supported by Hubdoc (e.g. HEIC or TIFF)
Employee submits a receipt image in HEIC format; Hubdoc returns an unsupported media type error
File rejected from OCR pipeline; logged with file extension and sender; Slack alert prompts the employee to resubmit in a supported format (JPEG or PDF)
Hubdoc queue does not include the rejected file; log entry contains file_extension: heic and sender_email; Slack message references the correct supported formats
E07
DocuSign approver email address invalid or bounced
Package Builder dispatches DocuSign envelope to a configured approver address that returns a delivery failure
DocuSign envelope voided or held; error logged with recipient address; Slack alert to Finance Manager with instruction to update the approver address
DocuSign account shows envelope in voided or error state; log entry contains recipient_email and bounce_reason; Slack alert delivered to Finance Manager within 5 minutes
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 (such as taxtest@[YourCompany.com]) as the designated approver and receipt recipient. Do not send DocuSign envelopes to the real business owner or external accountant during this test run. After the run completes, void the DocuSign test envelope, delete the test package from the production Google Drive folder, and mark the QuickBooks test period as a test entry in the audit log. The FullSpec team will confirm these cleanup steps are complete before the workflow is handed to the finance team.
Ensure all sandbox OAuth tokens are deactivated before Phase 3 begins. Activate production credentials only for the tools listed in the Developer Handover Pack credential table. Confirm with the process owner that a real historical QuickBooks period (at least one quarter prior to the current period) is used as the test data set, so no live reporting period is affected.

Phase 3 executes one complete production run from the scheduled trigger through final DocuSign sign-off. The FullSpec team monitors every step in real time. The process owner reviews the assembled package and records approval as the final test case. All T-sequence IDs continue from T23.

ID
Scenario
Input
Expected Output
Pass Criteria
T23
Full production run: trigger to gap list
Tax preparation window opened manually by Finance Manager in production environment; production QuickBooks Online company; historical quarter selected
QuickBooks API export completes; Document Gap Detector produces a valid gap list written to the production Google Drive audit folder
QuickBooks export returns at least one transaction record; gap list JSON written to Drive within 2 minutes of trigger; gap list schema validates against the spec in the Developer Handover Pack; run_id logged
T24
Full production run: receipt request emails sent
Gap list from T23 used as input; internal test addresses substituted for real employee addresses
Personalised emails delivered to each test address listing the correct transaction references; Hubdoc receives test receipt uploads
Emails arrive in test inboxes within 5 minutes; email content matches the gap list entries for each recipient; Hubdoc processing log shows receipts received and OCR attempted
T25
Full production run: receipt matching and exception Slack alert
At least one test receipt submitted with a deliberate amount mismatch to trigger an exception
Matched receipts logged; mismatched receipt escalated to Slack finance exception channel; bookkeeper (test user) resolves the exception manually
Matched log count matches the number of clean receipts; Slack exception alert received in the production workspace finance channel; manual resolution confirmation accepted by the workflow within 30 seconds of bookkeeper action
T26
Full production run: package assembly and DocuSign dispatch
All items confirmed matched or manually resolved; bookkeeper confirmation trigger fires
Google Drive production folder contains reports/, receipts/, and statements/ subfolders with correct files; DocuSign envelope dispatched to the internal test approver address; Slack package-ready notification posted
Drive folder structure matches the schema defined in the Developer Handover Pack; file count in each subfolder matches the expected count from the matched log; DocuSign envelope status is sent within 3 minutes of trigger; Slack notification contains the Drive folder link and run_id
T27
Process owner review and approval (final case)
Package Builder has dispatched the DocuSign envelope to the internal test address; Finance Manager (process owner) reviews the assembled Drive package and the DocuSign request
Finance Manager confirms the package is complete and accurate; DocuSign envelope signed; FullSpec confirmation log records the approval with timestamp, approver name, and run_id
DocuSign envelope status transitions to completed; FullSpec confirmation log entry contains approver: [Your name], role: Finance Manager, timestamp, and run_id. This recorded entry constitutes the process owner's sign-off for Phase 3. No separate signature block is used.
After T27 passes: the FullSpec team will void the test DocuSign envelope, remove the test package from the production Drive folder, and confirm cleanup in writing to the process owner at [Rep email] before the workflow is enabled for the first live preparation cycle. Contact support@gofullspec.com with any questions about Phase 3 results or the cleanup procedure.
Test and QA PlanPage 4 of 4

More documents for this process

Every document generated for Tax Preparation Workflow.

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