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.
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.
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.