Blog · 2026-11-10
What is a smoke test and what kind of tools do I need to do it?
Stefan Bogdanescu
Founder & Senior Architect
What is a smoke test and what kind of tools do I need to do it?
A smoke test is a shallow, high-level validation performed immediately after deployment or build completion. Its primary purpose is not to verify specific business logic or edge cases, but rather to confirm that the application starts up without crashing and that critical services are responsive. Think of it as inserting a lit incense stick into a machine before shipping it; if you see smoke, you know there is a fundamental failure preventing operation. If the system passes this initial check, you proceed with deeper integration or regression testing.
The defining characteristic of a smoke test is speed and scope. It targets "smoke" pathsâcore functionalities like database connectivity, authentication endpoints, or API health checks. The goal is to catch catastrophic failures early, such as missing dependencies, unhandled exceptions during bootstrapping, or misconfigured environment variables, before wasting resources on complex test suites that would fail anyway.
Identifying Critical Smoke Paths
Determining what constitutes a smoke test requires understanding your application's architecture. For a standard web API, the smoke path typically involves hitting a health endpoint to verify the server is listening and then performing one or two essential CRUD operations. For example, in an e-commerce context, you might attempt to fetch the product catalog and add an item to the cart; if either step throws a 500 error or hangs, the build is rejected immediately.
The procedure for executing these tests should be deterministic and repeatable. You generally do not need a full-blown end-to-end suite for this. Instead, you can leverage lightweight scripts that run in seconds. The implementation often looks like a simple HTTP request sequence using tools like curl, httpie, or your language's native HTTP client.
Consider a bash script approach for a Linux deployment:
#!/bin/bash
set -e # Exit immediately if a command exits with a non-zero status
BASE_URL="http://localhost:8080"
echo "Checking application health..."
curl -s -f "$BASE_URL/api/health" || exit 1
echo "Verifying user authentication endpoint..."
curl -s -f -H "Authorization: Bearer $TEST_TOKEN" "$BASE_URL/api/v1/users/me" || exit 1
echo "Smoke test passed. Application is green."
In this example, the set -e flag ensures that if any command fails, the script stops immediately, preventing false positives where a failed smoke test might be misinterpreted as a successful pass if not handled correctly. The -f flag in curl forces an error message and exits with code 1 on HTTP errors (like 4xx or 5xx), making it ideal for automated gatekeeping.
Choosing the Right Tooling
You do not need expensive commercial tools to perform smoke tests. The industry standard relies on existing infrastructure within your CI/CD pipeline. Jenkins, GitHub Actions, GitLab CI, or CircleCI are all capable of running these scripts as the first job in a deployment sequence.
For more complex applications where simple HTTP requests aren't enoughâsuch as verifying that a background worker queue is actually processing jobs or that a message broker is connectedâyou can use testing frameworks designed for this purpose. Tools like Pact are excellent for consumer-driven contracts, ensuring that the service you just built still speaks the language your consumers expect. Similarly, tools like Selenium or Playwright can be scripted to perform high-level browser interactions (like logging in and viewing a dashboard) if your smoke test needs to validate the frontend rendering pipeline.
However, avoid over-engineering this step. Using heavy frameworks for simple connectivity checks introduces unnecessary overhead. The trade-off is clear: heavier tools provide more comprehensive coverage but increase execution time, which defeats the purpose of a fast gatekeeper. Stick to the simplest tool that validates your core hypothesis: "Does the system start and respond?"
Integrating into Your Pipeline
The proper procedure integrates this test as a hard gate in your CI/CD pipeline. It should run before any database migrations are applied or before code is merged to main. If the smoke test fails, the deployment must be blocked automatically. This prevents "integration hell" scenarios where developers spend hours debugging issues that could have been caught by a 10-second script.
Be mindful of environment variables. Smoke tests often require specific credentials (like a read-only database user or a test API token). These should be injected securely via your CI provider's secrets management, never hardcoded into the script. Furthermore, ensure your smoke tests are idempotent; running them multiple times in quick succession should not cause state corruption or race conditions that mimic failures.
By treating smoke tests as non-negotiable quality gates, you save significant engineering time by failing fast on broken builds rather than wasting cycles on complex test suites against a dead application.