Production Smoke Suite
БесплатноБез исполняемых скриптовНе проверенBuild lightweight production smoke test suites that verify critical user paths, API health, and third-party integrations after every deployment.
от PramodDutta★ 253 звезды на GitHubОб этом скилле
Production Smoke Suite
Production smoke testing is the last line of defense between a deployment and a broken user experience. Unlike comprehensive end-to-end suites that may run for 30 minutes or more, a smoke suite must complete in under 2 minutes and verify that the application's critical paths are functional. This skill covers the philosophy behind production smoke testing, the architecture of a reliable smoke suite, concrete implementation patterns with Playwright and raw HTTP clients, integration with deployment pipelines, and strategies for handling third-party dependencies, authentication flows, and flaky network conditions in real production environments.
Core Principles
1. Speed Over Coverage
A smoke suite is not a regression suite. Its sole purpose is to answer one question: "Did this deployment break anything critical?" If the suite takes more than 2 minutes, it is too slow. Every test must justify its inclusion by covering a revenue-critical or user-critical path. Ruthlessly prune tests that do not protect high-value user journeys.
2. Production-Safe Execution
Smoke tests run against real production infrastructure. They must never create permanent data, modify user accounts, trigger billing events, or send real notifications. Every test must be read-only or use dedicated smoke-test accounts with sandboxed permissions. A smoke test that accidentally charges a customer or sends spam emails is worse than having no smoke tests at all.
3. Deterministic Assertions
Production environments experience variable latency, CDN caching, and third-party service delays. Smoke tests must use generous timeouts, retry logic, and assertions that tolerate minor variations. Check that a response contains expected fields rather than expecting exact string matches. Verify that status codes are in acceptable ranges rather than asserting a single value.
4. Immediate Rollback Signal
The smoke suite must integrate with your deployment pipeline to trigger automatic rollback on failure. A passing smoke suite promotes the deployment; a failing suite halts the rollout and alerts the on-call team. Without this integration, smoke tests are just monitoring with extra steps.
5. Independent and Isolated
Each smoke test must be fully independent. No test should depend on another test's side effects. Tests should run in parallel where possible to minimize total suite duration. Shared state between tests is a reliability liability that will eventually cause false positives or negatives.
Project Structure
smoke-tests/
src/
tests/
health-check.spec.ts
homepage.spec.ts
authentication.spec.ts
checkout-flow.spec.ts
api-health.spec.ts
third-party.spec.ts
helpers/
smoke-config.ts
http-client.ts
retry.ts
assertions.ts
alerting.ts
fixtures/
smoke-accounts.ts
playwright.config.ts
package.json
tsconfig.json
Dockerfile
The src/tests/ directory contains one file per critical path. The src/helpers/ directory holds shared utilities for configuration, HTTP requests with retry logic, custom assertions, and alerting integrations. The src/fixtures/ directory manages smoke test account credentials and test data.
Configuration
Playwright Configuration for Smoke Testing
Smoke-specific Playwright configuration prioritizes speed, reliability, and minimal resource usage:
import { defineConfig, devices } from '@playwright/test';
const BASE_URL = process.env.SMOKE_BASE_URL || 'https://app.example.com';
const TIMEOUT = parseInt(process.env.SMOKE_TIMEOUT || '30000', 10);
export default defineConfig({
testDir: './src/tests',
timeout: TIMEOUT,
expect: {
timeout: 10000,
},
fullyParallel: true,
forbidOnly: true,
retries: 2,
workers: 4,
reporter: [
['list'],
['json', { outputFile: 'smoke-results.json' }],
],
use: {
baseURL: BASE_URL,
screenshot: 'only-on-failure',
video: 'off',
trace: 'retain-on-failure',
actionTimeout: 10000,
navigationTimeout: 15000,
extraHTTPHeaders: {
'X-Smoke-Test': 'true',
},
},
projects: [
{
name: 'smoke-chromium',
use: { ...devices['Desktop Chrome'] },
},
],
});
Key decisions in this configuration: fullyParallel: true runs all tests concurrently for speed. retries: 2 tolerates transient network issues. video: 'off' avoids the overhead of recording video for every test. The X-Smoke-Test header allows backend services to identify and filter smoke test traffic from real user analytics.
Smoke Configuration Module
Centralize all smoke test configuration in a typed module:
// src/helpers/smoke-config.ts
export interface SmokeConfig {
baseUrl: string;
apiBaseUrl: string;
timeout: number;
retries: number;
smokeAccountEmail: string;
smokeAccountPassword: string;
slackWebhookUrl?: string;
pagerDutyRoutingKey?: string;
environment
Установить Production Smoke Suite в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Production Smoke Suite?
Build lightweight production smoke test suites that verify critical user paths, API health, and third-party integrations after every deployment.
Как установить скилл Production Smoke Suite?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Production Smoke Suite запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic