name: api-test-automation description: API介面測試自動化工具,支援REST/GraphQL,包含介面測試、效能測試、契約測試、Mock服務等功能 | API Test Automation for REST/GraphQL with performance, contract testing and Mock services homepage: https://github.com/kaiyuelv/api-test-automation category: devops tags: - api - testing - rest - graphql - pytest - automation - performance - mock version: 1.0.0
API介面測試自動化工具,支援REST/GraphQL,包含介面測試、效能測試、契約測試、Mock服務等功能。
本Skill提供完整的API測試解決方案,支援: - REST API 功能測試 - GraphQL 查詢測試 - 效能測試(併發、響應時間、吞吐量) - 契約測試(OpenAPI/Swagger 驗證) - Mock 服務 - 測試報告生成
api-test-automation/
├── SKILL.md # 本檔案
├── README.md # 使用文件
├── requirements.txt # 依賴宣告
├── examples/
│ └── run_tests.py # 使用示例
├── tests/
│ └── test_api_suite.py # 單元測試
└── src/
├── __init__.py
├── rest_client.py # REST API 客戶端
├── graphql_client.py # GraphQL 客戶端
├── performance.py # 效能測試工具
├── contract_tester.py # 契約測試
├── mock_server.py # Mock 服務
└── reporter.py # 報告生成
from api_test_automation import RestClient, GraphQLClient, PerformanceTester
# REST API 測試
client = RestClient(base_url="https://api.example.com")
response = client.get("/users")
assert response.status_code == 200
# GraphQL 測試
graphql = GraphQLClient(endpoint="https://api.example.com/graphql")
result = graphql.query("{ users { id name } }")
來源於7w4.net。
MIT
A comprehensive API testing automation tool supporting REST/GraphQL with functional testing, performance testing, contract testing, and Mock services.
This Skill provides a complete API testing solution: - REST API functional testing - GraphQL query testing - Performance testing (concurrency, response time, throughput) - Contract testing (OpenAPI/Swagger validation) - Mock services - Test report generation
api-test-automation/
├── SKILL.md # This file
├── README.md # Usage documentation
├── requirements.txt # Dependencies
├── examples/
│ └── run_tests.py # Usage examples
├── tests/
│ └── test_api_suite.py # Unit tests
└── src/
├── __init__.py
├── rest_client.py # REST API client
├── graphql_client.py # GraphQL client
├── performance.py # Performance testing tools
├── contract_tester.py # Contract testing
├── mock_server.py # Mock server
└── reporter.py # Report generation
from api_test_automation import RestClient, GraphQLClient, PerformanceTester
# REST API Testing
client = RestClient(base_url="https://api.example.com")
response = client.get("/users")
assert response.status_code == 200
# GraphQL Testing
graphql = GraphQLClient(endpoint="https://api.example.com/graphql")
result = graphql.query("{ users { id name } }")
MIT
這個工具功能比較齊全,能做 API 測試、效能測試和 Mock 服務,文件寫得清楚易懂。但存在明顯缺陷:報告生成模組缺少必要的匯入會導致程式報錯,Mock 服務的部分功能是空殼實現,實際用不起來。整體完成度一般,需要修復這些問題才能正常使用。推薦等開發者修復後再嘗試。