Skip to content

atlassian-labs/rovo-dev-cli-pitest-demo

Repository files navigation

Rovo Dev Mutation Testing Demo

This repo demonstrates using Rovo Dev CLI with Pitest mutation testing to automatically generate tests that improve mutant coverage. The code and tests are a toy domain to illustrate different approaches.

Prerequisites

Run Pitest

Check that Pitest runs as expected

./gradlew :app:pitest

The HTML Pitest report can be opened in a browser to see mutation results app/build/reports/pitest/index.html

Build and Install the MCP Server

This repo includes a small MCP server written in Go. This gives Rovo Dev CLI tools to work with the Pitest data. The MCP server is installed locally and runs over STDIO.

Test the MCP server code.

go test ./...

Compile the MCP server

go build -v -o bin/ ./cmd/...

Add the MCP server into your RovoDev config ~/.rovodev/mcp.json replace FULL_PATH with the path to the bin dir that you compiled the MCP sever into e.g.,

{
   "mcpServers": {
   "Pitest": {
        "command": "/FULL_PATH/bin/mcp-pitest-server",
        "args": []
     }
   }
} 

(re)start RovoDev, accept adding the MCP server, and check that the MCP tools are registered /mcp and try them out.

Writing Tests

The Rovo Dev CLI can be used to write tests to catch mutants. This uses the mutation testing data to guide and measure progress.

There is a vibe coded prompt in AGENTS.MD that can be used from the Rovo Dev CLI prompt to see this in action.

Rovo Dev CLI is able to quickly increase the mutation coverage and also highlight problems with the code structure that prevent better testing.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published