Back to Timesheet Collection & Approval

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

Timesheet Collection and Approval

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

This document defines the full quality assurance programme for the Timesheet Collection and Approval automation. It is written for the FullSpec build team and covers every test case required to verify that the Collection Agent, Approval Agent, and Payroll Sync Agent behave correctly in isolation, in combination, and in a live production environment. Tests are organised into three sequential phases: no phase begins until the previous phase has fully passed. The process owner joins Phase 3 to review and formally confirm the production run before go-live is authorised.

01Testing approach

Testing is structured across three phases and must be completed in sequence. A phase may not begin until every test case in the preceding phase carries a confirmed pass status. This prevents integration or end-to-end tests from masking unit-level defects. The FullSpec team runs Phases 1 and 2 independently. The process owner participates in Phase 3 as the final reviewer and sign-off authority.

1
Phase 1: Unit Testing
Each agent tested in isolation against sandbox data
Scope
Each agent tested independently: Collection Agent, Approval Agent, and Payroll Sync Agent. No cross-agent handoffs are triggered.
Environment
Sandbox only. Google Sheets test workbook, Gmail sandbox account, Slack test workspace, and Xero demo company.
Credential rule
All sandbox credentials must be used. No production OAuth tokens, no live Xero tenant, no real employee email addresses.
Pass condition
All cases T01 through T15 return the expected output with no unhandled errors. Any failure blocks progression to Phase 2.
Who runs it
FullSpec team only.
2
Phase 2: Integration and Edge Case Testing
Agent handoffs and failure scenarios tested end to end in sandbox
Scope
Full agent-to-agent handoff sequence from Collection Agent output through to Payroll Sync Agent. Separate edge-case scenarios for data anomalies, tool unavailability, and timeout logic.
Environment
Sandbox only. Full workflow automation platform configured with sandbox credentials for all five integrated tools.
Credential rule
Sandbox credentials throughout. The Xero demo company must be used; no payroll data may be written to a live Xero tenant during this phase.
Pass condition
All cases T16 through T22 and edge cases E01 through E06 pass with correct data state in the master sheet and expected tool outputs confirmed. Any failure blocks progression to Phase 3.
Who runs it
FullSpec team only.
3
Phase 3: End-to-End Production Testing
Single full production run verified with process owner sign-off
Scope
One complete pay cycle run in the live production environment using an internal test employee record. All three agents execute in sequence against real credentials.
Environment
Production. Live Google Workspace, live Slack workspace, live Xero tenant (test employee record only). Internal test addresses used for all communications.
Credential rule
Production OAuth tokens and Xero API keys are active. The test employee record must be voided in Xero immediately after the run is verified.
Pass condition
All cases T23 through T27 pass, including the process owner review case T27. Sign-off is recorded in the FullSpec confirmation log.
Who runs it
FullSpec team executes; process owner participates in review and approval for case T27.
Test and QA PlanPage 1 of 4
FS-DOC-06Quality

02Phase 1 — unit test cases

Sandbox credentials only throughout Phase 1. Do not use real employee email addresses, a live Xero tenant, or any production OAuth token during unit testing. All Gmail sends must route to the internal sandbox inbox. All Xero writes must target the demo company only.

Collection Agent — complexity: Moderate. Estimated build time: 10 hours. Tests cover the scheduled trigger, submission-status check, personalised reminder dispatch, Google Forms ingestion, validation logic, and master sheet write.

ID
Scenario
Input
Expected Output
Pass Criteria
T01
Pay period trigger fires on schedule
Scheduled trigger fires at configured pay period close date and time
Workflow execution log shows trigger event at correct timestamp; Collection Agent initialises
Execution log entry confirmed; no timeout or missed-fire error
T02
Master sheet read: all employees submitted
Google Sheets test workbook with all 10 sandbox employees marked as submitted
Agent reads sheet, finds zero missing submissions, logs status as complete, does not send reminders
No reminder emails or Slack messages dispatched; status field in sheet set to 'All submitted'
T03
Master sheet read: three employees missing
Google Sheets test workbook with 3 of 10 sandbox employees showing no submission
Agent identifies the three missing rows and prepares personalised reminder payloads for each
Exactly three reminder payloads generated; employee names and email addresses match the missing rows
T04
Reminder sent via Gmail
Three missing employee records with sandbox email addresses; Gmail sandbox credentials active
Three personalised reminder emails dispatched from sandbox sender address, each containing the employee's name and Google Form link
Three emails received in sandbox inbox; subject line, name, and form link correct in each
T05
Reminder sent via Slack
Same three missing employees mapped to sandbox Slack user IDs
Three direct Slack messages dispatched to the correct sandbox users, each with form link
Three Slack DMs confirmed in test workspace; message text and link correct
T06
Google Forms response ingested
Sandbox Google Form submission with valid hours for one employee (40 hours, 5 days, all fields populated)
Collection Agent pulls the response, maps fields to master sheet columns, writes entry to the correct employee row
Master sheet row updated with correct hours; timestamp and form response ID recorded
T07
Validation: hours within threshold
Sandbox submission with 38 hours across 5 days (within agreed 0 to 48-hour threshold)
Entry passes validation; no anomaly flag written; row marked as validated in master sheet
Anomaly column for this row is blank; status set to 'Validated'
T08
Validation: hours exceed threshold (anomaly flagged)
Sandbox submission with 62 hours across 5 days (exceeds 48-hour ceiling)
Entry fails validation; anomaly flag written to master sheet row; HR review column populated with reason
Anomaly column contains flag text; row highlighted in sheet; agent does not pass entry to approval stage
T09
Validation: required field missing
Sandbox Google Form response with 'Department' field left blank
Entry fails validation; incomplete-entry flag written; row not moved to validated state
Flag text present in anomaly column; row status remains 'Incomplete'; no downstream action triggered
T10
Master sheet write: all submissions consolidated
10 sandbox employee submissions all valid
All 10 rows written to master sheet with correct hours, timestamps, and 'Validated' status; sheet status field set to 'Ready for approval'
All 10 rows match input data; sheet-level status field reads 'Ready for approval'; no duplicate rows created

Approval Agent — complexity: Moderate. Estimated build time: 10 hours. Tests cover approval email dispatch, token link generation, manager response logging, escalation timer, and audit trail write.

ID
Scenario
Input
Expected Output
Pass Criteria
T11
Approval email dispatched to manager
Master sheet status 'Ready for approval'; two sandbox managers each responsible for 5 employees
Two approval emails sent from sandbox Gmail, each containing a formatted hours summary and a unique one-click approve link
Two emails received in sandbox inbox; employee lists correct per manager; token links are unique and well-formed
T12
Manager approves via token link
Sandbox manager clicks approve link from T11 email within the response window
Approval Agent captures the response, logs manager name and timestamp against each employee row in master sheet, marks rows as 'Approved'
All five employee rows under that manager show 'Approved' status and correct approval timestamp
T13
Escalation fires after timeout window
Sandbox manager has not clicked approve link within the configured 24-hour window
Escalation message sent to manager via Gmail and Slack; escalation timestamp logged in master sheet
Escalation email and Slack message confirmed in sandbox; escalation timestamp present in sheet; original approval row still shows 'Pending'
T14
All managers approved: agent marks sheet complete
Both sandbox managers have approved (T12 repeated for second manager)
Master sheet approval-complete flag set to true; Payroll Sync Agent trigger condition met
Sheet approval-complete field reads true; workflow execution log shows Payroll Sync Agent trigger event queued
T15
Payroll Sync Agent: Xero API write
Master sheet with 10 approved employee rows; Xero demo company credentials active; all employee IDs present in Xero demo
Approved hours for all 10 employees written to Xero demo company via payroll API; Slack confirmation message sent to payroll owner sandbox account
Xero demo company shows correct hours against each employee pay item; Slack message received with correct employee count and total hours
Test and QA PlanPage 2 of 4
FS-DOC-06Quality

03Phase 2 — integration and edge case tests

Phase 2 tests the full agent-to-agent handoff chain and verifies that data state is maintained correctly across all three agents. Test IDs continue from T16. A separate edge-case table follows, covering realistic failure and exception scenarios that must be handled gracefully.

ID
Scenario
Input
Expected Output
Pass Criteria
T16
Collection Agent to Approval Agent handoff: clean data
10 sandbox submissions all validated and written to master sheet by Collection Agent
Approval Agent triggers automatically on sheet status change to 'Ready for approval'; approval emails dispatched within 60 seconds
Approval emails confirmed in sandbox; no manual trigger required; handoff latency under 60 seconds
T17
Approval Agent to Payroll Sync Agent handoff: all approved
All 10 sandbox employee rows marked 'Approved' by Approval Agent
Payroll Sync Agent triggers automatically; Xero demo write initiates; Slack confirmation sent
Xero demo hours updated; Slack message received; no manual intervention required between agents
T18
Partial approval: one manager pending, one approved
Manager A approved 5 employees; Manager B has not responded
Payroll Sync Agent does not trigger; escalation fires to Manager B after timeout; sheet status remains 'Pending approval'
Sync Agent shows no execution; escalation message confirmed; sheet status unchanged
T19
Anomaly flagged: HR resolves, flow resumes
One employee submission flagged in T08 reviewed and corrected by HR in master sheet; flag cleared manually
Collection Agent or orchestration layer detects flag cleared; row enters approval queue; Approval Agent routes correctly
Corrected row appears in manager's approval email with correct hours; no duplicate row created
T20
Full cycle: trigger to Slack confirmation
Complete 10-employee sandbox pay cycle run from scheduled trigger through to Xero write and Slack message
All three agents execute in sequence; master sheet shows 10 validated, 10 approved rows; Xero demo updated; Slack message received
End-to-end execution confirmed with no manual steps; all data states correct; execution log shows no errors
T21
Xero API rate limit response (429) handling
Payroll Sync Agent attempts to write 10 records; Xero demo returns 429 on the 8th record
Agent pauses, waits the retry interval (60 seconds), retries the failed record, completes remaining two records
All 10 records eventually written to Xero demo; no data duplicated; error log shows 429 event and successful retry
T22
Gmail send failure: SMTP authentication error
Collection Agent attempts reminder send; Gmail OAuth token returns 401 invalid-credentials response
Agent logs the authentication error; execution halts for that send step; error written to workflow log; FullSpec alert triggered
No email dispatched; error log entry present; workflow does not silently continue or mark step as successful

Edge case tests below use the E-prefix numbering series. These scenarios target data quality failures, duplicate submissions, missing employee mappings, and human timeout conditions.

ID
Scenario
Input
Expected Output
Pass Criteria
E01
Duplicate Google Form submission from same employee
Sandbox employee submits the Google Form twice within the same pay period
Collection Agent detects duplicate (matching employee ID and pay period); second submission flagged; only first submission written to master sheet unless HR overrides
Master sheet contains one row per employee; duplicate flag visible in log; no double-counting of hours
E02
Employee record in master sheet not found in Xero
Master sheet contains sandbox employee ID '99999' which does not exist in Xero demo company
Payroll Sync Agent skips the unmatched record, logs the mismatch error, completes all other records, and includes the skipped employee in the Slack confirmation message
Xero demo shows no entry for '99999'; Slack message lists the skipped employee by name; all other records written correctly
E03
Missing manager mapping for one employee team
Approval Agent reads master sheet; one employee group has no manager email address in the manager mapping table
Agent skips the unmapped group, logs a configuration error, sends an alert to the FullSpec workflow log, and does not send a partial approval email
No email sent for unmapped group; error log shows specific employee group; rest of approval routing continues
E04
Employee submits Google Form after pay period close
Sandbox Form submission arrives with a timestamp 2 hours after the pay period close deadline
Collection Agent rejects the late submission, logs it as out-of-window, and does not write it to the current-period master sheet; HR notified via error log
Late submission absent from master sheet for current period; log entry present; no disruption to other rows
E05
Slack API unavailable during reminder dispatch
Collection Agent attempts Slack DM send; Slack API returns 503 service unavailable
Agent logs the Slack failure, falls back to Gmail reminder only for affected employees, and records the fallback action in the execution log
Gmail reminders confirmed sent; Slack failure logged; no employee left without any reminder; execution continues
E06
Manager approval link used after expiry
Sandbox manager clicks the approval token link 48 hours after it was issued (past the configured 24-hour token expiry)
System rejects the expired token, returns an appropriate error page to the manager, and logs the expired-token event; master sheet row remains 'Pending'
No approval recorded in master sheet; expired-token event in log; escalation path remains active for the manager
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 (not a real employee address) for all communications during this run. The test employee record written to Xero must be clearly labelled as a test entry and voided in Xero immediately after the production run is verified and T27 is signed off. Do not run Phase 3 during an active pay cycle where real payroll data is being processed.

Phase 3 executes one complete production run using live credentials, live Google Workspace, the live Slack workspace, and the live Xero tenant. A single internal test employee record is used for all data writes. The FullSpec team orchestrates the run and records outcomes in the test log. The process owner joins for case T27, reviews the full output, and confirms approval in the FullSpec confirmation record.

ID
Scenario
Input
Expected Output
Pass Criteria
T23
Production trigger: scheduled pay period close fires
Live automation platform configured with production schedule; pay period close date reached
Collection Agent initialises in production environment; execution log records trigger event with correct timestamp
Live execution log confirms trigger at correct time; no duplicate trigger; Collection Agent status shows 'Running'
T24
Production reminder: Gmail and Slack messages dispatched to test address
Internal test employee record set to 'Not submitted' in live master Google Sheet
Personalised reminder email sent to the internal test Gmail address; Slack DM sent to internal test Slack account; form link functional
Email received at internal test address within 2 minutes of trigger; Slack DM confirmed; form link opens correct Google Form
T25
Production submission ingested and written to live master sheet
Internal test address submits the live Google Form with valid hours (40 hours, 5 days, all fields complete)
Collection Agent reads live Form response; validates entry; writes to live master Google Sheet; sheet status updates to 'Ready for approval'
Live master sheet row populated with correct hours; validation status 'Validated'; sheet-level status 'Ready for approval'
T26
Production Xero write: approved hours loaded via API
Live master sheet approval-complete flag set to true by Approval Agent (process owner approves via live token link); Payroll Sync Agent triggers
Approved hours for test employee written to live Xero tenant via payroll API; Slack confirmation sent to payroll owner's live Slack account
Live Xero tenant shows correct hours for test employee pay item; Slack message received with correct employee count and hours; test record immediately voided in Xero post-confirmation
T27
Process owner review and production sign-off
Process owner reviews: live execution log, live master Google Sheet (all states correct), Slack confirmation message, and Xero write confirmation (pre-void)
Process owner confirms that all outputs match the expected workflow, no data errors are present, and the automation is approved for go-live on the next pay cycle
Process owner review completed and approval confirmed. Sign-off recorded by the FullSpec team in the FullSpec confirmation log. Go-live authorised for the next live pay cycle.
Once T27 is confirmed, the FullSpec team records the approval in the project confirmation log and notifies the process owner at the email address on file. The test Xero record must be voided before the next real pay cycle begins. Any issues identified during Phase 3 are logged as defects, resolved by the FullSpec team, and Phase 3 is re-run in full before go-live is authorised. Contact support@gofullspec.com for any post-sign-off queries.
Test and QA PlanPage 4 of 4

More documents for this process

Every document generated for Timesheet Collection & Approval.

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