Back to Standard Operating Procedure 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

Standard Operating Procedure Management

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

This document defines all test cases and quality-assurance criteria for the SOP Management automation covering the SOP Version and Register Agent and the Distribution and Acknowledgement Agent. Testing is structured across three sequential phases: Unit, Integration, and End-to-End. The FullSpec team runs Phases 1 and 2 entirely in sandbox environments; the process owner joins Phase 3 for the final production verification. No phase begins until every test case in the preceding phase reaches a passing state.

01Testing approach

All testing follows three phases in strict sequence. No phase begins until the previous phase fully passes. Each phase targets a different layer of the system: isolated agent logic, cross-agent handoffs and edge conditions, and finally a traced end-to-end run against the live production environment. The table below maps each phase to its scope, environment, credential rules, pass condition, and responsible parties.

1
Phase 1: Unit Testing
Isolated agent logic, sandbox environment only
Scope
Each agent tested in isolation: trigger detection, version increment logic, register writes, role-lookup queries, Slack message construction, DocuSign envelope dispatch, reminder scheduling, and completion summary posting.
Environment
Sandbox only. Google Drive test folder, Google Sheets staging workbook, Slack test workspace, DocuSign sandbox account.
Credential rule
No production credentials permitted. All service accounts, OAuth tokens, and API keys must be sandbox-scoped. Verify before any test run begins.
Pass condition
All cases T01 through T14 return expected outputs with zero 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 exception paths, sandbox environment
Scope
Cross-agent data handoffs, decision branching (compliance-critical vs standard path), Slack interactive component callbacks, DocuSign webhook receipts, reminder and escalation scheduling logic, and all defined edge cases.
Environment
Sandbox only. Same staging credentials as Phase 1. No production data ingested.
Credential rule
Sandbox credentials only. OAuth refresh tokens must be validated at the start of each integration test run to avoid mid-session expiry failures.
Pass condition
All cases T15 through T22 pass and all edge cases E01 through E06 are verified. Any failure blocks progression to Phase 3.
Who runs it
FullSpec team only.
3
Phase 3: End-to-End Production Test
Full live run with process owner sign-off
Scope
Complete production run: Drive trigger to version increment, register write, role lookup, Slack notification, DocuSign routing, acknowledgement capture, reminder cycle, escalation, and completion summary. Error log audit included.
Environment
Production. Live Google Drive approved-SOPs folder, live Google Sheets SOP register, live Slack workspace, live DocuSign account.
Credential rule
Production credentials active. Test records must use a designated internal test address and must be voided or deleted from the register immediately after each run.
Pass condition
All cases T23 through T27 pass, including process owner review and approval recorded in the FullSpec confirmation log.
Who runs it
FullSpec team executes; process owner participates in T27 for final sign-off review.
Test and QA PlanPage 1 of 4
FS-DOC-06Quality

02Phase 1 — unit test cases

Sandbox credentials only for all Phase 1 tests. Do not connect any production Google Drive folder, production Google Sheets workbook, live Slack workspace, or live DocuSign account during this phase. If a credential scope error is detected mid-run, halt immediately, rotate sandbox tokens, and restart from T01.

Agent 1: SOP Version and Register Agent

ID
Scenario
Input
Expected Output
Pass Criteria
T01
Happy path: new SOP file created in watched folder
New .docx file dropped into /Approved-SOPs sandbox folder; existing register has no matching row.
Version tagged v1.0; new register row written with file name, date, editor, and change summary field populated.
Register row present within 30 seconds of file creation; version string in document metadata reads v1.0; no duplicate rows.
T02
Happy path: existing SOP modified and re-saved
Existing SOP (currently v2.1) saved with minor edit in sandbox folder.
Version incremented to v2.2; register row updated with new revision date and editor; previous row retained as history.
Version string reads v2.2; register timestamp within 60 seconds of save event; prior row unchanged.
T03
Version increment from a major version boundary (v1.9 to v2.0)
SOP at v1.9 modified in sandbox.
Version incremented to v1.10 (minor increment only; major version change is a manual operation per SOP runbook).
Version reads v1.10, not v2.0. Confirms increment logic does not auto-promote major version.
T04
Failure: file modified outside watched folder
SOP file edited in an adjacent Drive folder not under the trigger watch path.
No trigger fires; no register update occurs; no Slack notification sent.
Zero rows added to register; zero Slack events; trigger log shows no event for that file path.
T05
Failure: Google Sheets register temporarily unavailable
Drive change event fires normally; Sheets API returns a 503 error on the register write attempt.
Agent retries up to three times with exponential backoff; on third failure, error logged and FullSpec alert channel notified.
Retry attempts visible in execution log; error entry written to error log sheet; no silent failure.
T06
Failure: document metadata missing editor field
Drive change event fires for a file where the lastModifyingUser field is null.
Agent substitutes 'Unknown editor' string in register row and continues processing; does not abort.
Register row written with 'Unknown editor'; processing continues to role-lookup step; no exception thrown.

Agent 2: Distribution and Acknowledgement Agent

ID
Scenario
Input
Expected Output
Pass Criteria
T07
Happy path: role lookup returns a matched staff list
Register row confirmed; SOP scope field matches three roles in the mapping table.
Agent returns an array of three staff member records with name, Slack user ID, and email.
Returned array length equals 3; each record contains all three fields; no null values.
T08
Happy path: Slack acknowledgement message sent and button rendered
Staff list of three members; SOP is not compliance-critical.
Three individual Slack DMs sent; each contains document link, change summary, and a rendered 'I have read this' button.
Three message delivery confirmations from Slack API; interactive button payload verified via Slack app activity log.
T09
Happy path: compliance-critical SOP triggers DocuSign envelope
SOP flagged as compliance-critical in register; two signatories identified.
DocuSign envelope created and sent to both signatories; Slack notification also sent in parallel.
DocuSign envelope status reads 'sent'; both signatories listed as recipients; Slack messages confirm delivery.
T10
Happy path: Slack button click updates acknowledgement tracker
User clicks acknowledgement button in Slack DM.
Tracker row for that user updated with timestamp, 'Acknowledged' status, and method 'Slack'.
Sheets row updated within 10 seconds of button click; status and timestamp fields populated correctly.
T11
Happy path: DocuSign completion updates acknowledgement tracker
Signatory completes DocuSign envelope.
Tracker row for that signatory updated with timestamp, 'Acknowledged' status, and method 'DocuSign'.
Sheets row updated within 60 seconds of envelope completion webhook; method field reads 'DocuSign'.
T12
Happy path: 48-hour reminder sent to pending user
One of three users has not acknowledged after 48 hours.
Personalised Slack reminder sent to that user only; other two acknowledged users receive no message.
One Slack DM sent; message content references the correct SOP name and version; acknowledged users unaffected.
T13
Happy path: escalation message after two reminders
User still pending after two 48-hour reminder cycles (96 hours total).
Escalation Slack message sent to user's line manager as identified in the role mapping table; event logged.
Line manager receives message; escalation timestamp written to tracker; user's row status updated to 'Escalated'.
T14
Happy path: completion summary posted to operations channel
All required staff have acknowledged; tracker shows 100% completion.
Slack message posted to designated operations channel confirming SOP name, version number, and full compliance.
Message appears in operations channel; SOP name and version match the register row; no duplicate posts.
Test and QA PlanPage 2 of 4
FS-DOC-06Quality

03Phase 2 — integration and edge case tests

Integration tests verify that data passes correctly between agents and across tool boundaries. All tests remain in the sandbox environment. Credentials must be refreshed before this phase begins to prevent OAuth expiry mid-run.

ID
Scenario
Input
Expected Output
Pass Criteria
T15
Agent 1 to Agent 2 handoff: register write triggers Distribution Agent
SOP Version and Register Agent successfully writes the register row for a non-compliance-critical SOP.
Distribution and Acknowledgement Agent receives the trigger payload containing SOP ID, version, and affected-roles field.
Distribution Agent execution log shows trigger received within 15 seconds of register write; affected-roles array populated.
T16
Agent 1 to Agent 2 handoff: compliance-critical flag passes correctly
Register row written with compliance_critical field set to TRUE.
Distribution Agent reads flag, sets routing mode to DocuSign, and initiates envelope in parallel with Slack notification.
DocuSign envelope created; Slack message sent; both events logged; compliance flag visible in Distribution Agent execution record.
T17
Slack interactive callback received and routed to Sheets update
User clicks acknowledgement button; Slack sends interactive component callback to the automation platform webhook.
Automation platform parses payload, extracts user ID and SOP reference, and writes acknowledgement to tracker.
Sheets row updated correctly; response time from button click to row write is under 15 seconds; no duplicates.
T18
DocuSign envelope completion webhook received and processed
DocuSign sends envelope-completed event to automation platform webhook endpoint.
Agent reads envelope metadata, matches signatory to tracker row, and updates status to 'Acknowledged' with DocuSign method.
Correct row updated; method field reads 'DocuSign'; completion timestamp within 60 seconds of DocuSign event.
T19
Multiple simultaneous SOP changes: two files modified within 60 seconds
Two separate SOP files modified in the watched folder within a 60-second window.
Two independent workflow runs created; each processes its own register row, role list, and notification cycle without cross-contamination.
Two distinct execution runs visible in platform log; each run references only its own SOP; no field values bleed between runs.
T20
Reminder scheduler: 48-hour check does not re-send to already-acknowledged users
Tracker shows one user acknowledged, one still pending; 48-hour scheduled check fires.
Reminder sent only to pending user; acknowledged user receives no message.
One Slack DM sent; acknowledged user's Slack DM inbox shows no new message from the automation in this cycle.
T21
Completion detection: all users acknowledge before first reminder fires
All three users click acknowledgement within two hours of initial notification.
Reminder scheduler detects 100% completion on its first check; no reminders sent; completion summary posted to operations channel.
No reminder DMs sent; completion summary posted; scheduler log confirms early-exit path taken.
T22
End-to-end audit log integrity: all events for one SOP cycle written to Sheets
Complete sandbox cycle run from Drive trigger to completion summary.
Audit log sheet contains one row per event: trigger, version write, role lookup, each notification, each acknowledgement, each reminder, escalation if applicable, and completion.
Row count matches expected event sequence; all timestamps sequential; no gaps or out-of-order entries.

Edge Case Tests

ID
Scenario
Input
Expected Output
Pass Criteria
E01
Duplicate trigger: same file saved twice within 10 seconds
Drive file-change event fires twice for the same file within a 10-second window (e.g. autosave plus manual save).
Deduplication logic suppresses the second trigger; only one register row written; one notification cycle initiated.
Register contains exactly one new row for the file; execution log shows second trigger detected and discarded.
E02
Missing data: SOP file has no scope or department metadata
SOP modified; custom properties for scope and department are empty.
Agent flags the row in the register with a 'Metadata incomplete' status; sends an alert to the operations Slack channel; halts distribution until metadata is supplied.
No Slack notifications sent to staff; register row shows 'Metadata incomplete'; operations channel alert received.
E03
Unavailable tool: Slack API returns 429 rate-limit error during notification dispatch
Slack API returns HTTP 429 while agent attempts to send notifications to a five-person list.
Agent pauses, respects the retry-after header, and retries each message in sequence; all five messages eventually delivered.
All five Slack DMs delivered; execution log shows retry events; no messages permanently dropped.
E04
Unavailable tool: DocuSign API unavailable at envelope creation time
Compliance-critical SOP processed; DocuSign API returns 503 at envelope creation.
Agent retries three times with backoff; on third failure, alert posted to operations Slack channel with SOP name and instruction to send envelope manually.
Operations channel receives alert with correct SOP reference; DocuSign retry log shows three attempts; no silent failure.
E05
Human timeout: user does not respond after two reminders and escalation is sent
User receives initial notification and two 48-hour reminders; no acknowledgement recorded.
Escalation message sent to line manager; user's tracker row status set to 'Escalated'; completion summary is withheld until escalation is resolved.
Line manager Slack DM received; row status reads 'Escalated'; completion summary not posted; audit log records all three notification and two reminder events.
E06
Role mapping table returns zero matched roles for an SOP
SOP modified; role-to-SOP mapping table has no entries for the SOP's scope value.
Agent logs a warning in the audit sheet, posts an alert to the operations Slack channel identifying the unmapped SOP, and halts distribution.
No staff notifications sent; operations channel alert received with SOP name; audit log entry shows 'No roles matched' warning.
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 address for all Slack and DocuSign recipients during production test runs. Do not send live notifications to real staff members. After each test case, void the DocuSign test envelope, delete the test acknowledgement rows from the live tracker, and remove the test register row from the master SOP register. Failure to clean up test records will corrupt the live audit trail and acknowledgement history. Confirm cleanup is complete before executing the next test case.

Phase 3 runs against the live production environment with real credentials, the live SOP register, and the live Slack workspace. The FullSpec team executes each case; the process owner participates directly in T27 to review outputs and confirm the automation is operating to specification. The process owner's approval in T27 constitutes formal acceptance and is recorded in the FullSpec confirmation log. No separate sign-off document is required.

ID
Scenario
Steps Traced
Expected Output
Pass Criteria
T23
Full production run: standard SOP, non-compliance-critical path
1. Test SOP file saved in live /Approved-SOPs Drive folder. 2. Trigger fires. 3. Version incremented and register row written. 4. Role lookup runs against live mapping table. 5. Slack DMs sent to internal test addresses. 6. Test address clicks acknowledgement button. 7. Tracker updated. 8. Completion summary posted to live operations channel.
Register row correct; Slack messages received at test addresses; tracker updated on button click; completion summary in live channel.
All eight steps execute in sequence with no manual intervention; total elapsed time from Drive save to completion summary under 5 minutes; all data fields accurate.
T24
Full production run: compliance-critical SOP path
1. Test SOP with compliance-critical flag saved in Drive. 2. Trigger fires. 3. Version and register written. 4. DocuSign envelope sent to test address. 5. Slack notification sent in parallel. 6. Test address completes DocuSign envelope. 7. Tracker updated with DocuSign method. 8. Completion summary posted.
DocuSign envelope received and completable at test address; Slack notification also received; tracker updated on envelope completion; completion summary posted.
DocuSign envelope status moves to 'Completed'; tracker row shows method 'DocuSign'; completion summary correct; no path crossover with standard Slack-only flow.
T25
Production reminder cycle: 48-hour reminder reaches pending test address
1. Standard SOP notification sent to two test addresses. 2. One test address acknowledges; one does not. 3. 48-hour scheduler runs (accelerated in test via scheduler override). 4. Reminder sent to non-responding test address only.
Single reminder DM delivered to non-responding test address; acknowledged address receives nothing; tracker shows 'Reminder 1 sent' for pending user.
Exactly one reminder DM sent; acknowledged user unaffected; tracker status updated to reflect first reminder; scheduler log confirms correct execution.
T26
Error log verification: forced API error confirms logging behaviour
1. Temporarily revoke Sheets write permission for test run. 2. Trigger a Drive change event. 3. Agent attempts register write; receives permission-denied error. 4. Restore permission.
Error entry written to the designated error log tab; operations Slack channel receives alert referencing the failed SOP file; no silent failure.
Error log tab contains an entry with timestamp, SOP file name, error type 'Permission denied', and retry count; Slack alert received in operations channel.
T27
Process owner review and approval: full cycle review with operations manager
1. FullSpec presents outputs from T23 through T26 to the process owner. 2. Process owner reviews the live SOP register, acknowledgement tracker, audit log, and Slack channel for accuracy and completeness. 3. Process owner confirms the automation is operating correctly and approves go-live.
Process owner confirms all outputs match the agreed specification: correct versioning, accurate role targeting, complete acknowledgement trail, correct escalation behaviour, and clean error logging.
Process owner formally approves. Approval recorded in the FullSpec confirmation log with date and process owner name. This constitutes Phase 3 pass and clears the automation for go-live.
After T27 is confirmed, the FullSpec team cleans all test records from the live environment, activates the automation across the full approved-SOPs folder, and notifies the process owner that the system is live. Any issues after go-live should be reported to support@gofullspec.com.
Test and QA PlanPage 4 of 4

More documents for this process

Every document generated for Standard Operating Procedure 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