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.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "smoke-test-generator" with this command: npx skills add nissan/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

CategoryWhat It TestsFail =
AuthLogin, token validation, protected routesNothing else works
CRUDCreate, read, update, delete operationsData layer broken
CachedPre-cached content serves correctlyDemo will fail
LiveReal API calls complete successfullyExternal dependency down
IntegrationEnd-to-end workflows across servicesPipeline broken

Pattern

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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Sendflare

通过 Sendflare SDK 发送带附件的电子邮件,管理联系人列表,支持 CC/BCC 和安全 API 认证。

Registry SourceRecently Updated
General

Playtomic - Book courts using padel-tui

This skill should be used when the user asks to "book a padel court", "find available padel courts", "search padel courts near me", "reserve a Playtomic cour...

Registry SourceRecently Updated
General

Fund Keeper

国内场外基金智能顾问 + 股票行情查询。实时估值、买卖建议、收益统计、定投计划、OCR 识图、股票 - 基金联动。支持离线模式、多数据源缓存。

Registry SourceRecently Updated