load-testing-apis
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLoad Testing Apis
API负载测试
Overview
概述
This skill provides automated assistance for api load tester tasks.
This skill provides automated assistance for the described functionality.
本Skill为API负载测试任务提供自动化辅助支持。
本Skill可为上述功能提供自动化协助。
Prerequisites
前置条件
Before using this skill, ensure you have:
- API design specifications or requirements documented
- Development environment with necessary frameworks installed
- Database or backend services accessible for integration
- Authentication and authorization strategies defined
- Testing tools and environments configured
在使用本Skill之前,请确保您已具备以下条件:
- 已记录API设计规范或需求
- 已安装必要框架的开发环境
- 可访问用于集成的数据库或后端服务
- 已定义身份验证和授权策略
- 已配置测试工具和环境
Instructions
操作步骤
- Use Read tool to examine existing API specifications from {baseDir}/api-specs/
- Define resource models, endpoints, and HTTP methods
- Document request/response schemas and data types
- Identify authentication and authorization requirements
- Plan error handling and validation strategies
- Generate boilerplate code using Bash(api:load-*) with framework scaffolding
- Implement endpoint handlers with business logic
- Add input validation and schema enforcement
- Integrate authentication and authorization middleware
- Configure database connections and ORM models
- Write integration tests covering all endpoints
See for detailed implementation guide.
{baseDir}/references/implementation.md- 使用Read工具查看{baseDir}/api-specs/目录下的现有API规范
- 定义资源模型、端点和HTTP方法
- 记录请求/响应模式和数据类型
- 识别身份验证和授权要求
- 规划错误处理和验证策略
- 使用Bash(api:load-*)命令生成带框架脚手架的样板代码
- 实现包含业务逻辑的端点处理程序
- 添加输入验证和模式强制执行
- 集成身份验证和授权中间件
- 配置数据库连接和ORM模型
- 编写覆盖所有端点的集成测试
详细实现指南请参考。
{baseDir}/references/implementation.mdOutput
输出内容
- - Endpoint route definitions
{baseDir}/src/routes/ - - Business logic handlers
{baseDir}/src/controllers/ - - Data models and schemas
{baseDir}/src/models/ - - Authentication, validation, logging
{baseDir}/src/middleware/ - - Configuration and environment variables
{baseDir}/src/config/ - OpenAPI 3.0 specification with complete endpoint definitions
- - 端点路由定义
{baseDir}/src/routes/ - - 业务逻辑处理程序
{baseDir}/src/controllers/ - - 数据模型和模式
{baseDir}/src/models/ - - 身份验证、验证、日志记录
{baseDir}/src/middleware/ - - 配置和环境变量
{baseDir}/src/config/ - 包含完整端点定义的OpenAPI 3.0规范
Error Handling
错误处理
See for comprehensive error handling.
{baseDir}/references/errors.md详细错误处理指南请参考。
{baseDir}/references/errors.mdExamples
示例
See for detailed examples.
{baseDir}/references/examples.md详细示例请参考。
{baseDir}/references/examples.mdResources
参考资源
- Express.js and Fastify for Node.js APIs
- Flask and FastAPI for Python APIs
- Spring Boot for Java APIs
- Gin and Echo for Go APIs
- OpenAPI Specification 3.0+ for API documentation
- 适用于Node.js API的Express.js和Fastify
- 适用于Python API的Flask和FastAPI
- 适用于Java API的Spring Boot
- 适用于Go API的Gin和Echo
- 用于API文档的OpenAPI Specification 3.0+