api-testing

Generates httpflex test clients to validate HTTP API endpoints with business assertions.

2|Updated Jun 8, 2026
One-click install
npx skills add https://github.com/HACK-WU/skills --skill api-testing-hack-wu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-testing
Source: https://github.com/HACK-WU/skills/tree/main/skills/api-testing
Command: npx skills add https://github.com/HACK-WU/skills --skill api-testing-hack-wu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires httpflex, requests, and includes references (resource) components.

What problem does it solve? Manually testing HTTP APIs with tools like Postman requires repetitive clicking and ad-hoc checks. This Skill turns natural-language API descriptions into an automated test run: it parses endpoint specs, generates httpflex-py test clients, executes a case matrix, and produces a structured pass/fail report with business-level assertions on response data. ## Core Features & Use Cases - Natural Language to Endpoint Specs: Parses user-described interfaces (method, path, params, auth, expected response) into a structured endpoint checklist. - Automated Client Generation: Builds httpflex BaseClient subclasses with authentication (Bearer, Cookie, custom headers), retries, timeouts, and optional caching. - Case Matrix & Business Assertions: Covers normal, boundary, error-parameter, and missing-auth cases, asserting on result, code, and fields inside data rather than just HTTP status. - Use Case: A user says "test these three user-service endpoints with Bearer auth" — the Skill generates clients, runs all cases concurrently, and outputs a Markdown report showing 4/4 passed with per-case status codes. ## Quick Start Ask the AI to test your API by describing the base URL, authentication method, and endpoints, for example: "Test the user API at https://api.example.com with Bearer token, covering GET /users/{id} and POST /users."

Frequently Asked Questions about api-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate HTTP API testing from a text description?

Describe each endpoint with its method, path, parameters, auth type, and expected response. The Skill parses this into a structured checklist, generates httpflex BaseClient test clients, runs a case matrix, and outputs a pass/fail report.

How to test APIs with Bearer token or Cookie authentication in Python?

Use a requests AuthBase subclass that injects the Authorization header, passed as the authentication parameter to the httpflex client. For cookies, set default_headers with a Cookie key since httpflex has no separate cookie attribute.

Does httpflex support concurrent API requests for batch testing?

Yes, pass a list of request dictionaries with is_async=True to run requests concurrently on a thread pool with up to 10 workers by default. Results return in the same order as inputs, and individual failures do not interrupt the batch.

Why does my API test fail with code -1 instead of an HTTP status?

Code -1 indicates a non-HTTP error such as a timeout or unreachable host, not a server response. Check network connectivity and increase default_timeout above the 30-second default for slow endpoints.

What are the limitations of using httpflex for API testing?

httpflex is a beta library (0.1.1) installed only from GitHub, not PyPI, so its API may change between versions. Pin a version when installing, and trial-run against non-production environments before testing sensitive endpoints.