← 返回 Skills 市场
132
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install grpc-test-automation
功能描述
Complete gRPC test automation for embedded devices with C/C++ SDK. Input: requirements.md + SDK (C/C++ headers and libraries) Output: Test framework + JMX +...
使用说明 (SKILL.md)
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 filessdk/lib/*.soorsdk/lib/*.a- SDK libraries
Optional
requirements.md- Interface specificationstest_cases.md- Historical test casestest_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 patternsreferences/cpp-server.md- C++ gRPC server implementationreferences/serial-protocol.md- Serial communication detailsreferences/jmeter-config.md- JMeter gRPC plugin configuration
安全使用建议
This skill appears to implement what it claims, but review and prepare before running: 1) Inspect scripts (especially init_project.sh, analyze_sdk.py, generate_report.py) and confirm you trust the SDK and repository. 2) Expect the scripts to install Python packages from PyPI at runtime — run these installs in a sandbox or virtualenv if needed. 3) Ensure required tools are present: protoc, cmake, make, gRPC C++ plugin, and JMeter (the templates assume /opt/jmeter). 4) The generated server binds 0.0.0.0 and uses insecure credentials by default — run it in an isolated test network, not on production or Internet-facing hosts. 5) Verify any mounting/deploy steps to your embedded board are safe for that device and do not overwrite critical files. 6) Because some parsing logic in analyze_sdk.py is brittle/specialized (e.g., filters around functions prefixed with 'venc_'), test the analyzer on sample headers first. If you need higher assurance, run the initialization and builds in a VM/container and audit any network activity and installed packages.
功能分析
Type: OpenClaw Skill
Name: grpc-test-automation
Version: 1.0.0
The skill bundle provides a comprehensive framework for gRPC-based test automation of embedded C/C++ SDKs. It includes tools for SDK header analysis (scripts/analyze_sdk.py), project initialization (scripts/init_project.sh), and Excel report generation (scripts/generate_report.py). While the bundle describes high-risk capabilities such as remote file uploads and process execution via a simulated serial protocol over TCP (references/serial-protocol.md), these features are explicitly designed for deploying and running test servers on embedded target boards. No evidence of malicious intent, unauthorized data exfiltration, or prompt injection was found; the code and instructions are consistent with the stated purpose of embedded systems testing.
能力评估
Purpose & Capability
Name, SKILL.md, scripts, and reference docs consistently implement gRPC test automation for a C/C++ SDK (many references to a 'venc' SDK). That alignment is reasonable. Minor mismatch: the skill assumes many external tools (protoc, cmake, make, gRPC libs, JMeter at /opt/jmeter, grpc_cpp_plugin) but the registry metadata lists no required binaries or environment variables.
Instruction Scope
Runtime instructions focus on analyzing SDK headers, generating proto/service wrappers, building a C++ gRPC server, deploying artifacts to an embedded board, running JMeter tests, and producing an Excel report. The instructions do not request unrelated secrets or system files. Note: the workflow includes deploying/mounting artifacts to a board and starting a server listening on 0.0.0.0 (insecure by default) — expected for testing but operationally sensitive.
Install Mechanism
There is no formal install spec, but scripts perform network installs at runtime: init_project.sh calls 'pip3 install grpcio grpcio-tools protobuf openpyxl', and generate_report.py will invoke pip (via subprocess) to install openpyxl if missing. These actions fetch packages from PyPI at runtime and write to the host environment. No downloads from arbitrary URLs were observed, but automatic package installation increases risk and should be reviewed.
Credentials
The skill declares no required environment variables or credentials and the code does not attempt to read secrets. It does rely on system tools and specific paths (/opt/jmeter, system protoc/grpc plugins). No environment-variable exfiltration or unrelated credential access was detected.
Persistence & Privilege
The skill does not request always:true, does not modify other skills, and does not try to persist credentials. It will start processes (gRPC server, JMeter) during tests but there is no sign of long-term privilege escalation or forced inclusion.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install grpc-test-automation - 安装完成后,直接呼叫该 Skill 的名称或使用
/grpc-test-automation触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of grpc-test-automation.
- Provides a full gRPC test automation framework for C/C++ SDKs on embedded devices.
- Automatically analyzes SDK headers, generates gRPC interfaces, and wraps SDK calls with a C++ gRPC server.
- Integrates with JMeter to create and run test plans using generated proto descriptors.
- Simulates serial communication for resource deployment and service control on the embedded board.
- Generates Excel-format test reports summarizing test results, performance metrics, and errors.
- Includes scripts for each step: analysis, server generation, build, deployment, test execution, and reporting.
元数据
常见问题
grpc-test-automation 是什么?
Complete gRPC test automation for embedded devices with C/C++ SDK. Input: requirements.md + SDK (C/C++ headers and libraries) Output: Test framework + JMX +... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 132 次。
如何安装 grpc-test-automation?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install grpc-test-automation」即可一键安装,无需额外配置。
grpc-test-automation 是免费的吗?
是的,grpc-test-automation 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
grpc-test-automation 支持哪些平台?
grpc-test-automation 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 grpc-test-automation?
由 ventus-Z(@ventus-z)开发并维护,当前版本 v1.0.0。
推荐 Skills