Token导航 LogoToken导航TokenDH.com
开发操作浏览器github未标认证来源可访问许可证需确认审计通过

running-smoke-tests运行冒烟测试

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

675

周安装

29

GitHub Stars

2,101

下载量

237
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:running-smoke-tests(运行冒烟测试)
来源仓库:https://github.com/jeremylongshore/claude-code-plugins-plus-skills
仓库路径:skills/running-smoke-tests
安装命令:
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill running-smoke-tests
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill running-smoke-tests

简介

用于辅助测试设计、自动化测试、用例整理和回归验证。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中编写单元测试、端到端测试或根据失败日志定位问题。
  • 使用时需确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑。
  • 涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。
  • 安装方式:github,安装命令:npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill running-smoke-tests

SKILL.md

Smoke Test Runner

Overview

Execute fast, high-confidence smoke tests that validate critical application functionality after deployment or build. Smoke tests verify that the application starts, core user flows work, and key integrations respond -- without running the full test suite.

Prerequisites

  • Application deployed and accessible at a known URL or running locally
  • HTTP client available (curl, wget, node-fetch, or Playwright)
  • List of critical endpoints and user flows to validate
  • Expected response codes and content patterns for each check
  • CI/CD pipeline hook for post-deployment validation

Instructions

  1. Identify the critical paths that constitute a "working" application:

- Health check endpoint returns 200 with expected body. - Homepage loads and contains key UI elements. - Authentication flow succeeds with test credentials. - Primary API endpoint returns valid data. - Database connection is active and responding.

  1. Create a smoke test configuration listing each check:

- URL or command to execute. - Expected HTTP status code (200, 301, etc.). - Response body pattern to match (substring or regex). - Maximum acceptable response time (e.g., 3 seconds).

  1. Write the smoke test suite as a lightweight script or test file:

- Use curl for HTTP checks or Playwright for browser-based checks. - Run checks sequentially for simplicity (parallel for speed if independent). - Fail fast on the first critical failure. - Log each check result with pass/fail, response time, and status code.

  1. Implement timeout guards:

- Set a global timeout of 60 seconds for the entire smoke suite. - Set per-check timeouts of 5-10 seconds. - Treat timeouts as failures, not retries.

  1. Add deployment-gate integration:

- On success: proceed with deployment promotion or traffic shifting. - On failure: trigger rollback and send alert notification. - Report results to CI/CD dashboard and Slack/Teams webhook.

  1. Store smoke test results as CI artifacts for audit trail.
  2. Schedule periodic smoke runs (every 5 minutes in production) as synthetic monitoring.

Output

  • Smoke test script (scripts/smoke-test.sh or tests/smoke.test.ts)
  • Pass/fail result for each critical check with response times
  • Deployment gate verdict (PASS or FAIL with reason)
  • CI artifact with timestamped smoke test log
  • Alert payload for failed checks (Slack webhook, PagerDuty, etc.)

Error Handling

ErrorCauseSolution
Connection refusedApplication not yet ready after deploymentAdd a startup wait with exponential backoff (max 30 seconds) before running smoke tests
503 Service UnavailableApplication is starting or behind a load balancer drainingRetry with 2-second delay up to 3 times; check load balancer health check status
Unexpected redirect (301/302)URL changed or SSL redirect not accounted forFollow redirects with curl -L; update expected URLs in smoke config
Content mismatchPage content changed but smoke test pattern is too specificUse broad patterns (check for <title> or key element IDs, not exact text)
Timeout on database checkDatabase migration running or connection pool exhaustedIncrease timeout for database checks; verify migration completed before smoke tests

Examples

Shell-based smoke test script:

#!/bin/bash
set -e
BASE_URL="${1:-http://localhost:3000}"  # 3000: 3 seconds in ms
PASS=0; FAIL=0

check() {
  local name="$1" url="$2" expected="$3"
  status=$(curl -s -o /dev/null -w '%{http_code}' --max-time 5 "$url")
  if [ "$status" = "$expected" ]; then
    echo "PASS: $name (HTTP $status)"
    ((PASS++))
  else
    echo "FAIL: $name (expected $expected, got $status)"
    ((FAIL++))
  fi
}

check "Health check" "$BASE_URL/health" "200"  # HTTP 200 OK
check "Homepage" "$BASE_URL/" "200"  # HTTP 200 OK
check "API status" "$BASE_URL/api/status" "200"  # HTTP 200 OK
check "Login page" "$BASE_URL/login" "200"  # HTTP 200 OK

echo "Results: $PASS passed, $FAIL failed"
[ "$FAIL" -eq 0 ] || exit 1

Playwright smoke test:

import { test, expect } from '@playwright/test';

test('homepage loads with navigation', async ({ page }) => {
  await page.goto('/', { timeout: 10000 });  # 10000: 10 seconds in ms
  await expect(page.locator('nav')).toBeVisible();
  await expect(page).toHaveTitle(/My App/);
});

test('API health endpoint responds', async ({ request }) => {
  const response = await request.get('/api/health');
  expect(response.ok()).toBeTruthy();
  expect(await response.json()).toHaveProperty('status', 'ok');
});

Resources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.02%
按下载量换算88

Claude

30.91%
按下载量换算73

Cursor

18.06%
按下载量换算43

Gemini CLI

9.01%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills