返回顶部
🇺🇸 English
🇨🇳 简体中文
🇨🇳 繁體中文
🇺🇸 English
🇯🇵 日本語
🇰🇷 한국어
🇫🇷 Français
🇩🇪 Deutsch
🇪🇸 Español
🇷🇺 Русский
s

smoke-test-generator

Generate comprehensive API smoke test suites — categorised tests for auth, CRUD, integrations, cached vs live endpoints, with summary reporting. Use when validating API deployments, CI smoke checks, or pre-demo verification. Works with any HTTP API.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
327
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

smoke-test-generator

# Smoke Test Generator A structured pattern for API smoke testing with categorised test suites and summary reporting. Adapted from a production test suite that verified 34 endpoints across auth, CRUD, cached audio, story generation, ElevenLabs, and Mistral agent APIs. ## Test Categories | Category | What It Tests | Fail = | |---|---|---| | Auth | Login, token validation, protected routes | Nothing else works | | CRUD | Create, read, update, delete operations | Data layer broken | | Cached | Pre-cached content serves correctly | Demo will fail | | Live | Real API calls complete successfully | External dependency down | | Integration | End-to-end workflows across services | Pipeline broken | ## Pattern ```python import httpx import asyncio BASE_URL = "http://localhost:8000" results = {"pass": 0, "fail": 0, "skip": 0} async def test(name: str, category: str, fn): try: await fn() results["pass"] += 1 print(f" ✅ [{category}] {name}") except Exception as e: results["fail"] += 1 print(f" ❌ [{category}] {name}: {e}") async def run_smoke_tests(): async with httpx.AsyncClient(base_url=BASE_URL, timeout=30) as client: # Auth await test("Login with valid creds", "auth", lambda: assert_status(client.post("/login", json={"email": "test@test.com", "password": "test"}), 200)) # CRUD await test("Create item", "crud", lambda: assert_status(client.post("/api/items", json={"name": "test"}), 201)) # Cached await test("Cached content returns 200", "cached", lambda: assert_status(client.get("/api/cached/1"), 200)) # Integration await test("Full pipeline completes", "integration", lambda: assert_status(client.post("/api/pipeline", json={...}), 200)) total = results["pass"] + results["fail"] print(f"\n{'='*40}") print(f"Results: {results['pass']}/{total} passed") if results["fail"] > 0: print(f"⚠️ {results['fail']} failures — do not demo!") ``` ## Files - `scripts/smoke_test.py` — Example smoke test suite with all categories

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 smoke-test-generator-1776284975 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 smoke-test-generator-1776284975 技能

通过命令行安装

skillhub install smoke-test-generator-1776284975

下载

⬇ 下载 smoke-test-generator v1.0.0(免费)

文件大小: 4.32 KB | 发布时间: 2026-4-16 17:25

v1.0.0 最新 2026-4-16 17:25
Initial release — extracted from Sandman Tales v2 hackathon

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部