بنقرة واحدة
test-generator
Generates unit, integration, and property-based tests for source code in multiple languages
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generates unit, integration, and property-based tests for source code in multiple languages
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Analyzes project structure, module dependencies, imports, and entry points to generate architecture diagrams in Mermaid format
Analyzes ETL and data pipeline code for optimization opportunities across Python (Pandas, PySpark), Rust (polars, datafusion), SQL, and general pipeline descriptions
Validates environment variable configurations and config files (YAML, TOML, JSON, .env) for missing required variables, type mismatches, deprecated keys, naming convention violations, secret exposure risks, and invalid value ranges
Analyzes code for performance bottlenecks including N+1 queries, O(n^2) or worse algorithms, unnecessary allocations, sync I/O in async contexts, excessive cloning, missing caching opportunities, and large payload transfers. Supports Rust, Python, TypeScript, and Go.
Analyzes, improves, and restructures LLM prompts for clarity, efficiency, and reliability
Analyzes source code for common security vulnerabilities including SQL injection, XSS, command injection, hardcoded secrets, insecure deserialization, path traversal, and SSRF
| name | test-generator |
| description | Generates unit, integration, and property-based tests for source code in multiple languages |
| version | 1.0.0 |
| author | go-on-team |
| tags | ["test","testing","coverage","rust","python","typescript"] |
| min_go_on_version | 1.0.0 |
Analyzes source code and generates comprehensive test suites including unit tests, integration tests, edge cases, and property-based tests. Supports Rust (#[cfg(test)] modules), Python (pytest/unittest), TypeScript (jest/vitest), and Go (testing package).
| Parameter | Type | Description |
|---|---|---|
code | string | Source code to generate tests for |
language | string | Programming language (rust, python, ts, go) |
test_framework | string | Optional: specific framework (default: language-standard) |
include_edge_cases | boolean | Optional: include boundary/edge-case tests (default: true) |
include_property_tests | boolean | Optional: include property-based tests (default: false) |
{
"code": "fn parse_version(s: &str) -> Result<(u32, u32, u32), String> {\n let parts: Vec<&str> = s.split('.').collect();\n if parts.len() != 3 { return Err(\"expected 3 parts\".into()); }\n let major = parts[0].parse().map_err(|_| \"invalid major\")?;\n let minor = parts[1].parse().map_err(|_| \"invalid minor\")?;\n let patch = parts[2].parse().map_err(|_| \"invalid patch\")?;\n Ok((major, minor, patch))\n}",
"language": "rust",
"include_edge_cases": true,
"include_property_tests": false
}
Example output (abbreviated):
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn parses_valid_semver() {
assert_eq!(parse_version("1.2.3").unwrap(), (1, 2, 3));
}
#[test]
fn rejects_empty_string() {
assert!(parse_version("").is_err());
}
#[test]
fn rejects_too_few_parts() {
assert!(parse_version("1.2").is_err());
}
#[test]
fn rejects_too_many_parts() {
assert!(parse_version("1.2.3.4").is_err());
}
#[test]
fn rejects_non_numeric_component() {
assert!(parse_version("1.x.3").is_err());
}
}