Back to Payroll Processing

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

Payroll Processing Automation

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

This document defines the full testing programme for the Payroll Processing automation, covering every agent, integration point, and end-to-end production run. It is written for the FullSpec team executing the build. Testing runs in three sequential phases: unit tests against isolated agent logic, integration and edge-case tests across agent handoffs and failure scenarios, and a final end-to-end production run with the process owner. No phase begins until every test case in the previous phase reaches a passing state. The process owner joins Phase 3 only.

01Testing approach

All testing runs in three sequential phases. 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 agent handoffs and the system's behaviour under abnormal or boundary conditions. Phase 3 executes a complete production run traced from trigger to Slack confirmation, with the process owner reviewing and approving the final payroll summary.

1
Phase 1 — Unit Testing
Each agent tested in isolation before any handoff is exercised
Scope
Individual agent logic: Timesheet Collection Agent, Reconciliation and Calculation Agent, Approval and Submission Agent — each tested independently against mocked inputs and outputs.
Environment
Sandbox only. All API calls use sandbox or development credentials for Deputy, Google Sheets, QuickBooks, Gusto, Slack, and Gmail. No production data is read or written.
Credential rule
Sandbox credentials loaded exclusively. Production API keys must not be present in the environment during Phase 1. Confirm via environment variable audit before any test run.
Pass condition
All test cases T01 through T14 reach a passing state with no open failures or unhandled exceptions.
Who runs it
FullSpec team only. Process owner is not involved in Phase 1.
2
Phase 2 — Integration and Edge-Case Testing
Agent handoffs and boundary conditions validated across all connected tools
Scope
Cross-agent data handoffs, tool-to-tool API chains (Deputy to Google Sheets, Google Sheets to Gusto), and all defined edge-case scenarios including duplicates, missing data, unavailable APIs, and approval timeout.
Environment
Sandbox for all API writes. Sandbox Deputy, Google Sheets (test tab), and Gusto sandbox used throughout. Slack and Gmail may use a dedicated test workspace and test inbox.
Credential rule
Sandbox credentials only. Integration credentials must be scoped to test entities. No production payroll records are touched.
Pass condition
All integration test cases T15 through T23 and all edge-case tests E01 through E06 reach a passing state with documented handling for every failure mode.
Who runs it
FullSpec team only. Process owner is not involved in Phase 2.
3
Phase 3 — End-to-End Production Test
Full production run with live credentials and process owner sign-off
Scope
A complete payroll cycle executed against production systems: Deputy API pull, exception detection, payroll summary written to Google Sheets, approval email sent via Gmail to the business owner, Gusto push on approval, and Slack confirmation. Error logs verified at each stage.
Environment
Production credentials active. The test payroll record must use an internal test employee or a designated test payroll entry that is voided immediately after the run completes.
Credential rule
Production credentials are active for Phase 3 only. All writes to Gusto are made against a clearly labelled test payroll run that is voided before any real payment is triggered.
Pass condition
All end-to-end test cases T24 through T27 pass, the error log is clean, and the process owner has reviewed and approved the final payroll summary within the FullSpec confirmation workflow. Process owner approval is recorded in the FullSpec platform (test case T27) and constitutes sign-off for go-live.
Who runs it
FullSpec team executes. Process owner joins Phase 3 to perform the approval step (T27).
Test and QA PlanPage 1 of 4
FS-DOC-06Quality

02Phase 1 — unit test cases

Sandbox credentials only for all Phase 1 tests. Before running any test case, confirm that no production API keys for Deputy, Gusto, QuickBooks, Google Sheets, Slack, or Gmail are present in the test environment. Use only sandbox or development tokens. Any test that fires against a production endpoint in Phase 1 is an automatic failure requiring an environment reset.

Timesheet Collection Agent — tests T01 through T05

ID
Scenario
Input
Expected output
Pass criteria
T01
Scheduled trigger fires on pay period close date
Configured pay period close date reached in scheduler; cron or schedule trigger active
Workflow initiates; Deputy API pull called within 60 seconds of trigger time
Execution log shows trigger fired; Deputy API request recorded with correct pay period date range
T02
Deputy API returns complete approved timesheets for all employees
Sandbox Deputy account with 8 employees, all timesheets submitted and approved for the period
All 8 employee hour records retrieved; no missing entries; data passed to next step
Response payload contains 8 employee records; all records carry approved status; zero exceptions flagged
T03
Deputy API returns one unapproved timesheet
Sandbox Deputy account with 8 employees; 1 timesheet in pending status
Agent flags the pending timesheet; Slack reminder sent to the responsible manager; Gmail reminder sent as fallback
Slack message posted to configured finance channel naming the manager and employee; Gmail reminder delivered to test inbox; agent does not proceed to reconciliation until resolved
T04
Deputy API returns a 401 Unauthorised error
Invalid or expired sandbox Deputy API token injected
Agent logs authentication failure; error surfaced to Slack finance channel; workflow halted
Error log contains Deputy 401 entry with timestamp; Slack alert delivered; no data written downstream
T05
Deputy API times out after 30 seconds
Sandbox Deputy endpoint configured to return no response for 35 seconds
Agent retries once after 10 seconds; on second failure, posts timeout alert to Slack and halts
Retry recorded in execution log; Slack timeout alert delivered; no partial data passed to reconciliation

Reconciliation and Calculation Agent — tests T06 through T10

ID
Scenario
Input
Expected output
Pass criteria
T06
All hours match published schedule with no anomalies
8 employee records from T02 output; matching schedule data in sandbox Deputy; no leave or overtime
Payroll summary written to Google Sheets with correct gross pay per employee; no exceptions flagged; QuickBooks journal entries staged
Google Sheets tab contains 8 rows; each gross pay figure matches (hours x rate) within $0.01 tolerance; QuickBooks staging API call recorded
T07
One employee has approved annual leave of 2 days
8 employee records; employee record 4 shows 2 days annual leave in HR leave field
Agent applies leave deduction; employee 4 gross pay reduced by 2 days pay; leave balance decremented in summary
Employee 4 gross pay in Google Sheets reflects leave deduction; leave type column populated; no change to other 7 records
T08
One employee has 4 hours approved overtime
8 employee records; employee record 6 has 4 overtime hours approved at 1.5x rate
Overtime applied at 1.5x multiplier; employee 6 gross pay includes overtime premium; summary row annotated
Employee 6 gross pay = (regular hours x rate) + (4 x rate x 1.5) within $0.01; overtime column populated in Sheets
T09
Deduction rule references a field that is missing from the HR record
Employee record with blank benefits deduction field where a value is required
Agent flags the record as an exception; does not calculate a gross pay figure for that employee; exception posted to Slack
Exception list in Sheets contains the employee name and field name; Slack alert sent; row left incomplete pending manual input
T10
Google Sheets write fails with a 403 Forbidden error
Google Sheets API token scoped to read-only in sandbox
Agent logs Sheets write failure; retries once; on second failure, halts and alerts Slack
Error log contains Sheets 403 entry; retry recorded; Slack alert delivered; no payroll summary written

Approval and Submission Agent — tests T11 through T14

ID
Scenario
Input
Expected output
Pass criteria
T11
Approval request email sent after payroll summary is marked complete
Reconciliation agent output marked complete; business owner test email address configured
Gmail approval request email delivered with link to Google Sheets summary and one-click approve link
Email received in test inbox within 2 minutes of trigger; subject line contains pay period reference; approve link present and functional in sandbox
T12
Business owner clicks approve link; Gusto push executes
Approval signal received via sandbox approve endpoint; Gusto sandbox credentials active
Gusto API write called with finalised payroll data; Slack confirmation posted with total payroll value and timestamp
Gusto sandbox API records the payroll write; Slack message delivered to finance channel within 60 seconds; message contains period reference and total gross figure
T13
Approval email not actioned within 24 hours
Approval request sent; no response from approve endpoint for 24 hours in sandbox time simulation
Agent sends a follow-up reminder to the business owner email; logs timeout warning; does not submit to Gusto
Follow-up email delivered at the 24-hour mark; execution log shows no Gusto write; workflow remains in awaiting-approval state
T14
Gusto API returns a 422 Unprocessable Entity error on payroll write
Malformed payroll payload injected (missing required employee ID field) sent to Gusto sandbox
Agent logs Gusto error with response body; does not retry automatically; posts error alert to Slack with error code and affected pay period
Error log contains Gusto 422 entry and response body; Slack alert delivered; no partial Gusto record created; workflow halted pending manual intervention
Test and QA PlanPage 2 of 4
FS-DOC-06Quality

03Phase 2 — integration and edge case tests

Integration tests validate the data handoffs between agents and across the full tool chain. All tests continue the sequential ID numbering from Phase 1.

ID
Scenario
Agents or tools involved
Expected behaviour
Pass criteria
T15
Timesheet Collection Agent output triggers Reconciliation Agent correctly
Timesheet Collection Agent → Reconciliation and Calculation Agent
On all timesheets confirmed approved, Reconciliation Agent receives the structured hours payload and begins schedule comparison without manual intervention
Execution log shows handoff event; Reconciliation Agent starts within 30 seconds; no data loss between agents (record count matches)
T16
Reconciliation Agent output triggers Approval Agent correctly
Reconciliation and Calculation Agent → Approval and Submission Agent
On payroll summary marked complete in Google Sheets, Approval Agent reads the summary tab and sends the approval email without manual trigger
Approval Agent execution starts within 60 seconds of Sheets write; email sent to correct address; Sheets summary linked in email body matches the written tab
T17
End-to-end data integrity across Deputy, Google Sheets, and Gusto
Deputy API → Reconciliation Agent → Google Sheets → Gusto sandbox
Gross pay figure in Gusto sandbox payload matches the figure written to Google Sheets for each employee to within $0.01
Automated reconciliation check script confirms field-level match for all 8 test employee records between Sheets and Gusto sandbox payload
T18
Slack exception alert contains sufficient detail for Finance Manager to act
Reconciliation Agent → Slack
Exception Slack message lists employee name, exception type (missing hours, unapproved overtime, leave conflict), and the expected vs actual value
Slack message in test channel contains all three data fields; no generic or empty exception descriptions
T19
QuickBooks journal staging is called after Google Sheets write completes
Reconciliation Agent → QuickBooks
After Sheets payroll summary is written, agent calls QuickBooks API to stage journal entries for gross pay and deductions
QuickBooks sandbox shows staged journal entries; total of journal debit entries equals total gross pay figure in Google Sheets
T20
Finance Manager resolves exception and workflow resumes
Slack alert → manual resolution → Reconciliation Agent resumes
After the Finance Manager updates the flagged employee record and signals resolution (via configured input mechanism), the Reconciliation Agent reprocesses that record and completes the summary
Updated record appears correctly in Google Sheets; no other records changed; Reconciliation Agent marks summary complete; Approval Agent triggers
T21
Approval email approve link is idempotent on double-click
Gmail approve link → Approval and Submission Agent → Gusto sandbox
If the approve link is clicked twice within a short window, only one Gusto API write is made; the second click returns an already-processed response
Gusto sandbox shows exactly one payroll write record for the period; execution log records two approval signal events but one Gusto call
T22
Slack confirmation message is posted after Gusto write succeeds
Approval and Submission Agent → Slack
After Gusto sandbox write returns a 200 response, Slack confirmation is posted within 60 seconds containing the period label, total gross payroll value, and submission timestamp
Slack message delivered; period label correct; gross total matches Sheets summary; timestamp within 2 minutes of Gusto write
T23
QuickBooks API rate limit encountered mid-run; agent backs off and retries
Reconciliation Agent → QuickBooks
Sandbox QuickBooks endpoint configured to return 429 on first call; agent waits 15 seconds and retries; second call succeeds
Execution log shows 429 received; 15-second backoff recorded; retry call succeeds; journal entries staged correctly; no data loss

Edge-case tests below use the E01 sequence. These cover boundary conditions that fall outside normal happy-path or single-agent failure scenarios.

ID
Edge-case scenario
Condition
Expected handling
Pass criteria
E01
Duplicate timesheet entry for the same employee and period
Deputy sandbox returns two shift records for employee 3 covering the same date range
Reconciliation Agent detects the duplicate, flags it as an exception, and does not double-count hours; Finance Manager alerted via Slack
Only one record for employee 3 in Sheets summary; duplicate flag in exception log; Slack alert names employee 3 and describes the duplicate
E02
Employee record missing an hourly rate in the HR data source
Deputy returns approved hours for employee 7; hourly rate field is blank
Reconciliation Agent cannot calculate gross pay; flags the record as incomplete; skips to next employee; Finance Manager alerted
Employee 7 row in Sheets has no gross pay value; exception log entry references missing rate field; no calculation attempted
E03
Deputy API unavailable for more than 10 minutes after trigger
Sandbox Deputy API configured to return 503 for 12 minutes from trigger time
Agent retries at 2-minute intervals up to 5 attempts; after fifth failure, posts critical alert to Slack and halts; Finance Manager notified to trigger manually
Five retry attempts logged at correct intervals; critical Slack alert delivered after fifth failure; workflow halted with clear error state
E04
Payroll summary contains a gross pay figure more than 30% above the prior period average for one employee
Employee 2 gross pay in Sheets is 38% higher than the prior period baseline loaded in the comparison config
Agent flags the anomaly as a high-value exception in the exception list; does not block the run but requires Finance Manager acknowledgement before approval email is sent
Anomaly flag present in Sheets exception tab for employee 2; approval email is withheld until Finance Manager sends the acknowledgement signal; log records the hold
E05
Business owner approval email link expires before the owner clicks it
Approve link configured with a 48-hour expiry; sandbox time advanced 49 hours without approval action
Agent detects link expiry; generates a fresh approval email with a new link; logs the re-send; does not submit to Gusto on the expired link
Second approval email delivered with valid new link; execution log records expiry detection and re-send; no Gusto write on expired link attempt
E06
Finance Manager takes no action on a Slack exception alert for more than 4 hours
Slack exception message posted; no resolution signal received within 4 hours in sandbox time simulation
Agent sends a follow-up Slack message in the same thread and a Gmail reminder to the Finance Manager; logs the escalation; does not proceed to payroll summary without resolution
Follow-up Slack message and Gmail reminder both delivered at the 4-hour mark; execution log records escalation event; workflow remains in exception-pending state
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 employee record or a designated test payroll entry in Gusto that is clearly labelled as a test run. Send the approval email to an internal test address, not to the business owner's primary inbox, until the process owner is ready to perform their review step (T27). Void or delete the test payroll run in Gusto immediately after T26 passes and before any payment processing window opens. Do not run Phase 3 during an active payroll cut-off window. Confirm with the process owner that the test date does not overlap a live payroll submission deadline.

Phase 3 tests continue the sequential ID from Phase 2. These cases are executed once against live production credentials. Each step is traced in the execution log and must be verified before the next case runs.

ID
Scenario
Production action
Expected outcome
Pass criteria
T24
Full production trigger-to-summary run with no exceptions
Scheduler fires against production Deputy account for the test employee; all hours approved; Reconciliation Agent processes; Google Sheets summary written; QuickBooks journal staged
Production Deputy API returns approved hours; Google Sheets production tab populated with correct gross pay, deductions, and net pay for test employee; QuickBooks journal entry staged; no exceptions flagged; execution log clean at each stage
Sheets summary row for test employee matches expected gross pay within $0.01; QuickBooks staging API returns 200; Slack exception channel is silent; execution log shows no errors across all three agents
T25
Approval request email delivered to internal test inbox via production Gmail
Approval Agent reads completed Sheets summary; sends approval email to internal test address using production Gmail credentials
Email arrives in internal test inbox with correct period reference, summary link pointing to the correct production Sheets tab, and a working one-click approve link
Email received within 3 minutes; subject line contains pay period label; Sheets link opens the correct tab; approve link resolves to the correct approval endpoint with the correct run token
T26
Approval signal received and Gusto production write executed for test payroll run
Internal tester clicks approve link; Approval Agent receives signal; pushes test payroll record to Gusto production using the designated test run entry
Gusto production API records the payroll write for the test entry; Slack finance channel receives confirmation message with total value and timestamp; execution log records Gusto 200 response
Gusto production shows the test payroll run in a submitted or pending state; Slack confirmation delivered within 60 seconds of Gusto write; log records no errors; test payroll run is voided in Gusto immediately after pass is confirmed
T27
Error log verification and process owner review and approval
FullSpec team presents the full execution log from T24 through T26 to the process owner; process owner reviews the payroll summary, the Slack messages, the approval email, and the Gusto write record; process owner confirms all outputs are correct and approves go-live within the FullSpec confirmation workflow
Process owner reviews all outputs and records approval within the FullSpec platform; no outstanding errors in the execution log; all test cases T01 through T26 and E01 through E06 are in a passing state; FullSpec records the approval confirmation and date as the go-live authorisation
Process owner approval recorded in the FullSpec confirmation workflow. This constitutes formal sign-off for go-live. No separate signature block is required.
Once T27 is recorded as passed in the FullSpec platform, the build is cleared for go-live. Any test case that does not pass must be logged as a defect with a severity rating (Critical, High, Medium) and resolved by the FullSpec team before the phase is retried. Contact support@gofullspec.com for defect triage and re-test scheduling.
Test and QA PlanPage 4 of 4

More documents for this process

Every document generated for Payroll Processing.

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