返回顶部
a

aliyun-pts-manage阿里云PTS管理

Use when managing Alibaba Cloud Performance Testing Service (PTS) via OpenAPI/SDK, including scene lifecycle operations, test start/stop control, report retrieval, and metadata-driven API discovery before production changes.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
105
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

aliyun-pts-manage

技能名称: aliyun-pts-manage
详细描述:
类别: 服务

阿里云性能测试服务 (PTS)

目的

使用阿里云 PTS OpenAPI 支持:

  • - 测试场景清单与巡检
  • 压力测试规划与生命周期自动化
  • 报告与指标检索,用于验证与故障排查

前提条件

  • - 配置最小权限的阿里云凭证。
  • 安装 Python SDK(建议使用虚拟环境):

bash
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -U alibabacloudpts20201020 alibabacloudtea_openapi

  • - 优先使用环境变量:
- ALICLOUDACCESSKEY_ID - ALICLOUDACCESSKEY_SECRET - 可选 ALICLOUDREGIONID
  • - 在执行变更操作前,先运行只读 API 发现和当前状态检查。

AccessKey 优先级

1) 环境变量:ALICLOUDACCESSKEYID / ALICLOUDACCESSKEYSECRET / ALICLOUDREGIONID
2) 共享凭证文件:~/.alibabacloud/credentials

如果区域/环境不明确,在执行变更操作前请与用户确认。

工作流程

1) 确定目标区域、测试场景标识符和操作范围。
2) 运行 API 发现以确认 API 名称和所需参数。
3) 先执行只读 API(List / Get / Describe*)。
4) 仅在确认回滚方案和变更窗口后执行变更操作。
5) 将输出和证据保存到 output/aliyun-pts-manage/。

API 发现

  • - 产品代码:PTS
  • 默认 API 版本:2020-10-20
  • 元数据来源:https://api.aliyun.com/meta/v1/products/PTS/versions/2020-10-20/api-docs.json

最小可执行快速入门

bash
python skills/observability/pts/aliyun-pts-manage/scripts/listopenapimeta_apis.py

可选参数:

bash
python skills/observability/pts/aliyun-pts-manage/scripts/listopenapimeta_apis.py \
--product-code PTS \
--version 2020-10-20 \
--output-dir output/aliyun-pts-manage

列出场景(只读):

bash
python skills/observability/pts/aliyun-pts-manage/scripts/listptsscenes.py \
--region cn-hangzhou \
--page-number 1 \
--page-size 10 \
--output output/aliyun-pts-manage/scenes.txt

启动一个场景(变更):

bash
python skills/observability/pts/aliyun-pts-manage/scripts/startptsscene.py \
--region cn-hangzhou \
--scene-id \
--wait \
--output output/aliyun-pts-manage/start-result.json

停止一个场景(变更):

bash
python skills/observability/pts/aliyun-pts-manage/scripts/stopptsscene.py \
--region cn-hangzhou \
--scene-id \
--wait \
--output output/aliyun-pts-manage/stop-result.json

常用操作映射

  • - 场景清单:ListPtsScene, GetPtsScene, ListOpenJMeterScenes, GetOpenJMeterScene
  • 场景生命周期:CreatePtsScene, SavePtsScene, ModifyPtsScene, DeletePtsScene, DeletePtsScenes
  • 测试执行控制:StartPtsScene, StopPtsScene, StartTestingJMeterScene, StopTestingJMeterScene
  • 调试控制:StartDebugPtsScene, StopDebugPtsScene, StartDebuggingJMeterScene, StopDebuggingJMeterScene
  • 报告/指标:ListPtsReports, GetPtsReportDetails, GetPtsSceneRunningData, GetPtsSceneRunningStatus

参见 references/apiquickmap.md 获取分组后的 API 列表。

脚本目录

  • - scripts/listopenapimetaapis.py:获取元数据并生成 API 清单文件。
  • scripts/listptsscenes.py:分页列出 PTS 场景。
  • scripts/startptsscene.py:启动一个场景,并可选择轮询运行状态。
  • scripts/stoppts_scene.py:停止一个场景,并可选择轮询直到非运行状态。

输出策略

将生成的文件和执行证据写入:
output/aliyun-pts-manage/

验证

bash
mkdir -p output/aliyun-pts-manage
for f in skills/observability/pts/aliyun-pts-manage/scripts/*.py; do
python3 -m py_compile $f
done
echo pycompileok > output/aliyun-pts-manage/validate.txt

通过标准:命令退出码为 0 且 output/aliyun-pts-manage/validate.txt 已生成。

输出与证据

  • - 将产物、命令输出和 API 响应摘要保存到 output/aliyun-pts-manage/ 下。
  • 在证据文件中包含关键参数(区域/资源 ID/时间范围)以确保可重现性。

参考资料

  • - 来源列表:references/sources.md
  • API 快速映射:references/apiquickmap.md
  • 请求/响应模板:references/templates.md

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 aliyun-pts-manage-1775879102 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 aliyun-pts-manage-1775879102 技能

通过命令行安装

skillhub install aliyun-pts-manage-1775879102

下载

⬇ 下载 aliyun-pts-manage v1.0.0(免费)

文件大小: 10.25 KB | 发布时间: 2026-4-12 08:56

v1.0.0 最新 2026-4-12 08:56
Initial public release of aliyun-pts-manage:

- Supports managing Alibaba Cloud Performance Testing Service (PTS) scenes via OpenAPI/SDK.
- Provides scripts for listing test scenes, starting/stopping scenes, and fetching API metadata.
- Emphasizes read-only API discovery before mutating operations.
- Evidence and outputs are saved systematically to an output directory.
- Includes documentation for setup, workflow, operation maps, and validation routines.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部