一键导入
run-api-tests
Runs the project's API tests with Maven. Use when the user wants to run tests, run the test suite, run smoke tests, or verify tests after changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Runs the project's API tests with Maven. Use when the user wants to run tests, run the test suite, run smoke tests, or verify tests after changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Adds authentication (Bearer token, Basic, or API key) to API tests using config or env and a shared RequestSpecification. Use when the user wants to add auth to tests, use a token, or secure requests.
Adds negative API test cases (400, 404, 401, etc.) to an existing test class following project rules. Use when the user wants to add negative tests, cover error cases, or add 404/400 tests.
Adds request and response logging to API tests using Rest Assured's log() (e.g. ifValidationFails) without exposing secrets. Use when the user wants to add logging, debug requests, or log on failure.
Debugs and fixes a failing API test by inspecting assertions, status code, response body, and environment. Use when a test fails, the user pastes a failure message, or they ask why a test is failing.
Runs the AI-powered REST Assured test generator with an OpenAPI/Swagger spec path, then directs the user to the generated test files. Use when the user wants to generate API tests from a spec, points at an OpenAPI file, or says "generate tests for this spec."
Extracts common setup (base URI, auth, RequestSpecification) from multiple test classes into an abstract base class. Use when the user wants to reduce duplication, add a base test class, or share setup across test classes.
| name | run-api-tests |
| description | Runs the project's API tests with Maven. Use when the user wants to run tests, run the test suite, run smoke tests, or verify tests after changes. |
Use this skill when the user:
Default: run all tests.
From the ai-rest-assured-framework project root:
mvn test
Run by TestNG group.
If the project uses groups (e.g. smoke, regression):
mvn test -Dgroups=smoke
Or multiple: -Dgroups="smoke,regression".
Run with a specific testng.xml suite.
If a suite file exists (e.g. src/test/resources/testng.xml or a custom one):
mvn test -DsuiteXmlFile=src/test/resources/testng.xml
Run a single test class.
mvn test -Dtest=MyApiTest
Report results.
Surefire writes reports to target/surefire-reports/. Tell the user the outcome (passed/failed) and, if failed, point to the report or the failing test name and assertion.
api.base.url or required env vars are set if tests depend on them; otherwise tests may fail or be skipped.mvn test) so the build is reproducible.