What is a canary test (canary release), and where does the name come from?
A new version is released in the live environment to only a small share of users (for example 1–5%) first. They act as the "canaries", so errors show up early and affect few people.
The name comes from coal mining. Miners took canaries underground because the birds react to toxic gas before humans do. A sick bird was the early warning to get out.
In software, the small user group plays the bird. Because the test runs in production, it exposes problems that a staging environment may hide: real traffic patterns, real data, real third-party integrations. Because only a few users get the new version, any damage stays small.
The approach therefore aims at two things: lower risk (a fault hits few users) and better feedback (it comes from real usage, not from a test setup).
Canary testing resembles a "rolling", gradual blue/green deployment but is more delicate, since real users are deliberately exposed to an unproven version.
Go deeper:
Martin Fowler — Canary Release — the technique, how users are routed, and its limits.