360 Secure SkillHub
360 安全技能中心

Api Test Runner

通过命令行运行 REST API 自动化测试:导入 OpenAPI/Swagger 规范生成请求,使用带 JSONPath 支持的断言库,生成测试报告,并可将结果同步到 TestRail,适配 CI/CD 流水线。需安装 requests、pyyaml,并配置 TestRail 地址与凭据。

分类:开发
zht606
zht606
热度 0.66
最近更新 2026-07-21 18:24:58

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add zht606/api-test-runner
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
api-test-runner
description
Automated API testing with integration to TestRail for test management and reporting
version
1.0.0
author
DevTools Team
tags
["testing","api","testrail","automation"]

API Test Runner

Automated REST API testing with test case management integration. Supports OpenAPI specs, generates test reports, and syncs results to TestRail.

Features

  • OpenAPI/Swagger spec import
  • Automated request generation
  • Assertion library with JSONPath support
  • TestRail result synchronization
  • CI/CD pipeline integration

Setup

pip install requests pyyaml
export TESTRAIL_URL=https://your.testrail.net
export TESTRAIL_USER=your_email
export TESTRAIL_API_KEY=your_api_key

Usage

python scripts/run.py test ./specs/openapi.yaml --testrail
python scripts/run.py report --run-id 123