hurl-testing
Guidelines for generating, maintaining, and repairing Hurl tests for HTTP APIs. Covers contract testing, lifecycle management, cleanup discipline, and incremental maintenance from OpenAPI specs.
适合你,如果你需要为HTTP API编写或维护Hurl测试
npx oh-my-skill add quanxiaoxiao/quan-skills/hurl-testingcurl -fsSL https://oh-my-skill.com/install.sh | bash -s -- quanxiaoxiao/quan-skills/hurl-testingnpx oh-my-skill verify quanxiaoxiao/quan-skills/hurl-testing怎么用
商店整理自技能原文 · 版本 f6f857f · 表述以原文为准安装后,Claude 会按照 Hurl 测试规范,从 OpenAPI 文档生成、维护和修复 HTTP API 的 Hurl 测试文件,确保测试覆盖合同约定行为,不测试内部实现。
当你要求生成 Hurl 测试、添加新端点覆盖、修复因 API 变更而失败的 Hurl 文件,或为外部可见的 API 错误添加回归测试时触发。
技能原文 SKILL.md
Hurl Testing
Generate and maintain Hurl coverage that validates the HTTP contract without drifting into implementation testing.
Use This Skill
Use this skill when:
- generating Hurl tests from OpenAPI
- adding new Hurl coverage for HTTP endpoints
- repairing failing Hurl files after API changes
- adding regression coverage for caller-visible API bugs
- reviewing Hurl suites for lifecycle or cleanup gaps
When NOT to use
Do not use this skill when:
- the task is unit or internal integration testing only
- the system is not HTTP-based
- there is no usable API contract or endpoint documentation
- browser automation or performance testing is the real goal
Pre-Read Order
Read the target repository first:
openapi.jsonoropenapi.yaml- existing Hurl files, usually under
tests/hurl/ - API documentation or README notes for business rules
Then load bundled guidance from this skill pack:
../../rules/hurl-testing.rule.md../../checklists/hurl-quality.checklist.mdreferences/test-structure.mdreferences/generation-and-repair.md
Workflow
- Start from the contract, not the implementation. Treat OpenAPI and documented API rules as the source of truth for status codes, schemas, and error envelopes.
- Map coverage by operation family. Organize files as
create.hurl,query.hurl,update.hurl,remove.hurl, or one dedicated[action].hurlfile per custom operation.
- Keep each file standalone and rerunnable. Create any required resources inside the file, capture identifiers locally, and perform cleanup in the same file.
- Assert declared behavior only. Check status codes, required fields, error envelopes, pagination structure, and business-critical invariants. Do not assert internal-only or undeclared fields.
- Repair failing tests in the right order. First verify the contract and actual server behavior. Update Hurl only when the contract changed or the existing assertions were wrong.
- Add regression coverage for externally visible bugs. If the user fixes an API bug, add or strengthen at least one Hurl scenario that would fail before the fix.
Reference Guide
Load these only when needed:
references/test-structure.mdfor file layout, lifecycle coverage, cleanup rules, pagination, and assertion scopereferences/generation-and-repair.mdfor generation templates, repair order, and regression rules
Verification
Always verify at the repository boundary:
- run the repository's Hurl command if one exists
- run affected Hurl files in isolation when practical
- rerun the suite or the relevant tag directory after repairs
If tests depend on environment setup, record the exact missing prerequisite instead of claiming success.
Output Contract
Return results in this order:
Contract ScopeCoverage Added Or RepairedVerificationResidual Risk