← Back to Skills Marketplace
121
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install testcase-gen
Description
Generates comprehensive test cases from MySQL/Redis data. Invoke when user wants to create test cases for an API endpoint.
Usage Guidance
This skill will search project config files, resolve environment-variable placeholders, and connect to MySQL and Redis to read schemas and data (and can run arbitrary SQL). That is consistent with generating test cases but it means the skill can access sensitive credentials and production data. Before installing or running it: 1) Inspect application.yaml and the provided data_reader.py yourself; confirm no unexpected network calls or hardcoded endpoints. 2) Do not point it at production databases — use a sanitized or read-only replica. 3) Ensure you trust the skill source (owner unknown) or run in an isolated environment/container. 4) Verify that any database connections are read-only and consider removing or disabling execute_query if you only want SELECTs. 5) Ask the publisher to update registry metadata to explicitly declare required credentials and intended safeguards. If you cannot validate these, treat the skill as potentially risky and avoid running it against sensitive systems.
Capability Analysis
Type: OpenClaw Skill
Name: testcase-gen
Version: 2.0.1
The skill bundle is designed to extract sensitive database credentials and records from MySQL and Redis by parsing local application configuration files (e.g., Spring Boot's application.yaml). While the stated purpose is generating test cases, the 'scripts/data_reader.py' script and 'SKILL.md' instructions grant the AI agent broad access to potentially sensitive data and include methods for executing arbitrary SQL queries. These high-risk capabilities are plausibly related to the tool's function but lack sufficient access controls, making the bundle a significant vector for data exposure if misused.
Capability Assessment
Purpose & Capability
The name/description (generate test cases from MySQL/Redis data) aligns with the included code and SKILL.md: the skill reads application.yaml, extracts DB/Redis connection info, reads table schema/data and Redis keys, then emits test-case JSON. However the registry metadata declares no required environment variables or credentials even though the skill is explicitly designed to consume DB credentials (from config or ${VAR:default} env substitutions). This mismatch is noteworthy.
Instruction Scope
SKILL.md instructs the agent to read Controller/Service/Entity source code and service configuration and to run scripts that will connect to databases and Redis and read data. The included data_reader.py supports executing arbitrary SQL (execute_query) and scanning Redis keys (SCAN) and will resolve ${VAR:default} environment expressions. Those actions are within the stated purpose but also give the skill ability to access sensitive secrets and arbitrarily query the data store; the instructions do not contain explicit safeguards (e.g., non-production enforcement, read-only mode).
Install Mechanism
There is no install spec (instruction-only skill plus a single Python script). That keeps attack surface lower than remote downloads or package installs. The script does import third-party libs (pymysql, redis) but only warns if they are missing.
Credentials
The skill metadata declares no required env vars or primary credential, yet the runtime expects to find DB/Redis credentials in application YAML or via environment variable substitution. The script will read environment variables referenced in configs (via ${VAR:default}) and will therefore access secrets if present. The mismatch between declared requirements (none) and actual behavior (needs DB/Redis creds) is an incoherence and a privacy risk.
Persistence & Privilege
always is false and the skill does not request persistent or elevated platform privileges. It does not attempt to modify other skills or global agent settings.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install testcase-gen - After installation, invoke the skill by name or use
/testcase-gen - Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.0.1
Version 2.0.1
- Major refactor: removed old scripts, added unified data reading module.
- Added scripts/data_reader.py for MySQL and Redis data extraction.
- Removed scripts/jtest_generator.py, scripts/run_generator.py, and scripts/testcase_parser.py.
- The skill now focuses on generating comprehensive test cases (JSON) from database sources, intended for later use by JUnit test generators.
v2.0.0
Initial release of JUnit 5 test generator for Spring Boot:
- Added core scripts: `jtest_generator.py`, `run_generator.py`, `testcase_parser.py`
- Removed configuration files, advanced prompt templates, and all test case/quality assessment/export/review scripts from previous version
- Now generates JUnit 5 test classes from JSON test case files produced by "Test Case Generator"
- Supports batch conversion, API and service layer tests, and follows Spring Boot/JUnit 5 best practices
- Simplified workflow focused solely on transforming JSON test cases to Java test code
v1.0.0
- Major simplification and redesign: reduced feature set to focus on test case generation from real MySQL/Redis data.
- Removed all advanced exports, quality scoring, prompt customization, config management, and review scripts.
- New workflow: connect to MySQL/Redis, analyze business/service code, and generate comprehensive test cases based on actual data.
- Added new script `data_reader.py` for reading MySQL and Redis according to a given YAML config.
- All previous scripts and reference materials are removed; only the essential data reading and generation flow is retained.
Metadata
Frequently Asked Questions
What is testcase-generator?
Generates comprehensive test cases from MySQL/Redis data. Invoke when user wants to create test cases for an API endpoint. It is an AI Agent Skill for Claude Code / OpenClaw, with 121 downloads so far.
How do I install testcase-generator?
Run "/install testcase-gen" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is testcase-generator free?
Yes, testcase-generator is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does testcase-generator support?
testcase-generator is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created testcase-generator?
It is built and maintained by Hcyyy0120 (@hcyyy0120); the current version is v2.0.1.
More Skills