ID
Scenario
Input
Expected Output
Pass Criteria
T01
Scheduled trigger fires at configured time
Cron expression fires at 07:00 in sandbox scheduler
Workflow execution begins; Licence Discovery Agent initialises and calls Microsoft 365 user list endpoint
Execution log shows trigger timestamp within 60 seconds of 07:00; no timeout error
T02
Microsoft 365 user list retrieved successfully
Sandbox M365 tenant with 10 synthetic users (8 active, 2 disabled)
Agent returns structured list of 10 users with status (active/disabled) and assigned licence SKUs
Response contains all 10 user records; status field populated for each; no API error code returned
T03
Notion licence register read successfully
Sandbox Notion database with 12 licence records including renewal dates and seat counts
Agent retrieves all 12 records with correct field mappings: tool name, renewal date, seat count, owner Slack handle
12 records returned; all four mapped fields present and correctly typed; no null fields on mandatory columns
T04
Mismatch detected: disabled user still holds active licence
Two disabled M365 users each assigned a licence SKU that appears in the Notion register as active
Agent flags both records as anomalies with status 'Inactive user, licence active' and writes flags to Notion
Both flagged records appear in Notion with correct anomaly status; no other records altered
T05
Renewal within 60-day window flagged correctly
Notion register contains three licences: one expiring in 15 days, one in 55 days, one in 90 days
Agent flags the 15-day and 55-day records as upcoming renewals; 90-day record untouched
Exactly two records receive renewal flag; 90-day record status unchanged; flag includes days-remaining value
T06
No anomalies or renewals: agent exits cleanly
All M365 users active, no licences expiring within 60 days
Agent writes no flags to Notion; logs a clean-run confirmation
Notion database unchanged; execution log contains 'no anomalies detected' entry; no downstream agents triggered
T07
Microsoft 365 API returns 401 Unauthorised
Sandbox credential deliberately invalidated before run
Agent catches auth error, logs it with error code and timestamp, and sends an alert to the configured IT Manager Slack handle
No Notion write occurs; Slack alert delivered within 2 minutes; error log entry contains HTTP 401 and endpoint path
T08
Notion API returns 503 Service Unavailable
Sandbox Notion API mocked to return 503 on first two calls, then 200
Agent retries up to three times with exponential back-off; succeeds on third attempt; logs retry count
Execution succeeds; retry count of 2 recorded in log; no duplicate Notion writes created
T09
Licence register contains a record with no renewal date
One Notion record has renewal_date field empty
Agent skips renewal-window check for that record, logs a data-quality warning, and continues processing remaining records
Warning logged referencing the specific record ID; all other records processed normally; no workflow halt
ID
Scenario
Input
Expected Output
Pass Criteria
T10
Agent triggered by Notion flag written by Licence Discovery Agent
Notion record updated with renewal flag by upstream agent
Renewal Coordination Agent initialises, reads the flagged record, and begins Slack outreach flow
Agent execution starts within 30 seconds of Notion write; correct record ID referenced in execution log
T11
Slack renewal alert sent to correct tool owner
Flagged record contains owner_slack_handle = '@testowner'; renewal date = 30 days from today
Structured Slack message delivered to @testowner in sandbox channel including tool name, renewal date, seat count, and three-option prompt (renew/reduce/cancel)
Message received in sandbox Slack channel; all four data fields present; interactive prompt rendered correctly
T12
Owner responds 'renew' via Slack; decision captured and written to Notion
Slack interactive response payload: action = 'renew'
Decision written to Notion record as 'Renew confirmed'; next_review_date set to renewal_date plus 365 days; record status updated to 'Actioned'
Notion record shows correct decision, updated review date, and 'Actioned' status; no duplicate writes
T13
Owner responds 'reduce seats' via Slack
Slack interactive response payload: action = 'reduce', new_seat_count = 3
Notion record updated with new seat count of 3 and decision 'Reduce to 3 seats'; Xero finance note created referencing the change
Notion seat_count field = 3; Xero note body contains tool name, old seat count, new seat count, and effective date
T14
Owner responds 'cancel' via Slack
Slack interactive response payload: action = 'cancel'
Notion record status set to 'Cancel scheduled'; Xero finance note created with cancellation instruction; IT Manager receives Slack notification of pending cancellation
Notion status = 'Cancel scheduled'; Xero note created; IT Manager Slack DM received within 2 minutes
T15
Xero finance note created successfully
Renewal decision requiring a finance update passed to Xero integration step
Note posted to the correct Xero contact/bill record with structured body: tool name, decision, seat delta, effective date
Xero sandbox shows note on target record; all four body fields present; no API error
T16
Daily digest sent to IT Manager via Slack
Three actioned renewals, one unresponded alert, one pending mismatch in sandbox state
Slack digest message delivered to IT Manager handle listing: 3 actioned, 1 unresponded (with tool name and days remaining), 1 mismatch pending review
Digest received in sandbox channel; counts match seeded state; unresponded item includes days-remaining figure
T17
Slack API rate limit hit during alert dispatch
Sandbox Slack mock returns HTTP 429 on first call with Retry-After header of 5 seconds
Agent waits 5 seconds, retries, succeeds on second attempt; no alert dropped; log records rate-limit event
Alert delivered; retry recorded in log; execution time extended by at least 5 seconds; no duplicate message sent
T18
Xero API returns 400 Bad Request on note creation
Malformed contact ID passed to Xero note endpoint
Agent logs error with HTTP 400 and payload details; sends fallback Slack alert to IT Manager indicating finance note failed and manual follow-up required
No Xero note created; error log contains 400 and payload; IT Manager Slack alert received; workflow does not halt