海外版 HTTP 接口测试专家 (Overseas-Http)

Generate executable IntelliJ IDEA HTTP Client test scripts from Java Controllers.

Updated Sep 5, 2021
One-click install
npx skills add https://github.com/a747895159/spring-cloud-study-alibaba --skill http-overseas-http
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 海外版 HTTP 接口测试专家 (Overseas-Http)
Source: https://github.com/a747895159/spring-cloud-study-alibaba/tree/main/.agent/skills/overseas-http-test
Command: npx skills add https://github.com/a747895159/spring-cloud-study-alibaba --skill http-overseas-http

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

本技能帮助快速验证 API 接口,在微服务项目中通过从 Java Controller 自动生成可直接在 IntelliJ IDEA HTTP Client 中执行的测试脚本来减少手写测试代码和重复工作。

Core Features & Use Cases

  • 代码解析:读取 Controller 的公开方法及其映射注解,提取接口路径、请求方法和参数信息。
  • 脚本生成:生成符合 IntelliJ HTTP Client 规范的 .http 脚本,包含完整请求头、示例请求体、以及自动化断言。
  • 鉴权与环境变量:自动将 buffalo-ticket 注入请求头,并支持通过环境变量 {{host}}、{{buffalo-ticket}} 实现环境隔离。
  • 输出与使用场景:输出至 .http 文件,支持直接在 IDE 中运行,覆盖正向测试与异常场景。

Quick Start

请对给定的 Controller 自动生成可直接在 IntelliJ HTTP Client 中运行的测试脚本。

Frequently Asked Questions about 海外版 HTTP 接口测试专家 (Overseas-Http)

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

FAQPage Schema
How do I generate IntelliJ HTTP Client test scripts from Java Controllers?

You can generate IntelliJ HTTP Client test scripts from Java Controllers by parsing public methods and mapping annotations to automatically extract API paths, request methods, and parameters, producing ready-to-run .http files with assertions and environment variables.

How does IntelliJ HTTP Client handle environment variables and authentication in generated scripts?

IntelliJ HTTP Client handles environment variables and authentication by injecting buffalo-ticket into request headers and supporting environment isolation through variables like {{host}} and {{buffalo-ticket}} for deterministic test execution across different microservice environments.

Can I use this automated API testing approach for microservice projects?

Yes, you can use this automated API testing approach for microservice projects. It specifically targets API development in microservices by mapping request bodies and query parameters from Java Controllers to create executable test scripts with proper assertions.

What is the best way to automate HTTP API testing without writing test code manually?

The best way to automate HTTP API testing without manual coding is to use a tool that reads Java Controller annotations to automatically generate executable HTTP test scripts, complete with realistic test data, request headers, and automated assertions.

Does the generated HTTP test script cover exception scenarios and positive tests?

Yes, the generated HTTP test script covers both positive and exception scenarios. It outputs ready-to-run .http files that include automated assertions, realistic test data, and complete request headers to validate various API behaviors directly in the IDE.