搜索

PythonReactSEOPDF
OpenClaw

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 code changes to verify that project builds successfully, unit tests pass if they exist, and application runs without errors. Communicate results back to the requesting agent for fixing and re-testing.

frhn90 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install frhn9/code-tester

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

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
  2. Run tests (only if tests exist):

    • Skip if no tests found
    • Run project-specific test commands
    • Capture test results
  3. Build the project:

    • Run build commands
    • Capture build output and errors
  4. 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 test → cargo build
  • Go: go test ./... → go build
  • Java Maven: mvn test → mvn compile
  • Java Gradle: ./gradlew test → ./gradlew build -x test

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

来源信息

Source
github
Repository
openclaw/skills
Path
skills/frhn9/code-tester
Version
—
Commit
6f009538d3323f70912a4d68f137999aab8ac40d
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# 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`

2. **Run tests** (only if tests exist):
   - Skip if no tests found
   - Run project-specific test commands
   - Capture test results

3. **Build the project**:
   - Run build commands
   - Capture build output and errors

4. **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:

```bash
/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 test` → `cargo build`
- **Go**: `go test ./...` → `go build`
- **Java Maven**: `mvn test` → `mvn compile`
- **Java Gradle**: `./gradlew test` → `./gradlew build -x test`

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

相关技能

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.