Back to Org Chart & Headcount 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

Org Chart & Headcount Management

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

This document defines the structured quality assurance programme for the Org Chart and Headcount Management automation. It is written for the FullSpec engineering team and covers every test case required before the system goes live. Testing is organised into three sequential phases: Phase 1 unit tests individual agents in isolation, Phase 2 verifies agent handoffs and edge cases, and Phase 3 confirms correct end-to-end behaviour in the production environment. No phase begins until the previous phase fully passes. Your process owner, Rachel Kim, joins the FullSpec team for Phase 3 sign-off only.

01Testing approach

All testing runs in three phases in sequence. No phase begins until every test case in the preceding phase has achieved a passing result and that outcome has been recorded in the FullSpec test log. Phase 1 and Phase 2 run entirely in sandbox environments using non-production credentials. Phase 3 is the only phase that touches live production systems, and it requires explicit sign-off from the process owner before it commences.

1
Phase 1: Unit Testing
Each agent tested individually in sandbox
Scope
Each agent is tested independently: Headcount Sync Agent, Org Chart Update Agent, and Notification and Reporting Agent. No inter-agent calls are exercised in this phase.
Environment
Sandbox only. BambooHR sandbox account, Gusto test environment, a dedicated QA Google Sheet, Lucidchart test diagram, and Slack QA workspace.
Credential rule
All credentials must be sandbox or test-tier tokens. No production API keys are permitted in Phase 1. Credentials are stored in the automation platform's test credential vault only.
Pass condition
All test cases T01 through T14 return the expected output with no unhandled errors. All failure-mode cases confirm correct error handling and retry behaviour.
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 exception scenarios in sandbox
Scope
Agent-to-agent handoffs across the full automated flow, plus edge cases covering duplicate events, missing BambooHR fields, unavailable downstream tools, and human-approval timeout scenarios.
Environment
Sandbox only. Same sandbox credentials as Phase 1. Downstream tool unavailability is simulated by temporarily revoking the sandbox token for the target system.
Credential rule
Sandbox credentials only. Integration tokens must reference the QA credential vault, not the production vault. Any new integration added during Phase 2 must have a sandbox token provisioned before testing begins.
Pass condition
All integration test cases T15 through T21 pass. All edge case tests E01 through E06 confirm correct fallback, retry, or escalation behaviour with no silent failure.
Who runs it
FullSpec team only. Process owner is not required for Phase 2.
3
Phase 3: End-to-End Production Testing
Full production run with process owner review
Scope
Full end-to-end run on live production systems using a designated test employee record. Covers a new hire event, a role change event, and a termination event, each traced through all three agents to final output.
Environment
Production. Live BambooHR, Gusto, Google Sheets, Lucidchart, Slack, and Gmail. A dedicated internal test address is used for all email outputs. Test records are voided or deleted immediately after each run.
Credential rule
Production credentials used for the first time in this phase. Each credential must be confirmed active and scoped correctly before Phase 3 begins. The FullSpec team verifies all OAuth tokens and webhook signatures before the first test fires.
Pass condition
All production test cases T22 through T26 pass, including error-log verification and the process owner review case. Rachel Kim confirms correct output and records approval in the FullSpec confirmation log.
Who runs it
FullSpec team executes all cases. Rachel Kim (HR Manager, process owner) reviews outputs and provides sign-off for case T26.
Test and QA PlanPage 1 of 4
FS-DOC-06Quality

02Phase 1 — unit test cases

Sandbox credentials only. No production tokens, API keys, or live employee records may be used in Phase 1. All BambooHR events must fire against the sandbox account. All Gusto writes must target the Gusto test environment. The QA Google Sheet and Lucidchart test diagram must be separate from any live company document. Confirm sandbox credential configuration before executing the first test case.

Headcount Sync Agent — unit tests (T01 to T06)

ID
Scenario
Input
Expected Output
Pass Criteria
T01
New hire event: happy path
BambooHR sandbox webhook payload: event_type=new_hire, employee_id=EMP-QA-001, department=Engineering, manager_id=MGR-001, start_date=2025-05-05, salary=75000
Gusto test env record created for EMP-QA-001 with matching department and salary. Google Sheet QA tab: new row inserted with correct department, FTE=1, effective_date=2025-05-05.
Both writes confirmed within 120 seconds. No error logged. Row ID in Sheet matches BambooHR employee_id.
T02
Role change event: happy path
BambooHR sandbox webhook payload: event_type=role_change, employee_id=EMP-QA-001, new_title=Senior Engineer, new_department=Platform, new_manager_id=MGR-002
Gusto test env record updated: department=Platform, job_title=Senior Engineer. Google Sheet QA tab: existing row updated with new department and title. Previous values overwritten.
Update confirmed within 120 seconds. Sheet row shows correct new values. Gusto record reflects updated department and title.
T03
Termination event: happy path
BambooHR sandbox webhook payload: event_type=termination, employee_id=EMP-QA-001, termination_date=2025-05-05, reason=voluntary
Gusto test env record: employment_status set to terminated, effective 2025-05-05. Google Sheet QA tab: FTE column set to 0, status column set to Terminated, effective_date updated.
Both writes confirmed within 120 seconds. No salary or personal data altered beyond status and effective date.
T04
Salary above threshold: approval gate fires
BambooHR sandbox webhook payload: event_type=role_change, employee_id=EMP-QA-002, salary_change=true, new_salary=120000, threshold=100000
Agent halts downstream Gusto write. Approval request logged to the automation platform's approval queue. No Gusto record change. Google Sheet row flagged as 'Pending Approval'.
Gusto record unchanged. Approval queue entry present with correct employee_id, new_salary, and timestamp. Sheet status = Pending Approval.
T05
BambooHR webhook delivery failure: retry behaviour
Simulate BambooHR sandbox webhook firing but automation platform endpoint returning HTTP 500 on first attempt.
Automation platform retries delivery with exponential backoff: retry at 30 s, 2 min, 10 min. On third retry success, agent processes event normally as per T01.
Event processed successfully on retry. No duplicate records created in Gusto or Google Sheet. Error logged for the failed attempt with timestamp and HTTP status.
T06
Missing required field: employee_id absent
BambooHR sandbox webhook payload: event_type=new_hire, employee_id=null, department=Marketing
Agent rejects the event without writing to Gusto or Google Sheet. Error record written to the automation platform error log: field_missing=employee_id, event_type=new_hire, timestamp.
No Gusto record created. No Sheet row inserted. Error log entry present with correct field_missing annotation.

Org Chart Update Agent — unit tests (T07 to T10)

ID
Scenario
Input
Expected Output
Pass Criteria
T07
New hire: org chart node created
Internal trigger from Headcount Sync Agent confirming EMP-QA-001 synced. BambooHR data: name=Alex Test, title=Engineer, department=Engineering, manager_id=MGR-001.
Lucidchart test diagram: new shape added for Alex Test under MGR-001 node. Shape label shows correct name, title, and department. Connector drawn to manager node.
Node present in Lucidchart test diagram within 60 seconds of trigger. Connector links to correct manager node. No orphaned shapes.
T08
Role change: node repositioned and relabelled
Internal trigger: EMP-QA-001 role_change confirmed. New department=Platform, new_manager_id=MGR-002, new_title=Senior Engineer.
Lucidchart test diagram: existing node for EMP-QA-001 relabelled to Senior Engineer, moved to Platform department group, connector redrawn to MGR-002 node.
Node label updated. Connector points to MGR-002. Previous connector to MGR-001 removed. No duplicate nodes.
T09
Termination: node removed from diagram
Internal trigger: EMP-QA-001 termination confirmed. employee_id=EMP-QA-001.
Lucidchart test diagram: node for EMP-QA-001 deleted. Any connector from this node to a manager or direct report is removed. Direct reports (if any) are flagged as orphaned for manual review.
Node absent from diagram after update. No dangling connectors. If direct reports exist, orphan-flag event logged in automation platform.
T10
Lucidchart API unavailable: graceful failure
Internal trigger fires but Lucidchart sandbox API returns HTTP 503.
Agent logs the error with employee_id, event_type, and timestamp. Retry queued for 5 minutes. Slack QA channel receives a system alert: Lucidchart update pending, retry queued.
No unhandled exception. Error log entry present. Slack alert delivered. On retry success, diagram update completes as per T07.

Notification and Reporting Agent — unit tests (T11 to T14)

ID
Scenario
Input
Expected Output
Pass Criteria
T11
Change confirmed: Slack notification fires
Internal trigger: change event confirmed synced. event_type=new_hire, employee=Alex Test, department=Engineering, effective_date=2025-05-05.
Slack QA workspace: formatted message posted to #hr-changes channel. Message includes employee name, change type, department, effective date, and confirming agent name.
Slack message delivered within 30 seconds. All required fields present. No raw JSON exposed in message body.
T12
Weekly report schedule: Monday 08:00 trigger
Scheduled trigger fires: day=Monday, time=08:00 local. Google Sheet QA tab has 5 employee rows with populated department and FTE data.
Gmail QA account: email sent to leadership test distribution list. Subject: Weekly Headcount Report [date]. Body contains headcount totals by department pulled live from QA Sheet. Attachment: CSV export.
Email delivered by 08:05. Totals match QA Sheet row counts. CSV attachment opens correctly with correct headers.
T13
Slack workspace unavailable: alert queued
Change confirmed trigger fires. Slack sandbox API returns HTTP 429 rate limit error.
Agent retries after 60 seconds. On retry success, Slack message delivered. Error logged with retry_count and final_delivery_timestamp.
Message eventually delivered. No duplicate messages. Error log shows retry sequence.
T14
Weekly report: Google Sheet empty or unreadable
Scheduled trigger fires. Google Sheet QA tab returns empty range or read permission error.
No email sent. Error logged: report_generation_failed, reason=sheet_read_error, timestamp. Slack QA channel alert: Weekly report could not be generated, manual review required.
No email sent to distribution list. Error log entry present. Slack alert delivered to QA channel.
Test and QA PlanPage 2 of 4
FS-DOC-06Quality

03Phase 2 — integration and edge case tests

Phase 2 tests the handoffs between agents and verifies that data flows correctly from trigger to final output across the full automated chain. All tests remain in the sandbox environment. IDs continue from T15.

ID
Scenario
Input
Expected Output
Pass Criteria
T15
Full chain: new hire from BambooHR to Slack notification
BambooHR sandbox webhook: event_type=new_hire, employee_id=EMP-QA-003, department=Sales, manager_id=MGR-003, salary=65000.
Headcount Sync Agent writes to Gusto and Google Sheet. Org Chart Update Agent adds node in Lucidchart. Notification and Reporting Agent posts Slack message. All three complete within 3 minutes.
All three agent outputs confirmed. Timestamps in error log show sequential completion. No step skipped. Total wall-clock time under 3 minutes.
T16
Full chain: role change propagates correctly to all systems
BambooHR sandbox webhook: event_type=role_change, employee_id=EMP-QA-003, new_department=Revenue, new_title=Account Executive, new_manager_id=MGR-004.
Gusto test env record updated. Google Sheet row updated. Lucidchart node relabelled and repositioned. Slack message posted with change summary.
All four outputs confirmed. No stale data in any system. Lucidchart node references new manager. Slack message reflects new title and department.
T17
Full chain: termination removes data and notifies
BambooHR sandbox webhook: event_type=termination, employee_id=EMP-QA-003, termination_date=2025-05-06.
Gusto status=terminated. Google Sheet FTE=0, status=Terminated. Lucidchart node removed. Slack message confirms termination to #hr-changes and #it-access channels.
All four outputs confirmed. No orphaned Lucidchart nodes. Both Slack channels receive message.
T18
Headcount Sync Agent failure: downstream agents do not fire
BambooHR sandbox webhook fires correctly. Gusto sandbox returns HTTP 500, blocking the Headcount Sync Agent from completing.
Org Chart Update Agent does not trigger. Notification and Reporting Agent does not fire a change notification. Error logged. Retry queued for Gusto write.
No downstream agent output recorded. Error log shows gusto_write_failed. Retry queued. Once Gusto write succeeds on retry, downstream agents complete in sequence.
T19
Org Chart Update Agent failure: Notification Agent still fires with caveat
Headcount Sync Agent completes successfully. Lucidchart sandbox API returns HTTP 503, blocking Org Chart Update Agent.
Notification and Reporting Agent fires Slack notification but message body includes a caveat: Org chart update pending, Lucidchart temporarily unavailable. Retry queued for Lucidchart.
Slack message delivered with caveat text. Lucidchart retry queued. On retry success, Lucidchart update completes and a follow-up Slack message confirms the diagram is updated.
T20
Approval gate: downstream resumes after approval granted
Salary-above-threshold event for EMP-QA-004. Agent pauses at approval gate. HR Manager approves via the automation platform approval interface within 10 minutes.
On approval: Gusto write executes with approved salary. Google Sheet row updated. Org Chart Update Agent fires. Slack notification sent. Full chain completes.
No Gusto write before approval. Chain resumes within 30 seconds of approval action. All downstream outputs confirmed.
T21
Weekly report: correct totals after multiple changes in same week
Three new hire events and one termination processed during the test week. QA Google Sheet reflects net +2 headcount.
Monday 08:00 scheduled trigger fires. Email report shows correct totals by department. Net headcount matches QA Sheet. CSV attachment matches email body totals.
Totals in email body and CSV both show net +2 headcount. No double-counting. Correct departmental breakdown.

Edge case tests — IDs E01 to E06

ID
Scenario
Input
Expected Output
Pass Criteria
E01
Duplicate BambooHR webhook: same event fires twice within 60 seconds
Two identical webhook payloads for employee_id=EMP-QA-005, event_type=new_hire, fired 15 seconds apart.
Automation platform deduplicates using event_id. Only one Gusto record created. Only one Google Sheet row inserted. One Slack notification sent.
No duplicate records in any system. Deduplication log entry present. Second webhook confirmed as suppressed.
E02
Missing department field in BambooHR payload
BambooHR sandbox webhook: event_type=new_hire, employee_id=EMP-QA-006, department=null, manager_id=MGR-005.
Agent writes partial record to Google Sheet with department=UNKNOWN. Gusto record created with no department value. Error logged: field_null=department. Slack QA alert: incomplete change event, manual review required.
No record silently dropped. UNKNOWN value visible in Sheet. Error log entry present. Slack alert delivered.
E03
BambooHR payload references a manager_id not present in Lucidchart diagram
role_change event: employee_id=EMP-QA-007, new_manager_id=MGR-999 (not in Lucidchart test diagram).
Org Chart Update Agent logs error: manager_node_not_found=MGR-999. Node for EMP-QA-007 created but left unattached. Slack QA alert: org chart node created without manager link, manual placement required.
No unhandled exception. Orphan node present in Lucidchart test diagram. Error log and Slack alert both reference MGR-999.
E04
Google Sheets API unavailable during headcount write
Headcount Sync Agent fires. Google Sheets sandbox API returns HTTP 503.
Gusto write completes successfully. Google Sheet write queued for retry at 5-minute intervals, up to 3 attempts. Error logged. Slack QA alert: headcount sheet update delayed.
Gusto record correct. Sheet updated on retry. No data loss. Retry count and final success timestamp in error log.
E05
Human approval timeout: no response within 24 hours
Salary-above-threshold event for EMP-QA-008. Approval request raised. No approval action taken for 24 hours.
Automation platform escalation fires at 24-hour mark: Slack message to HR Manager and Operations Lead (Tom Ashby) flagging pending approval. Event remains paused. No Gusto write.
Slack escalation message delivered to both recipients at the 24-hour mark. Gusto record unchanged. Event remains in pending state until approved or rejected.
E06
Gmail SMTP failure: weekly report not delivered
Monday 08:00 trigger fires. Gmail API returns authentication error (token expired).
No email sent. Error logged: gmail_auth_failure, timestamp. Slack QA alert: weekly report not sent, Gmail authentication error. FullSpec team notified to refresh OAuth token.
No email delivered. Error log entry present. Slack alert sent. No silent failure. Report generation data preserved for re-send once token is refreshed.
Test and QA PlanPage 3 of 4
FS-DOC-06Quality

04Phase 3 — end-to-end production test

Important before running Phase 3: all email outputs must be directed to an internal FullSpec test address and a designated [YourCompany.com] HR test inbox. Do not use a real employee name or any real personal data in the test records. Any test employee record created in BambooHR, Gusto, or Google Sheets during Phase 3 must be voided, deleted, or clearly marked as TEST DATA immediately after each run is confirmed. The Lucidchart test node must be removed from the live org chart diagram before the end of the Phase 3 session. Confirm all cleanup steps are completed before notifying Rachel Kim that Phase 3 is ready for review.

Phase 3 uses live production credentials and systems. The FullSpec team executes each case and records the outcome in the FullSpec test log. Rachel Kim reviews the outputs for T25 and T26 and records her approval in the FullSpec confirmation. IDs continue from T22.

ID
Scenario
Production System Touched
Expected Output
Pass Criteria
T22
Production new hire: full chain traced end to end
BambooHR (live), Gusto (live), Google Sheets (live), Lucidchart (live), Slack (live)
BambooHR webhook fires on test employee record creation. Gusto record created. Headcount Google Sheet row inserted. Lucidchart live org chart node added under correct manager. Slack #hr-changes channel receives formatted notification. All steps complete within 3 minutes.
All five system outputs confirmed and timestamped in FullSpec test log. Total elapsed time under 3 minutes. No production data altered beyond the designated test record.
T23
Production role change: all three agents respond correctly
BambooHR (live), Gusto (live), Google Sheets (live), Lucidchart (live), Slack (live)
Role change event on test record. Gusto record updated with new title and department. Google Sheet row updated. Lucidchart node repositioned and relabelled. Slack notification sent with change summary.
All four downstream outputs confirmed. Lucidchart node reflects new manager. Slack message contains correct name, new title, and effective date.
T24
Error log verification: confirm logging on simulated partial failure
Automation platform error log (live), Slack (live)
FullSpec team temporarily revokes Google Sheets OAuth token mid-run. Sheet write fails. Error log entry created with event_id, field_failed=sheets_write, retry_count, timestamp. Slack alert fires to #hr-ops channel. Token restored, retry succeeds.
Error log entry present with all required fields. Slack alert delivered. Retry succeeds within 5 minutes. No data loss. Log retained for audit.
T25
Weekly headcount report: production Gmail delivery to test inbox
Google Sheets (live), Gmail (live)
Monday 08:00 scheduled trigger fires (or manually triggered by FullSpec for testing). Report generated from live Google Sheet. Email delivered to leadership test distribution list and FullSpec test inbox. Subject: Weekly Headcount Report [date]. Body contains correct department totals. CSV attached.
Email received in test inbox. Totals match live Sheet at time of report generation. CSV headers correct. No real leadership inbox receives the test email.
T26
Process owner review and approval: Rachel Kim confirms correct end-to-end output
All production systems (review only, no further writes)
Rachel Kim reviews the outputs of T22 through T25 in the FullSpec test log and in each live system. She confirms: Gusto record correct, Google Sheet row correct, Lucidchart diagram correct, Slack notification correct, weekly report correct. Approval recorded in the FullSpec confirmation log with Rachel Kim's name, role, and timestamp. Test records are voided immediately after confirmation.
Rachel Kim's approval recorded in FullSpec confirmation log. All test records confirmed as voided or deleted from BambooHR, Gusto, Google Sheets, and Lucidchart. Phase 3 marked as fully passed in the FullSpec project dashboard. No separate signoff block required.
Once T26 is confirmed and recorded, the FullSpec team marks the QA programme as complete and schedules the production go-live for the agreed date. Any outstanding observations raised during Phase 3 that do not constitute a blocking failure are logged as post-launch monitoring items and tracked via support@gofullspec.com.
Test and QA PlanPage 4 of 4

More documents for this process

Every document generated for Org Chart & Headcount 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