Back to End of Month Close

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

End of Month Close Automation

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

This document defines the full test and quality assurance plan for the End of Month Close automation, covering all three agents: Chase and Notification, Reconciliation, and Accruals and Reporting. It is written for the FullSpec build team and is the authoritative reference for what must pass before any component is promoted to production. Testing runs in three sequential phases. Phase 1 validates each agent in isolation using sandbox credentials. Phase 2 confirms cross-agent handoffs and exercises edge cases. Phase 3 runs a single traced production cycle with the process owner present. No phase begins until the previous phase fully passes with zero outstanding failures.

01Testing approach

Testing is structured in three phases that run in strict sequence. No phase begins until every test case in the previous phase carries a confirmed pass status. Phase 1 isolates each agent and validates individual logic. Phase 2 exercises agent-to-agent handoffs and known edge conditions. Phase 3 executes one complete end-to-end run in the live production environment, with the process owner present for final approval. FullSpec manages all three phases; the process owner joins at Phase 3 only.

1
Phase 1: Unit Testing
Each agent tested in isolation against sandbox credentials
Scope
Individual agent logic: trigger firing, data retrieval, transformation rules, output formatting, and failure handling for Chase and Notification Agent, Reconciliation Agent, and Accruals and Reporting Agent.
Environment
Sandbox only. Xero demo company, Gmail test account, Slack test workspace, Hubdoc/Dext sandbox, and Google Sheets test file. No production credentials permitted.
Credential rule
All credentials must point to sandbox or demo accounts. Production OAuth tokens must not be loaded into the test environment during Phase 1. Credentials are stored in the automation platform's secret manager under a clearly labelled sandbox workspace.
Pass condition
All cases T01 through T16 pass with outputs matching expected results exactly. Zero cases in a failed or blocked state before Phase 2 may begin.
Who runs it
FullSpec team only. Process owner is not required for Phase 1.
2
Phase 2: Integration and Edge Case Testing
Agent handoffs and failure scenarios validated in sandbox
Scope
End-to-end data handoffs between agents, Xero API pagination and rate-limit behaviour, Google Sheets write contention, and all defined edge cases including duplicates, missing data, unavailable tools, and human review timeout.
Environment
Sandbox throughout. Same credential set as Phase 1. Integration tests use realistic volume: 300 simulated transactions seeded into the Xero demo company.
Credential rule
No production credentials. Xero demo company OAuth token only. Gmail and Slack sandbox accounts only.
Pass condition
All cases T17 through T24 pass and all edge cases E01 through E08 pass. Any case that exposes a data loss or silent failure scenario must be resolved and re-run before Phase 3.
Who runs it
FullSpec team only. Process owner is not required for Phase 2.
3
Phase 3: End-to-End Production Test
One full production run traced and signed off by process owner
Scope
A single complete close cycle executed against production systems using an internal test address and a voided test journal. All steps traced from trigger to report distribution.
Environment
Production. Live Xero organisation, live Gmail account (internal test recipient only), live Slack workspace (test channel), and the live Google Sheets management accounts template.
Credential rule
Production OAuth tokens active. The FullSpec team confirms that all sandbox credentials have been swapped out and that the credential store is pointing exclusively to production before the Phase 3 run begins.
Pass condition
All cases T25 through T29 pass, including the final process owner review case. Pass confirmation is recorded in the FullSpec platform confirmation log. No separate signoff block is required.
Who runs it
FullSpec team executes the run. The process owner (Finance Manager or delegated Controller) joins to observe, review the final management accounts pack, and confirm approval as the last test case.
Test and QA PlanPage 1 of 4
FS-DOC-06Quality

02Phase 1 — unit test cases

Sandbox credentials only. Before executing any test in this phase, confirm that every connected tool (Xero, Gmail, Slack, Hubdoc, Dext, Google Sheets) is authenticated against a sandbox or demo account. Production OAuth tokens must not be present in the test environment. If a credential swap is needed, pause and notify the FullSpec team lead before proceeding.

Chase and Notification Agent — unit tests

ID
Scenario
Input
Expected output
Pass criteria
T01
Happy path: schedule fires on last business day
Automation platform detects final business day of month; contact list contains 5 department contacts
5 Gmail chase emails sent; 5 Slack notifications posted to configured channels; delivery log entry created with timestamp and recipient list
All 5 emails confirmed delivered in Gmail sandbox sent folder; Slack API returns 200 for each post; delivery log row written to Google Sheets with status: sent
T02
Happy path: 24-hour reminder fires when no reply received
T01 emails sent; no reply received within 24 hours in sandbox account
Second reminder email sent to each non-responding recipient; Slack reminder posted; log updated with reminder_sent status
Reminder emails present in sandbox sent folder; log status updated to reminder_sent; no duplicate emails sent to recipients who did reply
T03
Happy path: reply received before reminder window
Chase email sent to one contact; sandbox reply received within 12 hours
No reminder email sent to that contact; log updated with replied status
Log entry for that contact shows replied; reminder workflow does not fire for that contact
T04
Failure: Gmail authentication fails at send time
OAuth token for Gmail sandbox account is expired or revoked before run
Agent catches auth error; Slack alert posted to ops channel with error detail; no silent failure; retry not attempted without credential refresh
Slack ops alert received with error code and timestamp; delivery log entry shows status: auth_error; no emails partially sent
T05
Failure: contact list is empty
Contact list in configuration contains zero entries
Agent halts gracefully; Slack ops alert sent stating no recipients found; no emails sent
No outbound emails; Slack alert present; log entry shows status: no_recipients; workflow does not proceed to reconciliation trigger
T06
Edge: Slack workspace unavailable at notification time
Gmail sends successfully; Slack API returns 503 at notification step
Gmail delivery confirmed; Slack notification failure logged; retry attempted once after 5 minutes; failure recorded if retry also fails
Gmail emails in sent folder; Slack error captured in log; exactly one retry attempt recorded; overall workflow continues to next step and does not block on Slack failure

Reconciliation Agent — unit tests

ID
Scenario
Input
Expected output
Pass criteria
T07
Happy path: all transactions match cleanly
Xero demo company loaded with 300 transactions; all have matching bank feed entries and existing coding rules; no unmatched items
300 transactions marked as reconciled in Xero; exceptions Google Sheet written with zero rows; reconciliation summary shows 100% match rate
Xero demo reconciliation screen shows all accounts reconciled; Google Sheets exceptions tab is empty; summary row shows 300 matched, 0 exceptions
T08
Happy path: exceptions correctly flagged
280 matching transactions; 20 items with no match or ambiguous coding
280 reconciled automatically; 20 written to exceptions Google Sheet with transaction ID, amount, date, and reason for flag
Exactly 20 rows in exceptions sheet; each row contains all required fields; Xero shows 280 reconciled items; bookkeeper review step triggered
T09
Happy path: auto-coding rule applied to uncategorised items
15 transactions matching an existing Xero bank rule (e.g. recurring supplier name)
All 15 coded to correct account automatically; posted to Xero; not placed in exceptions sheet
Xero demo shows correct account code on all 15; no entries for those transactions in exceptions sheet
T10
Failure: Xero API returns 401 unauthorised
OAuth token for Xero demo account is expired
Agent catches 401 error; halts without writing partial data; Slack ops alert sent with token expiry message
No partial reconciliation data written; Slack alert received; log entry shows status: xero_auth_error; token refresh prompt visible in ops channel
T11
Failure: Hubdoc document fetch returns zero documents
Hubdoc sandbox contains no documents for the current period
Agent logs empty document set; proceeds with Xero bank feed data only; exceptions sheet notes document source as unavailable
Reconciliation runs using bank feed data; exceptions sheet includes a header note stating Hubdoc returned no documents; workflow does not halt
T12
Failure: Google Sheets write fails mid-exception export
Sheets API returns 500 after writing 10 of 20 exception rows
Agent detects incomplete write; rolls back to pre-write state; retries full write once; Slack ops alert if retry also fails
Either all 20 rows present after retry or zero rows present (no partial state); Slack alert fired on retry failure; log shows sheets_write_error

Accruals and Reporting Agent — unit tests

ID
Scenario
Input
Expected output
Pass criteria
T13
Happy path: accruals calculated and posted to Xero
Accruals schedule in Google Sheets contains 8 accrual lines with amounts, account codes, and period references for the current month
8 journal entries posted to Xero demo company with correct account codes, amounts, and period date; journal reference includes automation run ID
Xero manual journals screen shows 8 entries matching schedule amounts exactly; journal reference field populated; no duplicate journals; Google Sheets schedule marked as posted
T14
Happy path: management accounts pack generated correctly
Xero demo contains finalised P&L, balance sheet, and cash flow data for the period; Google Sheets report template is present
Template populated with correct period figures; variance commentary generated for lines deviating more than 10% from prior period; completed pack saved to designated Google Drive folder
Each numeric cell in template matches Xero report output exactly; commentary rows populated for applicable variance lines; PDF export function produces a readable file
T15
Failure: accruals schedule is empty or malformed
Accruals Google Sheet exists but the accruals data range contains no rows or has missing account code columns
Agent halts before posting any journals; Slack ops alert sent with sheet validation error detail; no partial journals posted to Xero
Zero journals posted to Xero demo; Slack alert received with specific field validation message; log entry shows status: schedule_validation_error
T16
Failure: Xero journal posting returns 400 bad request
One accrual line contains an invalid account code that does not exist in the Xero chart of accounts
Agent catches 400 error for that line; remaining valid lines posted; invalid line written to exceptions log with error detail; Slack alert sent
Valid 7 journals present in Xero; invalid line not posted; exceptions log contains the failed line with account code and Xero error message; no silent failure
Test and QA PlanPage 2 of 4
FS-DOC-06Quality

03Phase 2 — integration and edge case tests

Integration tests — agent handoffs

All Phase 2 tests run in the sandbox environment. Seed the Xero demo company with 300 transactions before beginning integration tests. Confirm that the Google Sheets accruals schedule and exceptions template are populated with realistic test data. Do not use production credentials at any point in this phase.
ID
Scenario
Input
Expected output
Pass criteria
T17
Handoff: Chase Agent completes and triggers Reconciliation Agent
Chase window closes; all contacts have either replied or timed out; chase agent marks run as complete
Reconciliation agent begins automatically within 2 minutes of chase agent completion flag; Xero transaction pull initiated; no manual trigger required
Reconciliation agent run log shows start time within 2 minutes of chase agent end time; no manual intervention recorded
T18
Handoff: Reconciliation Agent completes and bookkeeper review step is triggered
Reconciliation agent finishes; 15 exceptions written to Google Sheets
Bookkeeper receives Slack notification with direct link to exceptions sheet; notification includes exception count and a timestamp; Reconciliation Agent status set to awaiting_review
Slack message delivered within 60 seconds; message contains exception count (15) and hyperlink to the correct sheet tab; agent status log updated to awaiting_review
T19
Handoff: Bookkeeper approves exceptions and triggers Accruals and Reporting Agent
Bookkeeper marks exceptions as reviewed in Google Sheets approval cell; all exceptions resolved or accepted
Accruals and Reporting Agent triggered automatically; reads accruals schedule; posts journals to Xero; proceeds to build management accounts pack
Agent run log shows trigger source as bookkeeper_approval; journals posted within the same run; pack generation begins after journal posting confirmation from Xero API
T20
Handoff: report pack generated and Finance Manager notified for approval
Management accounts pack completed by Accruals and Reporting Agent; saved to Google Drive
Finance Manager receives Gmail notification with link to the draft pack; Slack message posted to finance channel; pack status set to pending_approval
Gmail notification delivered to Finance Manager test address; Slack message contains pack link; Google Sheets pack status cell reads pending_approval
T21
Handoff: Finance Manager approves and distribution triggered
Finance Manager clicks approve in the designated Google Sheets approval cell or via the approval link in the notification email
Automation exports pack as PDF; sends PDF to all stakeholder email addresses in the distribution list; Slack confirmation posted; run status set to complete
PDF present in Google Drive export folder; Gmail sent folder shows outbound emails to all distribution list addresses; Slack confirmation message posted; run log status is complete
T22
Integration: Xero API rate limit encountered during transaction pull
300 transactions require multiple paginated API calls; rate limit of 60 calls per minute is reached during fetch
Agent detects 429 response; applies exponential backoff starting at 2 seconds; completes full transaction pull without data loss; total pull time logged
All 300 transactions present in reconciliation dataset after completion; no transactions missing; log shows retry events with timestamps; no unhandled exceptions
T23
Integration: Google Sheets concurrent edit conflict during exceptions write
Reconciliation agent attempts to write exceptions while a test user has the sheet open with an active edit
Agent detects conflict; waits 10 seconds and retries; completes write successfully or logs failure after 3 retry attempts
Exceptions data fully written after retry; no partial rows; or Slack alert fired after 3 failed retries with conflict detail in log
T24
Integration: Finance Manager rejects pack and correction loop triggers
Finance Manager selects reject in the approval step and enters a correction note
Pack status set to returned_for_correction; correction note written to Google Sheets log; Slack alert sent to Controller with note content; Accruals and Reporting Agent flagged for re-run after correction
Pack status cell reads returned_for_correction; correction note visible in log sheet; Slack alert delivered to Controller; re-run trigger is available without requiring a full workflow restart

Edge case tests

ID
Scenario
Input
Expected output
Pass criteria
E01
Duplicate transaction entries in Xero
Xero demo contains 10 transactions that appear twice with identical amounts, dates, and references
Reconciliation agent flags all 10 duplicates in the exceptions sheet with a duplicate_detected reason code; does not auto-reconcile either entry; bookkeeper review required for each pair
Exactly 10 duplicate-flagged rows in exceptions sheet; no duplicate pair auto-reconciled; reason code is duplicate_detected on each row
E02
Missing supplier document for a transaction requiring one
Xero transaction exists for a supplier; corresponding document is absent from both Hubdoc and Dext sandboxes
Transaction flagged in exceptions sheet with reason code no_document_found; not auto-coded; bookkeeper notified via Slack
Exception row present with no_document_found reason; transaction not reconciled; Slack message references the specific transaction ID and amount
E03
Accruals schedule contains a row with a missing amount field
Accruals Google Sheet has 8 rows; one row has an empty amount cell
Agent validates schedule before posting; flags the incomplete row; posts the remaining 7 valid journals; Slack alert lists the row reference and missing field
7 journals in Xero; 1 row in validation error log with row reference; Slack alert received; no journal posted for the incomplete row
E04
Bookkeeper does not action the exceptions sheet within 48 hours
Exceptions sheet written with 12 items; approval cell left blank for 48 hours after notification
Escalation Slack message sent to Finance Manager and Controller after 48-hour timeout; run status set to stalled_awaiting_review; no downstream agents triggered
Escalation message delivered at 48-hour mark; message names the stalled step and links to the exceptions sheet; run status is stalled_awaiting_review in the log
E05
Finance Manager does not approve or reject the pack within 24 hours
Management accounts pack delivered; approval cell blank for 24 hours
Reminder notification sent to Finance Manager via Gmail and Slack; if no response within a further 24 hours, escalation sent to the process owner contact defined in configuration
Reminder delivered at 24-hour mark; second escalation delivered at 48-hour mark if still no response; run status is awaiting_fm_approval throughout
E06
Slack is unavailable for the entire chase window
Slack API returns 503 for the full duration of the chase and notification period
Gmail chase emails sent successfully; Slack notifications attempted and retried 3 times with exponential backoff; failure logged after third attempt; workflow continues using Gmail only
All Gmail emails in sent folder; Slack error recorded in log with retry count; overall workflow not blocked; ops alert delivered via Gmail fallback to the ops email address
E07
Xero demo company has no transactions for the period
Xero API returns empty transaction list for the current period
Reconciliation agent logs zero transactions found; Slack ops alert sent; workflow paused; no exceptions sheet written; no journals posted
Log entry shows zero_transactions status; Slack alert received; exceptions sheet not modified; accruals agent not triggered
E08
Report template in Google Sheets is missing expected named ranges
Management accounts template has been edited and named ranges for P&L, balance sheet, and cash flow no longer exist
Accruals and Reporting Agent detects missing named ranges during validation; halts before writing any figures; Slack ops alert lists the missing range names
No figures written to template; Slack alert received with specific list of missing named range identifiers; log status is template_validation_error
Test and QA PlanPage 3 of 4
FS-DOC-06Quality

04Phase 3 — end-to-end production test

Important before running Phase 3: (1) Use an internal test email address as the sole recipient for all outbound communications during this run. Do not include real stakeholder or director addresses in the distribution list until the run is confirmed as passing. (2) The Finance Manager approval step will generate a real Xero journal entry. This journal must be voided in Xero immediately after the test is confirmed complete. The FullSpec team will action this void and confirm it in the run log. (3) Confirm with the process owner that the production Xero organisation, Google Sheets template, and Gmail account are all in a clean state before the trigger fires.

The following table covers one complete production run traced from the automated schedule trigger through to stakeholder distribution and process owner approval. Test IDs continue from the Phase 2 sequence.

ID
Scenario
What FullSpec checks
Expected production output
Pass criteria
T25
Production trigger fires on the correct calendar date
Automation platform run log; timestamp of trigger event; confirmation that no manual kick-off was required
Workflow starts automatically on the last business day of the test month; run log shows trigger source as schedule; Chase and Notification Agent begins within 60 seconds of trigger
Run log timestamp matches the scheduled last business day; trigger source is schedule not manual; Chase Agent status transitions to running within 60 seconds
T26
Chase emails and Slack notifications delivered in production
Gmail production sent folder; Slack production channel message history; delivery log in Google Sheets
Chase emails delivered to the internal test address only; Slack notifications posted to the designated finance test channel; delivery log written with all required fields
Gmail sent folder shows outbound emails to the test address only; no external addresses present; Slack test channel shows notification; delivery log row contains recipient, timestamp, and status: sent
T27
Reconciliation completes and exceptions sheet is accurate
Xero production reconciliation screen; Google Sheets exceptions tab; Slack bookkeeper notification
All auto-matchable transactions reconciled in Xero; exception rows written to Google Sheets for any unmatched items; Slack notification delivered to bookkeeper with exception count and link
Xero reconciliation screen shows expected matched count; exceptions sheet row count matches the number of unmatched items identified; Slack notification received by bookkeeper within 60 seconds of reconciliation completion
T28
Accruals posted and management accounts pack generated correctly
Xero manual journals screen; Google Sheets management accounts template; Google Drive export folder
All accrual journal entries posted to Xero with correct account codes and period dates; management accounts template populated with live Xero figures; PDF export present in Drive
Journal count in Xero matches accruals schedule row count; every numeric cell in the template matches Xero report output; PDF file present and opens without error; Finance Manager notified via Gmail and Slack
T29
Error log verification: no silent failures across the full run
Full run log in the automation platform; Slack ops channel; Google Sheets run audit tab
Run log contains a complete sequential record of every step, status, and timestamp with no gaps; Slack ops channel shows no unresolved error alerts; audit tab in Google Sheets is fully populated
Log entries present for every workflow step in order; no step shows status unknown or missing; Slack ops channel has no open error threads from this run; audit tab row count equals the number of expected workflow events
T30
Process owner reviews management accounts pack and confirms approval
Process owner (Finance Manager or delegated Controller) reviews the draft pack in Google Sheets; confirms figures are correct; marks the approval cell as approved
Approval recorded in Google Sheets; distribution workflow triggered automatically; PDF sent to internal test address only; Slack confirmation posted; run status set to complete in the FullSpec confirmation log
Approval cell contains approved and the approver name; Gmail sent folder shows outbound PDF to internal test address only; Slack confirmation posted in the finance channel; FullSpec run log status is complete; test journals voided in Xero and void confirmation recorded in the log. Process owner approval at this step constitutes the final QA sign-off for this automation. No separate signature block is required.
After T30 passes, the FullSpec team will archive the full test run log, update the confirmation record in the FullSpec platform, and prepare the handoff summary for the finance team. Contact support@gofullspec.com for any test queries or to report a blocking issue during any phase.
Test and QA PlanPage 4 of 4

More documents for this process

Every document generated for End of Month Close.

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