smoke-test

v2026.09.24

Smoke testing patterns for verifying backend implementations end-to-end. Covers build verification, service health checks, authentication flows, test data setup, and HTTP endpoint validation. USE WHEN: user mentions "smoke test", "verify implementation", "test endpoints", "check if it works", "end-to-end verification", "does it actually run" DO NOT USE FOR: Unit test writing - use `vitest` or `junit`; E2E browser tests - use `playwright`; Load testing - use `performance-expert`; Static API validation - use `integration-validator-expert`

GitHub
Install command
npx skhub add claude-dev-suite/smoke-test
Markdown
SKILL.md

Smoke Testing Core Knowledge

Deep Knowledge: Use mcp__documentation__fetch_docs with technology: smoke-testing for comprehensive documentation.

When NOT to Use This Skill

  • Unit Testing — Use vitest, jest, junit, or pytest for isolated unit tests
  • E2E Browser Testing — Use playwright or cypress for browser-driven end-to-end tests
  • Static API Contract Validation — Use integration-validator-expert for OpenAPI schema validation without running services
  • Load/Performance Testing — Use performance-expert for benchmarks and profiling

Stack Detection Table

Marker FileStackBuild CommandTest CommandRun CommandDefault Port
pom.xmlSpring Boot./mvnw clean compile -q./mvnw test -q./mvnw spring-boot:run &8080
build.gradleSpring Boot (Gradle)./gradlew build -x test./gradlew test./gradlew bootRun &8080
package.json + @nestjs/coreNestJSnpm run buildnpm testnpm run start:dev &3000
package.json + expressExpressnpm run buildnpm testnpm start &3000
requirements.txt + fastapiFastAPI—pytestuvicorn main:app --reload &8000
go.modGogo build ./...go test ./...go run . &8080
Cargo.tomlRustcargo buildcargo testcargo run &8080
*.csproj.NETdotnet builddotnet testdotnet run &5000

Health Check Endpoints

StackEndpointDependency
Spring Boot/actuator/healthspring-boot-starter-actuator
NestJS/health@nestjs/terminus (or custom)
FastAPI/health or /docsCustom route
Express/health or /api/healthCustom route
Go/health or /healthzCustom handler
.NET/healthMicrosoft.Extensions.Diagnostics.HealthChecks

Port Detection Strategy

Search in order:

  1. CLAUDE.md — explicit port mentions
  2. application.yml / application.properties → server.port
  3. package.json scripts → --port flag
  4. .env / .env.local → PORT=
  5. Fall back to stack default from table above

Authentication Patterns

JWT Login Flow

POST /api/auth/login
Content-Type: application/json

{"email": "{email}", "password": "{password}"}

→ Response: {"token": "eyJ...", "refreshToken": "..."}
→ Use: Authorization: Bearer {token}

Credential Discovery

Search in order:

  1. Test files → Grep for login, password, testUser in src/test/ or test/
  2. Config files → application-test.yml, .env.test, test.env
  3. Seed/fixture files → data.sql, seed.ts, fixtures/
  4. Known defaults → admin/admin, test@test.com/password

Detecting Auth Requirement

No auth needed if:

  • No security dependencies in pom.xml / package.json
  • Health endpoint returns 200 without token
  • No @PreAuthorize, @UseGuards, Depends(get_current_user) in controllers

Log File Locations

StackTypical PathsConfig Key
Spring Bootlogs/, target/logging.file.path in application*.yml
NestJSlogs/LoggerModule config or winston transport
FastAPIlogs/logging.config in Python files
DockerContainer stdoutAccess via docker logs or docker-manager MCP

Fallback chain: /tmp/smoke-test-app.log (stdout redirect) → Glob **/logs/*.log → Docker container logs

HTTP Verification Patterns

Positive Cases

MethodExpected StatusBody Check
GET (list)200Array response, non-empty
GET (by ID)200Object with matching ID
POST (create)201Created object with generated ID
PUT (update)200Updated fields reflected
DELETE204 or 200Subsequent GET returns 404

Negative Cases

TestExpected StatusMeaning
No auth token401Unauthorized
Invalid ID (e.g. 999999)404Not Found
Invalid body (missing required field)400Bad Request
Wrong HTTP method405Method Not Allowed

Anti-Patterns

Anti-PatternWhy It's BadSolution
Testing against production DBData corruption riskUse test profile or Docker container
Hardcoding test credentialsSecurity risk, breaks across envsRead from env/test config files
Skipping cleanupLeftover processes and test dataAlways kill PID, prefix data with smoke-test-*
Testing all endpointsScope creep, slowFocus on recently implemented endpoints
Ignoring log errorsHidden bugs slip throughAlways check logs in Phase 7
Retrying without fixingWastes iterationsDelegate fix before retrying

Quick Troubleshooting

ProblemLikely CauseSolution
Health check timeoutApp not started or wrong portCheck log file, verify port in config
401 on all endpointsJWT expired or wrong header formatRe-authenticate, check Authorization: Bearer format
Connection refusedService not listening yetIncrease health check retry interval
500 on POSTMissing required fields or DB constraintCheck DTO validation and entity defaults
Port already in usePrevious smoke test didn't cleanupkill $(lsof -ti:PORT) then retry
Build fails on WindowsMaven wrapper not executableUse mvnw.cmd instead of ./mvnw

Reference Documentation

Discovery
Tags

No tags published for this skill.

Version
Latest version metadata

Version

v2026.09.24

Published

Sep 24, 2026

Category

Uncategorized

License

MIT

Source path

skills/testing/smoke-test

Default branch

main

Latest commit

9496306

Tree SHA

fe4e2f1