What is a smoke test, and how is it different from a sanity test?

Let’s imagine baking a cake:

A smoke test is like seeing if the cake baked properly without burning it — the idea is to make sure it’s worth decorating. A sanity test is checking the frosting after you fixed it, to ensure it’s no longer salty — it’s about confirming that one small, specific thing works fine.

Smoke test = broader check.

Sanity test = fine-tuned validation.