Integration tests verify that agents hand off correctly in sequence and that the full workflow executes without state loss between steps. All tests remain in the sandbox environment. Test IDs continue from the Phase 1 sequence.
ID
Scenario
Input
Expected Output
Pass Criteria
T15
Agent handoff: Access Revocation Agent triggers Task and Notification Agent
Access Revocation Agent completes T01 to T04 in sequence; confirmation log entry written
Task and Notification Agent initialises automatically; reads employee_id and departure_date from confirmation log without manual intervention
Task and Notification Agent run appears in execution log within 10 seconds of confirmation log write; correct employee_id passed; no duplicate trigger fires
T16
Full sequential execution: BambooHR trigger through to Slack summary
BambooHR sandbox webhook fired; employee has valid Okta user, Google Workspace account, manager email, and personal email
All six automated steps execute in order: Okta suspension, Google Workspace disable, Jira board, Xero notification, exit survey, Slack summary
Execution log shows all six steps in correct order with no skipped steps; total elapsed time under 90 seconds; all sandbox outputs present
T17
BambooHR record closure after Jira equipment task marked Done
Manager marks Jira equipment return subtask as Done in sandbox Jira project
BambooHR record updated to 'offboarded' with closure timestamp; Slack HR channel receives final confirmation message
BambooHR status field updated within 30 seconds of Jira task Done event; Slack message references employee name and closure timestamp
T18
Parallel Xero and Jira calls execute without race condition
Task and Notification Agent triggers Jira creation and Xero notification within the same execution step
Both calls complete successfully; Jira project key and Xero send confirmation both present in log; neither overwrites the other
Log shows both responses present; no timeout on either call; execution continues to exit survey step normally
T19
Okta suspension confirmation received before Google Workspace step proceeds
Okta API call returns 200 with status SUSPENDED
Google Workspace Admin SDK call fires only after Okta confirmation; no Google call without confirmed Okta suspension
Execution trace shows Okta response logged before Google SDK call timestamp; no Google call recorded when Okta response is mocked as pending
T20
Retry behaviour: transient Okta API timeout resolved on second attempt
Okta API mocked to return 503 on first call, 200 on second call
Agent retries after 5-second back-off; second call succeeds; no error logged to Slack; execution continues normally
Retry appears in execution log; 5-second minimum gap between attempts; final Okta status is SUSPENDED; no false error alert fired
T21
Xero payroll notification field mapping validated
BambooHR leave_balance_days=12.0, final_working_day='2025-05-15', employee_name='Test User'
Xero notification email body contains leave_balance_days=12.0, final_working_day='2025-05-15', employee_name='Test User'; no placeholder tokens remain
All three data fields match source values; zero unfilled template placeholders in email body; finance lead test address receives the email
T22
Slack summary accurately reflects partial completion state
Jira equipment return task still open at time of Slack post; all other tasks complete
Slack message lists five completed tasks and one pending item (equipment return) under 'Awaiting human action'; no completed task listed as pending
Completed task count in Slack message equals five; pending item count equals one; item label matches Jira subtask title exactly
ID
Scenario
Input
Expected Output
Pass Criteria
E01
Duplicate BambooHR webhook received for same employee within 60 seconds
Two identical BambooHR webhook payloads for employee_id=EMP099 fired 15 seconds apart
Automation platform deduplication logic suppresses second trigger; only one workflow run initiated; idempotency key logged
Execution log shows one run only; second webhook payload present in raw log but no second execution started; idempotency_key field populated
E02
Missing departure date in BambooHR payload
Webhook fires with status='departing' but last_working_day field is null
Workflow halts at trigger validation; logs MISSING_DEPARTURE_DATE; Slack alert sent to HR channel requesting manual correction
No downstream API calls made; MISSING_DEPARTURE_DATE in log; Slack alert delivered with employee name and link to BambooHR record
E03
Employee has no Okta account (contractor or limited-access staff)
BambooHR record valid; Okta lookup returns 404 for the email address
Agent logs OKTA_USER_NOT_FOUND; proceeds to Google Workspace step; Slack summary flags Okta step as skipped with reason
Google Workspace step executes successfully; Slack summary includes 'Okta: not found, skipped' note; no unhandled exception
E04
Google Workspace Admin API unavailable (5xx response) for full retry window
Google Workspace Admin SDK returns 503 on all three retry attempts
Agent logs GOOGLE_WORKSPACE_UNAVAILABLE after third attempt; Jira board created with a manual action subtask for IT to disable Google account; Slack alert sent
Jira board contains manual IT subtask; GOOGLE_WORKSPACE_UNAVAILABLE in log; Slack alert lists the manual action required; workflow continues to Xero and survey steps
E05
Departure date falls on a public holiday or weekend
last_working_day='2025-12-25' (Christmas Day)
Exit survey send date adjusted to the last business day before the public holiday; Jira due dates adjusted accordingly; log notes date adjustment
Survey send timestamp falls on 2025-12-24; Jira due dates reflect adjusted date; DATE_ADJUSTED_FOR_HOLIDAY entry in log
E06
Jira equipment return task not updated by manager within 5 business days of departure
Departure date passes; Jira task remains In Progress for 5 business days
Escalation Slack message sent to HR channel and manager's direct Slack handle listing the overdue task and departure date
Escalation message delivered on day 5; contains manager name, employee name, task link, and departure date; no BambooHR record closed prematurely
E07
Employee has a shared Google Workspace account (generic role account)
Google Workspace user email matches a pattern in the shared-accounts exclusion list in config
Agent skips Google Workspace disable for that account; logs SHARED_ACCOUNT_EXCLUDED with account address; manual action Jira subtask created for IT review
No suspension call made to the shared account; SHARED_ACCOUNT_EXCLUDED in log; Jira subtask present with IT assignee and account address in description