Back to list
Smarter-Poker

api-testing

by Smarter-Poker

Smarter-Poker-World-Hub

0🍴 0📅 Jan 26, 2026

SKILL.md


name: API Testing description: Automated API testing, mocking, and documentation

API Testing Skill

Tools Required

  • httpie (brew) - HTTP client
  • jq (brew) - JSON processing
  • curl - HTTP requests

Endpoints Testing

Quick API Test

# GET request
http GET https://api.example.com/endpoint

# POST with JSON
http POST https://api.example.com/endpoint name="value"

# With auth header
http GET https://api.example.com/endpoint Authorization:"Bearer TOKEN"

Supabase API Testing

# Test Supabase connection
curl -X GET "https://YOUR_PROJECT.supabase.co/rest/v1/TABLE" \
  -H "apikey: YOUR_ANON_KEY" \
  -H "Authorization: Bearer YOUR_ANON_KEY"

Mock Server

# Quick mock server with json-server
npx json-server --watch db.json --port 3001

Load Testing

# Using hey (install: brew install hey)
hey -n 1000 -c 50 https://api.example.com/endpoint

# Apache benchmark
ab -n 1000 -c 50 https://api.example.com/endpoint

API Documentation

# Generate OpenAPI spec from Express
npx swagger-jsdoc -d swaggerDef.js -o swagger.json

# Serve Swagger UI
npx swagger-ui-express swagger.json

Response Validation

// Validate JSON schema
const Ajv = require('ajv');
const ajv = new Ajv();
const validate = ajv.compile(schema);
const valid = validate(data);

Common Patterns

Health Check Endpoint

app.get('/health', (req, res) => {
  res.json({
    status: 'healthy',
    timestamp: new Date().toISOString(),
    version: process.env.npm_package_version
  });
});

Rate Limit Testing

# Rapid-fire requests to test rate limiting
for i in {1..100}; do
  curl -s -o /dev/null -w "%{http_code}\n" https://api.example.com/endpoint
done

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon