Skip to content

Smoke Testing

In one line

Smoke testing runs basic tests to check the system is 'alive' — if smoke tests fail, skip deeper testing.

In simple words

Smoke testing (build verification testing) is a quick sanity check after deployment or build. It verifies the most critical functions work before running the full test suite.

The name comes from hardware testing: plug it in, if smoke comes out, don't bother testing further.

What smoke tests check:

  1. Application starts — server boots, no crash
  2. Critical paths work — homepage loads, login works, main API responds
  3. Database connected — can read/write basic data
  4. Key services up — cache, queue, external APIs reachable

Characteristics:

  • Fast — runs in seconds or minutes, not hours
  • Shallow — checks if things work, not if they work correctly
  • Blocking — if smoke fails, stop and fix before deeper testing
  • After deployment — first thing to run after a new build/deploy

Smoke tests are often automated and run as part of CI/CD pipeline. If smoke tests pass, the deployment proceeds; if they fail, it rolls back.

Example

javascript
// Smoke test suite — fast, critical-path only
describe('Smoke tests', () => {
  test('server responds on /', async () => {
    const res = await fetch('https://api.example.com/');
    expect(res.status).toBe(200);
  });

  test('health check endpoint works', async () => {
    const res = await fetch('https://api.example.com/health');
    expect(res.status).toBe(200);
    const body = await res.json();
    expect(body.status).toBe('ok');
  });

  test('database is connected', async () => {
    const res = await fetch('https://api.example.com/api/users?limit=1');
    expect(res.status).toBe(200);
  });

  test('authentication works', async () => {
    const res = await fetch('https://api.example.com/api/login', {
      method: 'POST',
      body: JSON.stringify({ user: 'test', pass: 'test' }),
    });
    expect(res.status).toBe(200);
  });
});

// If any smoke test fails → deployment is broken, rollback!

Smoke tests check the most basic functions: server up, health check OK, database connected, auth works. If any fail, the deployment is broken — rollback immediately.

Common confusions

  • Confused with: sanity testing

    The difference: Smoke testing checks critical functions after a new build/deployment — it's about verifying the build is usable. Sanity testing checks specific functionality after a change or bug fix — it's about verifying the fix didn't break things. Smoke is broad and shallow (is the system alive?); sanity is narrow and focused (did this fix work without breaking related features?).

Related terms

Related Resources

Related Lessons

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors

← Back to glossary