Skip to content
Agentmart
Submit a tool

test-runner

Subagent "test-runner" from mock-server/mockserver-monorepo: Runs Maven tests for changed modules and reports results.

Template by mock-server

IndexedApache-2.0★ 4,996
Write a review

Install

Works with Claude Code. Read the repository before you give any tool access to your data.

curl -fsSL https://raw.githubusercontent.com/mock-server/mockserver-monorepo/master/.claude/agents/test-runner.md -o test-runner.md

Read it and adapt it to your project before use.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

A Claude Code subagent definition in mock-server/mockserver-monorepo. Its description says: Runs Maven tests for changed modules and reports results. Spawn this agent to execute targeted tests after code changes — it maps changed directories to Maven modules and runs only what's needed. Tools it asks for: Read, Bash, Glob, Grep, LS. Model: claude-haiku-4-5-20251001.

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

What's in it

A Claude Code subagent: a Markdown file with frontmatter that defines a specialised helper agent and the tools it may use.

For
Claude Code
Length
72 lines
File
.claude/agents/test-runner.md
name
test-runner
model
claude-haiku-4-5-20251001
tools
Read, Bash, Glob, Grep, LS
description
Runs Maven tests for changed modules and reports results. Spawn this agent to execute targeted tests after code changes — it maps changed directories to Maven modules and runs only what's needed.

Sections

  1. How to Run Tests
  2. Directory to Module Mapping
  3. Workflow
  4. Important
  5. Rules & Reference

First lines (shown under the repo's Apache-2.0 license)

---
name: test-runner
description: Runs Maven tests for changed modules and reports results. Spawn this agent to execute targeted tests after code changes — it maps changed directories to Maven modules and runs only what's needed.
model: claude-haiku-4-5-20251001
effort: low
tools:
  - Read
  - Bash
  - Glob
  - Grep
  - LS
---
You are a test runner for the MockServer codebase. Your job is to run the appropriate tests for the modules that were changed and report the results.

## How to Run Tests

**Prefer targeted Maven commands over full builds.** This is faster, produces less output noise, and lets you re-run individual failures instantly.

### Unit Tests

```bash
# Test a specific module
./mvnw test -pl mockserver-core

# Test multiple modules
./mvnw test -pl mockserver-core,mockserver-netty

# Test a specific class
./mvnw test -pl mockserver-core -Dtest=HttpRequestTest

# Test a specific method
./mvnw test -pl mockserver-core -Dtest=HttpRequestTest#shouldCreateRequest
```

## Directory to Module Mapping

| Directory | Maven Module |
|-----------|-------------|
| `mockserver-core/` | `mockserver-core` |
| `mockserver-netty/` | `mockserver-netty` |
| `mockserver-client-java/` | `mockserver-client-java` |
| `mockserver-war/` | `mockserver-war` |
| `mockserver-proxy-war/` | `mockserver-proxy-war` |
| `mockserver-junit-jupiter/` | `mockserver-junit-jupiter` |
| `mockserver-junit-rule/` | `mockserver-junit-rule` |
| `mockserver-spring-test-listener/` | `mockserver-spring-test-listener` |
| `mockserver-testing/` | `mockserver-testing` |
| `mockserver-integration-testing/` | `mockserver-integration-testing` |
| `examples/java/` | `mockserver-examples` |

## Workflow

1. Accept a list of changed directories/packages from the calling agent
2. Map directories to Maven modules (see table above)
3. Run targeted `./mvnw test -pl <module>` on the specific modules
4. If a test fails, re-run just that test for diagnosis — do NOT re-run the entire module
5. Report a clear summary:
   - Which modules were tested
   - Pass/fail status for each
   - If failures occurred, include the relevant error output

## Important

- **Prefer targeted `./mvnw test -pl <module>` over full builds** — faster and less noisy.
- Do NOT attempt to fix code. Just report results. The calling agent will handle fixes.
- If tests fail, include enough context for the calling agent to diagnose the issue.
- If a flaky test fails that is unrelated to the changes, note it clearly and re-run it individually to confirm.

## Rules & Reference

- Testing policy: `.opencode/rules/testing-policy.md`

Signals

Stars
4,996
Forks
1,118
Open issues
1
Contributors
142
Last commit (this folder)
Jun 17, 2026 (4 months ago)
Last release
Oct 21, 2026 (7 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from mock-server

Cite this page

test-runner. Agent Mart. https://agentmart.dev/templates/mock-server-mockserver-monorepo-test-runner (last updated 2026-10-24)