Purpose
Smoke tests help you:- Verify your test script runs without errors
- Ensure your system handles a small number of virtual users
- Validate test logic and API endpoints
- Catch obvious issues before larger tests
Always run a smoke test before executing load, stress, or soak tests to avoid wasting time on a broken script.
Configuration Pattern
Smoke tests use minimal VUs (1-5) for a short duration (1-5 minutes):Using the Constant VUs Executor
Theconstant-vus executor maintains a fixed number of VUs:
VUs
1-5 virtual users
Duration
1-5 minutes
Typical Smoke Test Flow
1
Start with 1 VU
Begin with a single virtual user to validate basic functionality.
2
Run for short duration
Execute the test for 1-5 minutes to verify stability.
3
Check for errors
Monitor for script errors, failed requests, and threshold violations.
4
Validate responses
Ensure API responses contain expected data and status codes.
Best Practices
What to Verify
- Script execution: No JavaScript errors or exceptions
- API availability: All endpoints are accessible
- Response validation: Checks pass successfully
- Basic performance: Response times are reasonable
Example with Multiple Endpoints
When to Use
- Before every test: Always start with a smoke test
- After script changes: Validate modifications don’t break functionality
- In CI/CD: Quick validation before deploying changes
- New environments: Verify system configuration