← 返回
未分类

Code Tester

Build, run, and test code projects for Rust, Go, and Java. Automatically detect project type, run unit tests if available, and report build status. Use after...
frhn9
未分类 clawhub v1.0.0 100000 Key: 无需
★ 0
Stars
📥 311
下载
💾 0
安装

概述

Code Tester

Test code projects to verify builds and tests pass.

Workflow

When asked to test changes:

  1. Detect project type in specified directory:
    • Rust: Cargo.toml + src/ directory
    • Go: go.mod, go.sum, or main.go
    • Java: pom.xml or build.gradle / build.gradle.kts
  1. Run tests (only if tests exist):
    • Skip if no tests found
    • Run project-specific test commands
    • Capture test results
  1. Build the project:
    • Run build commands
    • Capture build output and errors
  1. Report results:
    • Clear summary of what happened
    • Test results (if run)
    • Build status
    • Any errors encountered

Communication Protocol

When testing for another agent:

Format your report like:

Testing: <directory>
Project type: <rust|go|java>
Detected tests: <yes|no>

=== Results ===
✓ Tests: <passed/skipped/failed>
✓/✗ Build: <passed/failed>

<Relevant error messages if any>

If everything passes:

  • Report success clearly
  • Provide next steps if needed

If something fails:

  • Report what failed (tests or build)
  • Include error logs
  • Suggest what to fix

Running Tests

Execute the test script:

/root/.openclaw/workspace/skills/code-tester/scripts/test.sh <directory>

The script will:

  • Auto-detect project type
  • Run tests (if available)
  • Build the project
  • Return exit code 0 on success, 1 on failure

Testing Strategy

  • Rust: cargo testcargo build
  • Go: go test ./...go build
  • Java Maven: mvn testmvn compile
  • Java Gradle: ./gradlew test./gradlew build -x test

Always run from the project directory. The script handles detection automatically.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-12 05:46 安全 安全

安全检测

暂无安全检测报告