Back to Purchase Order Management

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

Purchase Order Management

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

This document defines the full test and quality assurance plan for the Purchase Order Management automation. It covers every test case the FullSpec team will execute across three sequential phases: unit testing of individual agents in isolation, integration and edge-case testing of agent handoffs and exception paths, and an end-to-end production run with the process owner present. No phase begins until the previous phase has fully passed. Test IDs are sequential across all phases so every result can be traced back to a single log.

01Testing approach

Testing runs in three phases in strict sequence. No phase begins until every test case in the previous phase has a confirmed pass status. Phase 1 isolates each agent and verifies its individual logic. Phase 2 tests the handoffs between agents and deliberately exercises failure and edge-case scenarios. Phase 3 runs the complete flow in production with live credentials, observed by the process owner, and ends with formal owner sign-off recorded in the FullSpec confirmation log.

1
Phase 1: Unit Testing
Each agent tested in isolation using sandbox credentials
Scope
Individual agent logic: Intake and Validation Agent, Approval Routing Agent, PO Creation and Notification Agent
Environment
Sandbox only. No live Xero, Gmail, or Slack production workspaces are touched.
Credential rule
All credentials must be sandbox or test-mode equivalents. No production API keys permitted in Phase 1.
Pass condition
All test cases T01 through T12 return expected outputs with zero unhandled errors.
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 tested end-to-end in sandbox
Scope
Cross-agent data handoffs, approval branch paths (approved and rejected), and all identified edge cases including duplicates, missing data, tool unavailability, and timeout scenarios
Environment
Sandbox throughout. Simulated tool failures are injected at the orchestration layer.
Credential rule
Sandbox credentials only. Edge-case tests use mock payloads to simulate tool errors without touching live systems.
Pass condition
All integration test cases T13 through T19 and all edge-case cases E01 through E06 return expected outputs or graceful error handling with correct alerting.
Who runs it
FullSpec team only. Process owner may observe but is not required.
3
Phase 3: End-to-End Production Test
Full flow verified in production with live credentials and process owner sign-off
Scope
Complete purchase order journey from Google Form submission through Xero PO creation, Gmail supplier send, Google Sheets log update, and Slack requester notification
Environment
Production. Live Xero, Gmail, Slack, and Google Sheets credentials are active.
Credential rule
All production API keys and OAuth tokens must be confirmed active before Phase 3 begins. Test records must be voided in Xero immediately after the run.
Pass condition
All production test cases T20 through T24 pass, including the process owner review case (T24) recorded in the FullSpec confirmation log.
Who runs it
FullSpec team executes all cases. Process owner joins for T20 onwards and provides formal sign-off at T24.
Test and QA PlanPage 1 of 4
FS-DOC-06Quality

02Phase 1 — unit test cases

All Phase 1 tests must be executed using sandbox credentials only. Do not connect production Google Forms, Slack workspaces, Xero organisations, Gmail accounts, or Google Sheets during this phase. Any test that inadvertently touches a live system must be stopped immediately, the credential rotated, and the test restarted from the beginning of Phase 1.

Intake and Validation Agent — tests T01 through T04

ID
Scenario
Input
Expected output
Pass criteria
T01
Happy path: complete valid submission
Google Form response with supplier name, item description, quantity, unit cost, and budget code all present and within format rules
Validated request record created; workflow advances to Approval Routing Agent
No validation errors logged; downstream agent receives structured payload within 5 seconds
T02
Missing required field: budget code absent
Form response with all fields except budget code
Workflow halts at validation; Slack message sent to requester listing the missing field
Slack message delivered to correct requester within 60 seconds; workflow does not advance to approval routing
T03
Missing required field: supplier name absent
Form response with supplier name field empty
Workflow halts; Slack prompt lists supplier name as the missing field
Slack prompt matches the absent field exactly; no other fields flagged incorrectly
T04
Invalid cost value: non-numeric entry
Form response with estimated cost field containing text string
Validation fails; Slack message sent to requester indicating cost field format error
Error message is specific to field type mismatch; workflow does not advance

Approval Routing Agent — tests T05 through T09

ID
Scenario
Input
Expected output
Pass criteria
T05
Happy path: spend below primary threshold, single approver
Validated request with spend value under the configured threshold for the department
Slack approval message sent to the correct approver with approve and reject buttons and a spend summary
Message delivered to designated approver channel within 30 seconds; buttons are interactive
T06
Happy path: spend above threshold, escalated approver
Validated request with spend value exceeding the primary approval threshold
Slack message routed to the escalated approver, not the standard approver
Correct approver channel receives the message; standard approver does not receive a duplicate
T07
Approver clicks Approve button
Approver interacts with the Slack action button selecting Approve
Approval decision logged with timestamp and approver identity; workflow advances to PO Creation Agent
Approval record contains approver display name, Slack user ID, and ISO 8601 timestamp
T08
Approver clicks Reject button
Approver interacts with the Slack action button selecting Reject
Rejection logged with timestamp; requester notified via Slack; workflow routes to manual exception path
No PO is created; ops manager exception notification is delivered; rejection reason field is captured if provided
T09
24-hour reminder: no approver response
Approval Slack message sent; no button interaction within the simulated 24-hour window
A single automated reminder is posted to the approver channel; no second reminder is queued
Exactly one reminder message is sent; reminder references the original request ID; duplicate reminders do not fire

PO Creation and Notification Agent — tests T10 through T12

ID
Scenario
Input
Expected output
Pass criteria
T10
Happy path: PO created in Xero on approval
Confirmed approval decision with validated request payload
Draft PO created in Xero sandbox with correct line item, quantity, unit cost, budget code, and sequential PO number
Xero sandbox API returns 201 Created; PO number increments correctly from last known value; all line item fields match input
T11
Supplier email dispatched via Gmail
Xero PO creation confirmed; supplier email address present in request payload
Gmail sends PO PDF to supplier address; subject line includes PO number; body contains delivery confirmation request
Gmail sandbox delivery log confirms message sent; attachment is valid PDF; correct recipient address used
T12
Google Sheets log updated and requester notified
PO created and supplier email sent; procurement register sheet ID available
New row appended to Google Sheets with PO number, supplier, value, approval timestamp, and expected delivery date; Slack message sent to original requester
Google Sheets row contains all seven required columns with no empty cells; Slack message references correct PO number and supplier name
Test and QA PlanPage 2 of 4
FS-DOC-06Quality

03Phase 2 — integration and edge case tests

Integration tests — agent handoff cases T13 through T19

ID
Scenario
Input
Expected output
Pass criteria
T13
Full validated handoff: Intake Agent to Approval Routing Agent
Complete form submission triggering the intake agent through to routing
Approval Routing Agent receives structured payload with all required fields; approval Slack message fires without manual intervention
No data is lost or reformatted incorrectly between agents; end-to-end latency under 10 seconds
T14
Approved handoff: Approval Routing Agent to PO Creation Agent
Approver clicks Approve in Slack; agent handoff fires
PO Creation Agent receives approval payload including approver identity and timestamp; Xero PO creation begins immediately
PO Creation Agent log shows correct approval metadata; no duplicate PO creation attempts
T15
Rejected handoff: Approval Routing Agent to manual exception path
Approver clicks Reject in Slack
Workflow routes to the ops manager exception notification; PO Creation Agent does not trigger
PO Creation Agent shows no execution record for this request ID; ops manager Slack notification is delivered
T16
48-hour supplier no-reply follow-up
Supplier email sent; no confirmation reply received within simulated 48-hour window
Follow-up email dispatched to supplier from Gmail; no additional follow-ups queued beyond the first
Exactly one follow-up email is sent per unanswered PO; Gmail delivery log confirms dispatch
T17
Google Sheets write after full approved flow
End-to-end approved flow completed in sandbox
Procurement register row written with all required fields in the correct column order
Row is appended, not overwritten; column mapping matches the agreed schema: PO number, supplier, value, approval timestamp, expected delivery, status
T18
Requester Slack notification fires after PO confirmed
PO created and supplier email confirmed in the same run
Requester receives Slack message with PO number, supplier name, and expected delivery date
Notification is sent to the user who originally submitted the form, not the approver; all three data points are present
T19
Resubmission after missing-field prompt
Requester receives Slack missing-field prompt and resubmits a corrected form entry
Second submission passes validation and advances to approval routing without creating a duplicate record
Only one request record exists for this submission sequence; no duplicate approval messages sent

Edge-case tests — E01 through E06

ID
Scenario
Input
Expected output
Pass criteria
E01
Duplicate form submission: same requester submits identical request twice within 2 minutes
Two Google Form submissions with identical supplier, item, quantity, cost, and budget code from the same user
Second submission is detected as a likely duplicate; workflow pauses and alerts the FullSpec monitoring log; no duplicate PO is created
Only one request advances past intake; duplicate flag is written to the log with both submission timestamps
E02
Missing supplier email address in request
Approved request where the supplier contact field contains no email address
Workflow creates the Xero PO but halts before Gmail send; error notification delivered to ops manager Slack channel listing the missing supplier contact
Gmail send step does not attempt delivery to a blank address; Xero PO is created and logged; ops manager alert is specific about the failure point
E03
Xero API unavailable at PO creation step
Valid approved request arriving when the Xero sandbox API returns a 503 response
Workflow retries the Xero call up to three times with exponential back-off; if all retries fail, ops manager receives a Slack error alert with the request ID
Retry logic fires exactly three times; no partial PO is created in Xero; error alert contains request ID and failure timestamp
E04
Slack API rate limit hit during approval message send
High-volume scenario where multiple approval messages are queued simultaneously and the Slack API returns a 429 response
Workflow respects the Retry-After header returned by Slack and queues the message for redelivery; no messages are dropped
All queued approval messages are delivered; no duplicate messages are sent; Slack rate limit errors are logged but do not cause workflow failure
E05
Approver account deactivated: Slack user no longer active
Approval Routing Agent attempts to send a Slack message to a user whose account has been deactivated
Message send fails gracefully; workflow alerts the ops manager that the designated approver is unreachable and the request requires manual assignment
No unhandled exception is thrown; ops manager alert includes the request ID and the deactivated Slack user ID
E06
Human timeout: approver does not respond within 48 hours even after the 24-hour reminder
Approval message sent; reminder sent at 24 hours; no button interaction at 48 hours
Workflow escalates the unanswered request to the ops manager via Slack with a timeout flag; request is not automatically approved or rejected
Escalation message is sent once and only once at the 48-hour mark; the original request status is set to Pending Escalation in the procurement register
Test and QA PlanPage 3 of 4
FS-DOC-06Quality

04Phase 3 — end-to-end production test

Important before running Phase 3: All production test runs must use an internal test email address as both the requester and the supplier recipient. Do not send live PO emails to real supplier contacts during testing. Every Xero PO created during Phase 3 must be voided in Xero immediately after each test case is confirmed as passed. The Google Sheets procurement register test rows must be clearly marked as TEST and removed or archived before go-live. Confirm with the process owner that these cleanup steps have been completed before the automation is switched to live traffic.
ID
Scenario
Input
Expected output
Pass criteria
T20
Full production happy path: approved request, PO created end to end
Internal test user submits a complete Google Form purchase request in the live production environment using a test supplier email address
Intake Agent validates the request; Approval Routing Agent sends a Slack approval message to the live approver; approver clicks Approve; PO is created in the live Xero organisation; Gmail sends the PO PDF to the test supplier address; Google Sheets row is appended; requester receives Slack notification
Every step completes without manual intervention; total elapsed time from form submission to requester Slack notification is under 10 minutes; Xero PO number is correctly sequenced; all data fields match the form input exactly
T21
Production rejection path: approver rejects the request
Internal test user submits a valid request; approver clicks Reject in the live Slack workspace
No Xero PO is created; requester receives a Slack notification that the request was not approved; ops manager receives the exception path alert
Xero shows no new PO for this request ID; Google Sheets row is written with status Rejected; both Slack notifications are delivered to the correct users
T22
Production error log verification: forced validation failure
Internal test user submits an incomplete form with the budget code field intentionally left blank
Intake Agent sends the requester a Slack prompt listing the missing field; workflow does not advance; error event is written to the automation platform execution log
Execution log entry exists with the correct timestamp, request ID, and error type; Slack prompt is delivered within 60 seconds; no downstream agent is triggered
T23
Production 48-hour supplier follow-up trigger verification
Approved request processed in production; test supplier address does not reply within the monitoring window (simulated by advancing the follow-up timer in the orchestration layer)
Follow-up email is dispatched from the live Gmail account to the test supplier address; follow-up event is logged in Google Sheets and in the execution log
Exactly one follow-up email is sent; Gmail sent items confirm the correct recipient and PO reference; Google Sheets status column updates to Confirmation Pending
T24
Process owner review and approval: final sign-off case
Process owner (Operations Manager) observes all Phase 3 test cases live and reviews the Xero records, Google Sheets procurement register, Gmail sent items, and Slack message history against the expected outputs documented in this plan
Process owner confirms that all production outputs match expected results; sign-off is recorded in the FullSpec confirmation log against this test plan document; no separate signature block is required
Process owner sign-off confirmed in the FullSpec confirmation log. All Phase 3 cases carry a pass status. The automation is cleared for live traffic.
Once T24 is recorded as passed in the FullSpec confirmation log, the automation is considered fully tested and ready for go-live. The FullSpec team will archive all sandbox credentials, void all test Xero records, and remove Phase 3 test rows from the Google Sheets procurement register before the live switch-on. Contact the FullSpec team at support@gofullspec.com with any questions about test results or outstanding items before go-live.
Test and QA PlanPage 4 of 4

More documents for this process

Every document generated for Purchase Order Management.

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