Token导航 LogoToken导航TokenDH.com
效率只读clawhub未标认证来源可访问clear审计提醒

grpc-test-automationgRPC 测试自动化

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

3,878

周安装

160

GitHub Stars

公开资料未说明

下载量

1,267
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:grpc-test-automation(gRPC 测试自动化)
来源仓库:https://github.com/ventus-z/grpc-test-automation
安装命令:
openclaw skills install grpc-test-automation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install grpc-test-automation

简介

为嵌入式设备提供基于 C/C++ SDK 的 gRPC 测试自动化支持。

  • 适合在 OpenClaw 中编写单元测试、端到端测试或回归验证用例。
  • 输入项目需求与 SDK 后输出测试框架及 JMX 脚本,需确认测试环境与生产环境隔离。
  • 安装前请核实项目测试框架兼容性及相关运行命令。
  • 涉及外部服务调用时应区分模拟环境与真实环境,防止意外影响生产系统。

SKILL.md

name
grpc-test-automation
description
|
Input
requirements.md + SDK (C/C++ headers and libraries)
Output
Test framework + JMX + Excel report
Workflow
Triggers
grpc test", "板端测试", "协议测试", "SDK测试", "嵌入式测试",

gRPC Test Automation for Embedded Devices

Automated framework for testing C/C++ SDK on embedded boards via gRPC + JMeter.

Complete Workflow

┌─────────────────────────────────────────────────────────────────┐
│  输入: 需求文档 + C/C++ SDK (头文件 + 库)                        │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│  Step 1: 分析 SDK 头文件                                         │
│  - 提取函数签名                                                   │
│  - 识别错误码枚举                                                 │
│  - 理解数据结构                                                   │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│  Step 2: 编写 C++ gRPC 服务端                                    │
│  - 创建 Proto 文件 (基于 SDK 接口)                                │
│  - 实现 gRPC 服务类 (封装 SDK 调用)                               │
│  - 编写 CMakeLists.txt                                          │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│  Step 3: 编译生成                                                │
│  - cmake + make → 生成可执行文件                                  │
│  - protoc → 生成 proto descriptor (.protobin)                   │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│  Step 4: 编写 JMeter JMX                                        │
│  - 引用 proto descriptor                                        │
│  - 配置 gRPC Sampler                                            │
│  - 定义测试用例                                                   │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│  Step 5: 串口下发资源到板端                                       │
│  - 模拟串口通信 (TCP Socket)                                     │
│  - 下发: SDK库 + 服务程序 + Proto                                │
│  - 挂载到板端目录                                                 │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│  Step 6: 板端拉起服务                                            │
│  - 设置 LD_LIBRARY_PATH                                         │
│  - 执行 ./grpc_server 8080                                      │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│  Step 7: JMeter 执行测试                                         │
│  - jmeter -n -t test.jmx                                       │
│  - 收集响应数据                                                  │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│  Step 8: 生成 Excel 报告                                         │
│  - 测试概览                                                      │
│  - 测试详情                                                      │
│  - 性能指标                                                      │
│  - 错误详情                                                      │
└─────────────────────────────────────────────────────────────────┘

Input Files

Required

  • sdk/include/*.h - SDK header files
  • sdk/lib/*.so or sdk/lib/*.a - SDK libraries

Optional

  • requirements.md - Interface specifications
  • test_cases.md - Historical test cases
  • test_framework/ - Historical framework code

Output Structure

grpc_test/
├── proto/
│   └── service.proto            # Generated from SDK analysis
├── server/
│   ├── CMakeLists.txt          # Build configuration
│   ├── grpc_server.cpp         # gRPC server (wraps SDK)
│   ├── build/                  # Build output
│   │   ├── grpc_server         # Compiled executable
│   │   └── service.protobin    # Proto descriptor for JMeter
│   └── service.pb.h/cc         # Generated protobuf code
├── client/
│   └── test_client.cpp         # Optional test client
├── jmeter/
│   ├── test_plans/
│   │   └── test.jmx           # JMeter test plan
│   ├── results/
│   │   ├── result.jtl         # Raw results
│   │   └── report.xlsx        # Excel report
│   └── service.protobin       # Proto descriptor (copied)
├── scripts/
│   ├── serial_simulator.py    # Serial communication simulator
│   ├── deploy_to_board.sh     # Deploy resources to board
│   ├── run_server.sh          # Start server on board
│   └── run_tests.sh           # Execute full test cycle
└── sdk/                        # Original SDK (mounted to board)
    ├── include/
    └── lib/

Scripts Usage

1. Analyze SDK Headers

scripts/analyze_sdk.py sdk/include/

Extracts: functions, enums, structs, error codes

2. Generate Proto + Server

scripts/generate_grpc_server.py --sdk sdk/ --output server/

Creates: proto file, server.cpp, CMakeLists.txt

3. Build

cd server/build && cmake .. && make

Generates: grpc_server executable, service.protobin

4. Deploy to Board

scripts/deploy_to_board.sh --board localhost:9999 --sdk sdk/ --server server/build/

5. Run Tests

scripts/run_tests.sh --jmx jmeter/test_plans/test.jmx --output jmeter/results/

Key Implementation Details

SDK Analysis Pattern

// SDK Header
venc_error_t venc_get_device_info(venc_device_info_t *info);
typedef struct { char device_id[64]; ... } venc_device_info_t;
typedef enum { VENC_OK=0, VENC_ERR_PARAM=1001 } venc_error_t;

↓ Analysis ↓

// Proto Definition
service VencService {
    rpc GetDeviceInfo(GetDeviceInfoRequest) returns (GetDeviceInfoResponse);
}

message GetDeviceInfoResponse {
    string device_id = 1;
    ErrorCode error = 2;
}

Server Wrapper Pattern

// gRPC Server wraps SDK calls
Status GetDeviceInfo(ServerContext* ctx, 
                     const GetDeviceInfoRequest* req,
                     GetDeviceInfoResponse* resp) override {
    venc_device_info_t info;
    venc_error_t err = venc_get_device_info(&info);  // Call SDK
    
    if (err == VENC_OK) {
        resp->set_device_id(info.device_id);
        return Status::OK;
    }
    return Status(StatusCode::INTERNAL, "SDK error");
}

Serial Communication Protocol

// Commands
{"command": "MOUNT", "source_path": "/path/to/sdk"}
{"command": "UPLOAD", "filename": "grpc_server", "content": "..."}
{"command": "START_SERVER", "port": 8080}
{"command": "STATUS"}
{"command": "STOP_SERVER"}

See Also

  • references/sdk-analysis.md - SDK header parsing patterns
  • references/cpp-server.md - C++ gRPC server implementation
  • references/serial-protocol.md - Serial communication details
  • references/jmeter-config.md - JMeter gRPC plugin configuration

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

98.78%
按下载量换算1,252

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills