|
|
Smoke Testing ADK Agents After Deployment
Author: Venkata Sudhakar
ShopMax India deploys ADK agent updates multiple times per week. After every deployment, a smoke test suite runs automatically against the live endpoint to verify that the agent is reachable, authenticates correctly, responds to the five most common query types within the SLA, and does not return error responses for known-good inputs. Smoke tests are the first signal of a broken deployment - they must complete within 60 seconds and alert on-call if any check fails.
A smoke test suite for ADK agents makes real HTTP calls to the deployed agent endpoint (or a canary endpoint) with a fixed set of synthetic queries. It checks HTTP status codes, response time against an SLA threshold, presence of required fields in the JSON response, and absence of error markers. Use pytest with a --smoke flag or a separate smoke test file that CI runs only after a successful deployment, not on every pull request.
The example below simulates smoke tests for ShopMax India's deployed order tracking agent. A mock HTTP client returns fixed responses. Tests verify endpoint reachability, response time SLA, required response fields, and no error flag for a valid order query.
It gives the following output,
OK: Track ORD-5001
OK: Return ORD-5002
OK: What is the price of Samsung TV?
... (3 passed in 0.16s)
In production, ShopMax India should run smoke tests against a dedicated canary slot that receives 5 percent of live traffic, then promote to full production only after all smoke checks pass. Set a hard timeout of 60 seconds for the entire smoke suite - if it exceeds this, treat it as a failure and roll back. Page on-call immediately on any smoke failure since the production agent may be serving broken responses to real customers in Mumbai, Delhi, and Bangalore simultaneously.
|
|