api-test-designer
Design API-level test coverage from an endpoint or contract. Use when a tester says "design API tests for POST /orders", "test this endpoint", or pastes an OpenAPI / contract snippet and wants coverage mapped. Produces a coverage matrix across happy path, schema validation, auth/permission, negative inputs, boundary values, and idempotency, each case tied to the contract, then stops for review before cases are built.
- License 许可
- MIT
- 最近更新
- 2026-07-15
- Stars
- ★ 4
- Forks
- 8
01 前言 Front Matter
- name
- api-test-designer
- license
- MIT
- metadata
- { "author": "TheTestingAcademy", "version": "1.0.0", "stlc-phase": "Test Design" }
- description
- Design API-level test coverage from an endpoint or contract. Use when a tester says "design API tests for POST /orders", "test this endpoint", or pastes an OpenAPI / contract snippet and wants coverage mapped. Produces a coverage matrix across happy path, schema validation, auth/permission, negative inputs, boundary values, and idempotency, each case tied to the contract, then stops for review before cases are built.
03 SKILL.md 正文
API Test Designer
You map the coverage an endpoint deserves at the contract level — status codes, schemas, permissions, and edge inputs — one layer above written request cases.
When to use
- An endpoint, OpenAPI spec, or contract snippet needs test coverage designed.
- Someone asks "what should we test on this API besides the happy path?"
- A new or changed endpoint is entering the regression pack and needs a matrix.
Workflow
- Read the contract. Capture method, path, request schema, response schemas per status, auth requirements, and stated constraints. If the contract is missing, ask for it — do not assume field names, status codes, or auth rules.
- Design across dimensions. Generate cases for: happy path (2xx + body), schema validation (required/optional/types), auth & permission (missing/expired token, wrong role), negative (malformed body, wrong content-type, not-found), boundary (min/max/empty/limits), and idempotency / retries / concurrency where the verb warrants it.
- Specify assertions. For each case note expected status, key response fields, and any side effect (record created, event emitted) to verify.
- Trace. Map each case to the contract element or requirement it covers; flag untested status codes or fields.
- HUMAN REVIEW GATE (mandatory). Present the matrix as a draft. Note assumptions about auth, schema, and side effects. Ask for confirmation before cases are written or automated.
Output shape
## API Test Design — <METHOD> <path>
| ID | Dimension | Request | Expected status | Assert |
| AT-1 | happy path | valid body | 201 | body matches schema |
| AT-2 | schema | missing required field | 400 | error code |
| AT-3 | auth | no token | 401 | ... |
| AT-4 | boundary | max-length field | 201/400 | ... |
| AT-5 | idempotency | same request x2 | 201 then 200/409| no dup record |
Coverage note: untested status codes / fields
--- HUMAN REVIEW GATE ---
Assumed auth & schema / "Approve before these become request cases"
Guardrails
- Never invent a field, status code, or auth rule the contract does not state — flag the unknown.
- Design intent only; concrete request bodies and data come from the data generator.
- Do not assume a side effect occurred; every effect is an assertion to verify, not a given.
- The matrix is a draft until a human confirms the contract reading.
04 同仓库更多 Skills
se-wait-fixer
Scans Selenium Java code for Thread.sleep and for implicit+explicit wait mixing, then replaces them with WebDriverWait/ExpectedConditions or FluentWait to fix synchronization. Use when an SDET says "remove Thread.sleep from my tests", "fix the flaky waits", "my implicit and explicit waits conflict", or pastes code full of hard sleeps. Produces refactors the engineer must run and confirm.
se-test-generator
Generates a runnable Selenium 4 + TestNG test in Java from a plain-language scenario, using explicit waits and stable locators. Use when an SDET says "write a Selenium test for login", "generate a TestNG test for the checkout flow", "automate this scenario in Selenium", or pastes Gherkin/steps and wants Java WebDriver code. Produces a draft test the engineer must review and run.
se-report-integrator
Integrates reporting (Allure or ExtentReports) into a Selenium + TestNG suite with listeners, screenshot-on-failure, and step logging. Use when an SDET says "add Allure to my tests", "set up ExtentReports", "capture a screenshot on failure", "add a TestNG listener for reporting", or wants readable run reports. Produces listener and config code the engineer must run to generate a report.
se-page-object-builder
Builds a Page Object Model class in Java (PageFactory @FindBy or explicit locators) with action methods and a WebDriverWait for a given page. Use when an SDET says "create a page object for the login page", "build a POM class", "refactor these locators into a page object", or pastes a page's fields and wants a reusable POM. Produces a draft class the engineer must review and run.
se-locator-strategist
Recommends and repairs Selenium locator strategy — replaces brittle absolute XPath with By.id, By.cssSelector, or Selenium 4 relative locators, and explains the trade-offs. Use when an SDET says "this XPath keeps breaking", "make this locator more stable", "why is my locator flaky", "convert this XPath to CSS", or pastes selectors to harden. Produces proposals the engineer must verify in the DOM.
se-grid-configurator
Configures Selenium Grid 4 (hub-and-node or standalone, including Docker) and wires RemoteWebDriver for parallel and distributed runs. Use when an SDET says "set up Selenium Grid", "run my tests on a remote grid", "dockerize Selenium Grid 4", "point my tests at RemoteWebDriver", or wants parallel execution across nodes. Produces config and code the engineer must run and validate in their environment.