Back to Inventory Reorder 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

Inventory Reorder Management

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

This document defines the full test and quality assurance strategy for the Inventory Reorder Management automation. It covers three sequential phases: unit testing of individual agent logic, integration and edge-case testing of agent handoffs and failure scenarios, and a final end-to-end production run. The FullSpec team executes Phases 1 and 2 entirely in sandbox environments. Your operations manager joins Phase 3, which runs against live credentials. No phase begins until all test cases in the previous phase have passed without exception.

01Testing approach

Testing is structured in three phases that run in strict sequence. Phase 1 validates each agent in isolation. Phase 2 validates the handoffs between agents and exposes failure-mode behaviour. Phase 3 validates the complete flow against production credentials with real data. A phase may not begin until every test case in the preceding phase carries a confirmed pass status, recorded in the FullSpec project log.

1
Phase 1 — Unit Testing
Each agent tested in isolation before integration begins
Scope
Individual agent logic: Reorder Calculation Agent and PO Dispatch and Tracking Agent tested independently using stubbed inputs and mock API responses.
Environment
Sandbox only. Cin7 sandbox account, Xero demo company, Gmail test inbox, Slack test workspace, Google Sheets test file.
Credential rule
No production API keys permitted. All credentials must be sandbox or developer-tier tokens scoped to test accounts only.
Pass condition
All test cases T01 through T14 return the expected output with zero unhandled errors. Any failure blocks progression to Phase 2.
Who runs it
FullSpec team only. No process owner involvement required at this phase.
2
Phase 2 — Integration and Edge Case Testing
Agent handoffs, tool connections, and failure scenarios validated
Scope
End-to-end agent handoffs across all connected tools (Cin7, Google Sheets, Slack, Gmail, Xero), plus edge cases covering duplicate triggers, missing data, tool unavailability, and approval timeout.
Environment
Sandbox only. The same sandbox credentials used in Phase 1 apply. No production data introduced.
Credential rule
Sandbox credentials only. OAuth tokens must be scoped to sandbox tenants. Production refresh tokens must not be loaded into the automation platform environment at this stage.
Pass condition
Integration test cases T15 through T22 and edge-case tests E01 through E07 all pass. All error paths resolve to the defined fallback behaviour without manual intervention.
Who runs it
FullSpec team only. Process owner is not required for Phase 2.
3
Phase 3 — End-to-End Production Test
Full production run with real credentials; process owner sign-off required
Scope
One complete reorder cycle traced from Cin7 trigger through to supplier email, Xero bill creation, Google Sheets log entry, and 24-hour chaser, using production credentials and a designated test SKU.
Environment
Production. Live Cin7 tenant, live Xero organisation, live Gmail account, live Slack workspace. A dedicated test SKU is used to avoid affecting real inventory records.
Credential rule
Production API keys and OAuth tokens active. All tokens must be scoped to least-privilege roles. Sandbox credentials are revoked before this phase begins.
Pass condition
Test cases T23 through T27 all pass, including the process owner review case (T27). The test PO and Xero bill are voided immediately after confirmation. Sign-off is recorded in the FullSpec project confirmation.
Who runs it
FullSpec team executes T23 through T26. The process owner (operations manager) reviews outputs and completes T27 as the final approval step.
Test and QA PlanPage 1 of 4
FS-DOC-06Quality

02Phase 1 — unit test cases

Sandbox credentials only. No production API keys, OAuth tokens, or real supplier contacts may be used during Phase 1. All Cin7, Xero, Gmail, Slack, and Google Sheets connections must point to developer sandbox or demo accounts. Any test that inadvertently touches a production endpoint must be halted immediately and reported to the FullSpec team lead before continuing.

Reorder Calculation Agent — unit test cases (T01 to T07)

ID
Scenario
Input
Expected Output
Pass Criteria
T01
Happy path: SKU at reorder point
Cin7 sandbox SKU 'TEST-001', on-hand qty = reorder point (50 units), daily sales velocity = 10, lead time = 5 days, safety stock = 20
Calculated reorder qty = 70 units; draft PO data object returned with SKU, supplier ID, quantity, and expected delivery date
Draft PO data object is non-null; quantity field equals 70; no errors logged; execution time under 10 seconds
T02
Happy path: SKU below reorder point
SKU 'TEST-002', on-hand qty = 30 (reorder point = 50), daily sales = 8, lead time = 7 days, safety stock = 15
Calculated reorder qty = 86 units; draft PO data object returned correctly
Quantity field = 86; supplier and delivery date fields populated; no unhandled exceptions
T03
SKU above reorder point — no trigger
SKU 'TEST-003', on-hand qty = 120 (reorder point = 50)
Agent does not fire; no draft PO data created
Workflow exits at trigger check with a logged skip event; no downstream steps execute
T04
Missing sales velocity data in Google Sheets
SKU 'TEST-004' at reorder point; corresponding row in Google Sheets has blank sales velocity cell
Agent logs a data-quality error; workflow pauses and sends an internal error notification; no draft PO created
Error event recorded in platform log; no PO data emitted; error notification payload includes SKU ID and field name
T05
Missing lead time data in Google Sheets
SKU 'TEST-005' at reorder point; lead time cell is blank
Agent logs data-quality error; workflow halts gracefully for this SKU; other SKUs in the same batch continue
Error logged for TEST-005 only; remaining SKUs process normally; no silent failure
T06
Cin7 API returns 429 rate-limit response
Polling request to Cin7 sandbox returns HTTP 429 with Retry-After: 30
Agent retries after 30 seconds (up to 3 attempts); if all retries fail, error is logged and workflow halts without data loss
Retry logic fires; log shows attempt count; after 3 failures, error notification emitted; no duplicate PO data created
T07
Calculated reorder quantity is zero or negative
SKU 'TEST-006' with on-hand qty = reorder point but sales velocity = 0 and safety stock = 0
Agent detects non-positive quantity; logs a validation warning; no draft PO created; SKU flagged for manual review
Draft PO data object is null; validation warning in log includes SKU ID and calculated quantity value

PO Dispatch and Tracking Agent — unit test cases (T08 to T14)

ID
Scenario
Input
Expected Output
Pass Criteria
T08
Happy path: sub-threshold PO dispatched automatically
Draft PO data for TEST-001, total value = $280 (approval threshold = $500); supplier email = test-supplier@sandbox.local
PO created in Cin7 sandbox; PO emailed via Gmail sandbox; draft bill created in Xero demo; row appended to Google Sheets test file
All four downstream actions confirm success responses; no Slack approval message sent; Google Sheets row contains correct PO number, supplier, quantity, value, and date
T09
Happy path: above-threshold PO routed for Slack approval then dispatched
Draft PO data, total value = $1,200 (threshold = $500); Slack test workspace configured
Slack approval message posted to operations channel with approve/reject buttons; on simulated approval click, PO emailed to supplier, Xero bill created, Google Sheets updated
Slack message received in test channel within 30 seconds; approval action triggers downstream steps; all four confirmations logged
T10
Slack approval rejected by manager
Above-threshold PO; Slack reject button clicked in test workspace
Workflow halts PO dispatch; rejection event logged; internal notification posted to operations channel; no supplier email sent; no Xero bill created
Supplier Gmail inbox receives no email; Xero demo shows no new bill; rejection log entry includes PO ID, rejector identity, and timestamp
T11
Gmail send fails (SMTP error / sandbox delivery failure)
Valid PO data; Gmail sandbox returns a 550 delivery error
Agent logs send failure; retries once after 60 seconds; if retry fails, error notification sent internally; PO remains in Cin7 as draft
No duplicate send attempts beyond one retry; error log entry includes error code and PO ID; Cin7 draft PO status not changed to 'sent'
T12
Xero bill creation fails (authentication error)
Valid PO data post-dispatch; Xero sandbox returns 401 Unauthorized
Agent logs Xero auth failure; retries token refresh; if refresh fails, internal alert sent with PO ID; PO dispatch to supplier is not rolled back
Retry logic fires; error notification includes Xero error code and PO ID; supplier email already sent is not recalled; duplicate bill not created
T13
24-hour chaser fires when no supplier acknowledgement received
PO dispatched at T+0; no reply email detected in Gmail sandbox inbox after 24-hour wait (simulated via test timer override)
Chaser email sent to supplier sandbox address; Slack alert posted to operations channel with PO ID and supplier name
Chaser email delivered to sandbox inbox; Slack notification received; chaser timestamp recorded in Google Sheets tracking row
T14
24-hour chaser suppressed when acknowledgement received
PO dispatched; simulated supplier reply email arrives within 24-hour window (Gmail sandbox inbound)
Chaser email is not sent; acknowledgement received event logged; Google Sheets row updated with acknowledgement timestamp
No chaser email in supplier sandbox inbox; log shows chaser suppressed; Google Sheets acknowledgement column populated
Test and QA PlanPage 2 of 4
FS-DOC-06Quality

03Phase 2 — integration and edge case tests

Integration tests (T15 to T22) validate the handoff between the Reorder Calculation Agent and the PO Dispatch and Tracking Agent, as well as the reliability of each external tool connection under realistic load. All tests run in the sandbox environment. Edge-case tests (E01 to E07) cover the failure and boundary scenarios most likely to occur in production.

ID
Scenario
Input
Expected Output
Pass Criteria
T15
Full agent handoff: Reorder Calculation Agent output consumed by PO Dispatch Agent
Cin7 sandbox triggers on TEST-001 at reorder point; Reorder Calculation Agent produces draft PO data object
PO Dispatch Agent receives the data object within 5 seconds; PO creation begins immediately; no manual intervention required
No data loss between agents; PO Dispatch Agent log shows correct PO ID, SKU, quantity, and supplier; latency under 5 seconds
T16
Batch trigger: three SKUs hit reorder point simultaneously
Cin7 sandbox poll returns three SKUs (TEST-001, TEST-002, TEST-007) all at or below reorder point in the same polling interval
Three separate Reorder Calculation Agent executions fire concurrently; three independent PO Dispatch flows complete without cross-contamination
Three distinct POs created in Cin7 sandbox; three separate Google Sheets rows appended; no SKU data mixed between records
T17
Google Sheets append under concurrent writes
Two PO Dispatch flows attempt to append rows to the tracking sheet within the same second
Both rows appended correctly; no row overwritten; row order reflects dispatch timestamps
Google Sheets test file contains exactly two new rows; both rows contain accurate data; no blank or overwritten rows
T18
Slack approval message delivered to correct channel and user
Above-threshold PO for TEST-009 (value $950); Slack test workspace with operations channel and test manager user
Slack message delivered to operations channel; message body includes SKU, supplier, quantity, value, and approve/reject action buttons
Message appears in correct channel within 30 seconds; both buttons functional; message text matches PO data exactly
T19
Xero bill linked correctly to supplier record
PO Dispatch Agent creates Xero bill for TEST-001 PO; supplier 'Sandbox Supplier A' exists in Xero demo company
Draft bill created in Xero with correct contact, reference (PO number), amount, and due date derived from lead time
Xero demo bill record shows correct contact, amount matches PO value, PO number in reference field, status is Draft
T20
Cin7 PO status updated to 'Sent' after dispatch
PO created in Cin7 sandbox as Draft; Gmail dispatch step completes successfully
Cin7 PO status updated to Sent via API PATCH call; status visible in Cin7 sandbox UI
GET /purchaseorders/{id} returns status = Sent after dispatch; no intermediate status states persisted incorrectly
T21
Reorder Calculation Agent output schema mismatch
Agent produces a draft PO data object with a missing 'supplier_email' field (simulated schema corruption)
PO Dispatch Agent detects missing required field; halts execution; logs schema validation error with field name; no partial PO created
Error log entry includes field name 'supplier_email' and execution ID; no Cin7 PO record created; no emails sent
T22
End-to-end latency within acceptable threshold
Single SKU at reorder point in Cin7 sandbox; sub-threshold order value
Time from Cin7 poll trigger to Google Sheets row appended is under 3 minutes
Timestamp comparison between trigger event log and Sheets append log shows elapsed time under 180 seconds

Edge-case test cases (E01 to E07)

ID
Scenario
Input
Expected Output
Pass Criteria
E01
Duplicate trigger: same SKU fires twice in the same polling interval
Cin7 sandbox returns the same SKU at reorder point in two consecutive poll results before the first workflow completes
Deduplication logic detects the duplicate workflow ID or SKU-plus-timestamp combination; second execution is suppressed; single PO created
Cin7 sandbox contains exactly one PO for the SKU; log shows deduplication event for the second trigger; no duplicate supplier email sent
E02
Supplier email address missing from reference data
SKU 'TEST-010' at reorder point; Google Sheets reference row has blank supplier_email field
PO Dispatch Agent detects missing email; logs data error with SKU ID; creates Cin7 PO as draft but does not dispatch; internal alert sent
No Gmail send attempted; Cin7 PO status remains Draft; error log includes SKU ID and field name; no Xero bill created
E03
Cin7 API unavailable (timeout or 503 response)
Polling step receives HTTP 503 from Cin7 sandbox with no Retry-After header
Automation platform retries with exponential backoff (30s, 60s, 120s); after three failures, halts and sends internal error alert; no data written
Log shows three retry attempts with correct intervals; error alert payload includes timestamp and HTTP status code; no partial records in any system
E04
Xero API unavailable at bill creation step
PO dispatched to supplier successfully; subsequent Xero API call returns 503
Agent retries Xero bill creation twice; if both fail, logs failure with PO ID; posts internal Slack alert to operations channel; PO dispatch is not rolled back
Supplier email confirmed sent; Xero demo contains no orphaned bill; internal Slack alert received with PO ID and error details; log shows retry count
E05
Slack approval not actioned within 48 hours (manager timeout)
Above-threshold PO Slack message sent; no approve or reject action taken within 48 hours (simulated via timer override)
Automation posts a reminder message to the operations channel at the 24-hour mark; at 48 hours, escalation alert sent; PO remains as draft in Cin7
Reminder Slack message received at 24-hour mark; escalation message at 48-hour mark includes PO ID, value, and SKU; no auto-approval occurs
E06
Negative on-hand stock value in Cin7
Cin7 sandbox SKU 'TEST-011' reports on-hand qty = -5 (negative stock due to oversell)
Reorder Calculation Agent detects negative stock; treats it as a reorder trigger; flags the anomaly in the log; calculates reorder quantity based on reorder point plus safety stock; does not use negative value in calculation
Reorder quantity calculated correctly using reorder point as baseline; anomaly flag present in log with SKU ID and raw stock value; no arithmetic errors
E07
Google Sheets API quota exhausted (429 from Sheets API)
Batch of 10 concurrent PO rows being appended; Sheets API returns 429 with Retry-After: 60
Agent queues remaining append operations; retries after 60 seconds; all rows eventually written with no data loss
Google Sheets test file contains all 10 expected rows after retry cycle completes; no rows lost or duplicated; log shows queue and retry events
Test and QA PlanPage 3 of 4
FS-DOC-06Quality

04Phase 3 — end-to-end production test

Important before running Phase 3: Use a designated internal test SKU (agreed with the operations manager before this phase begins) that does not affect real inventory counts or supplier relationships. Route all test PO emails to an internal test email address, not a live supplier contact. The test Cin7 PO, Xero bill, and Google Sheets tracking row must be voided or deleted immediately after the process owner confirms the test. Do not leave test records in production systems. Confirm with the FullSpec team lead that Phase 1 and Phase 2 logs are fully closed before any production credential is loaded into the automation platform.
ID
Scenario
Input
Expected Output
Pass Criteria
T23
Full production reorder cycle: sub-threshold SKU
Designated test SKU manually set to on-hand qty = reorder point in live Cin7; order value configured below approval threshold; supplier email field set to internal test address
Cin7 poll triggers; Reorder Calculation Agent calculates quantity using live Google Sheets data; PO created in live Cin7; PO emailed to internal test address via live Gmail; draft bill created in live Xero; row appended to live tracking sheet
Each step confirmed via live system UI: Cin7 PO in Sent status; Gmail sent items shows PO email to internal address; Xero contains draft bill with correct value and supplier; Google Sheets row present with all fields populated; total elapsed time under 3 minutes
T24
Full production reorder cycle: above-threshold SKU with Slack approval
Designated test SKU with order value configured above approval threshold; Slack connected to live operations workspace; operations manager available to action approval
Slack approval message delivered to live operations channel; operations manager approves; PO emailed to internal test address; Xero bill created; Google Sheets row appended
Slack message received in live channel within 60 seconds; approval action triggers full dispatch chain; all downstream confirmations match T23 criteria; approval timestamp recorded in log
T25
Slack rejection flow in production
Same above-threshold test SKU; operations manager clicks reject in live Slack workspace
No supplier email sent; no Xero bill created; Cin7 PO remains as Draft; rejection event logged; internal operations channel receives rejection notification
Live Gmail sent items contains no supplier email; live Xero shows no new bill for test SKU; Cin7 PO status is Draft; rejection log entry present with manager identity and timestamp
T26
Error log and audit trail verification
Review platform execution logs for T23 and T24 runs
Each step in the workflow has a timestamped log entry showing input payload, output payload, HTTP status code for each API call, and any retry events
Log entries present for all steps: Cin7 poll, Reorder Calculation Agent calculation, Cin7 PO creation, Gmail send, Xero bill creation, Google Sheets append, and (for T24) Slack approval event; no gaps in the audit trail; all HTTP responses show 2xx status codes
T27
Process owner review and approval — final Phase 3 sign-off
Operations manager reviews live outputs from T23 and T24: Cin7 PO record, Gmail sent email, Xero draft bill, Google Sheets tracking row, Slack message history, and platform execution logs presented by the FullSpec team
Operations manager confirms all outputs match expected behaviour, values are accurate, and the flow is ready for go-live. Approval is recorded in the FullSpec project confirmation log. Test PO, Xero bill, and Sheets row are voided immediately after sign-off.
FullSpec project log contains a timestamped confirmation entry referencing T27 and the approving manager's name. No separate signature block is required. Post-approval cleanup: Cin7 test PO voided, Xero bill deleted, Google Sheets test row removed.
After T27 is confirmed, the FullSpec team will archive the full test log (T01 to T27 and E01 to E07) and share a copy with your operations manager via the project workspace. The automation is cleared for go-live scheduling once this archive is delivered. Contact support@gofullspec.com with any questions before or after the Phase 3 run.
Test and QA PlanPage 4 of 4

More documents for this process

Every document generated for Inventory Reorder 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