Code Engineering
Auto-detect a project's test framework and run the suite, returning truncated output + exit code.
test_runnerThe 'mvn test' / 'pytest -q' / 'cargo test' button. Lets the agent run the test suite without having to know what test framework the repo uses.
Returns up to MAX_OUTPUT_CHARS of combined stdout+stderr plus the exit code. Default timeout 300s. The agent may override detection with runner=mvn (etc.) — handy for monorepos where the marker-file heuristic picks the wrong one.
When a user asks:
Run the tests and report failures.
the agent calls the tool:
test_runner()and gets back: exit=1 — 142 tests, 2 failures: UserServiceTest#shouldRejectExpiredToken, OrderRepositoryTest#paginationOffset
Real scenarios where agents put this tool to work.
Implementation lives at swarmai-tools/src/main/java/ai/intelliswarm/swarmai/tool/code/build/TestRunnerTool.java in the swarm-ai repository.