NewsOpen SourceDeveloper Tools

Microsoft’s Unit-Test Agent Beats Copilot: Get It Now

Microsoft code-testing-generator polyglot unit test agent beats GitHub Copilot benchmark comparison
Microsoft open-sources code-testing-generator, a unit-test agent that achieves 92.1% task completion vs 78.9% for stock GitHub Copilot

Microsoft open-sourced a unit-test agent that beats GitHub Copilot by 13 percentage points — using the exact same underlying model. No smarter AI. Just a better workflow. Released July 31 and available today, code-testing-generator reads your repository before it writes a single test, and the results are significant enough to pay attention to.

What It Is

code-testing-generator is a polyglot, open-source agent for generating unit tests. It lives in Microsoft’s dotnet/skills repository, ships under the MIT license, and runs inside GitHub Copilot CLI and VS Code. It does one thing: write unit tests that pass. No integration tests, no E2E tests, no production code changes.

Why It Outperforms Stock Copilot

The agent uses a Research-Plan-Implement (RPI) pipeline. Before generating a single line of test code, it reads your repository — detecting the language, test framework, build commands, and existing test conventions. The official .NET Blog post explains: “A prompt like ‘generate unit tests’ does not say which framework, file location or assertions to use. code-testing-generator settles those decisions by reading the repository before it writes anything.”

This matters most when prompts are vague — which is almost always. On vague prompts, the agent completes 88.8% of tasks versus 66.3% for stock Copilot, a 67% reduction in failures. On detailed prompts, both score 96.8%. The agent earns its keep in the scenario where developers are least specific, which is daily reality.

After writing tests, it runs a five-check quality gate: mutation-style testing, assertion completeness checks, scenario coverage validation, a full workspace build, and confirmation that the repository’s test runner discovers the new tests.

The Numbers

Microsoft ran the agent against 152 tasks from real repositories:

  • Specialized agent: 92.1% task completion (140/152)
  • Stock Copilot: 78.9% task completion (120/152)
  • Failure reduction: 63% fewer failures
  • Task speed: 5.5% faster on average
  • Line coverage: 72.4% vs 72.2% — essentially equal

One counterintuitive finding: the agent generated 2.3% fewer tests than stock Copilot while achieving the same coverage. Fewer tests, same coverage means higher-quality tests — not just more of them.

Per-language results from the full benchmark breakdown show significant variance:

LanguageSpecialized AgentStock Copilot
Go100%66.7%
Python86.7%40.0%
PowerShell70.0%80.0%

Python is where the gap is largest: 86.7% vs 40.0%. Go hits 100% completion. PowerShell is the exception — stock Copilot wins there. The benchmark is honest enough to include it.

How to Use It Today

Install via the GitHub Copilot CLI:

/plugin marketplace add dotnet/skills
/plugin install dotnet-test@dotnet-agent-skills

Then run: Generate unit tests. The agent handles the rest. It works across .NET, Python, TypeScript, JavaScript, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, and C++. Your code stays local — there is no hosted service. It runs inside whatever coding agent you are already using.

VS Code integration is in preview. Visual Studio support is in development. You need GitHub Copilot CLI access to use it today. Per InfoWorld’s coverage, the plugin runs inside an existing coding agent rather than as a standalone hosted service, which means your code never leaves your machine.

Who Should Use This

The clearest use cases are legacy codebases with low coverage and teams pushing for a coverage threshold before release. If you have a polyglot monorepo with inconsistent test conventions across teams, the repository-reading approach is particularly useful — the agent adapts to each project instead of imposing one pattern everywhere.

It works with Claude Opus 4.8, GPT-5.5, and Claude Haiku 4.5. Biggest gains come with Claude Opus 4.8 on .NET tasks: 95.6% vs 77.8% — an 80% reduction in failures.

The Takeaway

The lesson from code-testing-generator is not that Microsoft built a better AI. It is that workflow design matters more than raw model capability. The same model, structured differently, produces measurably better results. That principle extends well beyond unit testing.

The agent is free, MIT-licensed, and available now. If you have untested code — and you do — it is worth two install commands to find out what it covers.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *

    More in:News