360 Secure SkillHub
360 安全技能中心

Api Test Runner

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

zht606
zht606
热度 7.64
最近更新 2026-07-21 18:24:58
分类:开发依赖:代码执行 / 读写文件 / 第三方 API应用场景:API 集成 / 自动化脚本 / DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add 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