Skip to main content

Microsoft's New Testing Agent Tackles the Trust Gap in AI-Generated…

Ilustrační obrázek
Microsoft has open-sourced a dedicated testing agent that cuts AI-generated test failures by 63% — not by producing more tests, but by checking whether the tests it writes actually catch bugs. It is available now through GitHub Copilot CLI and VS Code, and it works across Python, Go, Java, Rust, and a dozen other languages. The key insight: coverage numbers have been lying to teams for years, and the fix is procedure, not a smarter model.

What Microsoft Built — And Why It Matters

AI coding assistants write code fast. Whether that code can be trusted is becoming an urgent question. Developers surveyed this year rated their trust in AI-generated output just above the midpoint of a five-point scale, and more than half admit they ship AI-written code without testing it first according to DevOps.com. Coverage numbers often look fine on paper — but plenty of that coverage is shallow, checking that a result isn't null and calling it a day.

On August 7, 2026, Microsoft released code-testing-generator — an open-source agent that lives inside the dotnet-test plugin in the dotnet/skills repository on GitHub (5,000 stars, MIT-licensed). It is designed to answer the questions that a bare "generate unit tests" prompt leaves open: which code needs coverage, what framework the project already uses, where new tests belong, and — critically — whether the build will actually find them.

That last point matters more than it sounds. A new test project can compile and pass locally and still never run in CI, because nobody wired it into the solution or the test command. It is a quiet failure mode, and one that Microsoft's agent checks for directly.

How the Agent Works — Research, Write, Break, Fix

The agent does not jump straight into writing code. It starts by researching the repository: detecting the language, finding the test framework already in use, and studying existing tests to learn local naming conventions and assertion patterns. From there, it scales its approach to the size of the job:

  • Single method: a direct read-write-validate pass.
  • Larger request: a planning phase before writing begins.
  • Whole subsystem: an iterative loop that runs until it hits a coverage goal.

Once it starts writing, the agent works from simple code toward code with more dependencies, mapping behaviours to test files as it goes. It runs the tests as it writes them, and if something does not compile or an assertion is wrong, it fixes it before moving on. It will not touch production code, and it avoids writing tests that hit real URLs, open ports, or depend on exact timing — the kind of shortcuts that make test suites flaky.

The last step is the one most tools skip: checking whether the tests are actually useful. The agent runs a lightweight form of mutation testing, introducing small code changes that should break a good test, then confirming the existing tests catch them. It also checks for weak assertions, verifies every requested scenario has a matching test, and runs the full suite before calling the job done.

Mitch Ashley, VP at The Futurum Group, put it bluntly: "Coverage numbers have been lying to teams for years. AI-generated code made the lie bigger. Engineering leaders should require proof that a test fails when the code breaks, before coverage targets go into any AI policy."

The Benchmark Numbers

Microsoft benchmarked the agent against stock GitHub Copilot using the same underlying model, across 152 tasks pulled from real repositories. Here is what the numbers show:

ScenarioSpecialized AgentStock CopilotImprovement
All tasks92.1% completed78.9%63% fewer failures
Vague prompts88.8%66.3%22.5 pp gap
Specific code diff prompts100% (15/15)0% (0/15)All vs. none
SWE Atlas (catches injected bugs)36.4%27.3%9.1 pp gap

The improvement did not come from generating more tests. The specialized agent actually produced slightly fewer tests than stock Copilot, with roughly the same average line and branch coverage, and finished about 5.5% faster on average. The gain was in reliability — getting a working result on the first try — not sheer volume.

Microsoft also ran the comparison across multiple models. The workflow helped Claude Opus 4.8, GPT-5.5, and Claude Haiku 4.5, with the biggest failure reduction on Opus. It held up across languages too, more than doubling the completion rate on Python tasks and passing every Go task in the benchmark (though stock Copilot still edged it out slightly on PowerShell).

The SWE Atlas numbers — 36.4% versus 27.3% — deserve attention. SWE Atlas is an independent benchmark that checks whether generated tests actually catch injected bugs, making it a harder and more honest test than coverage percentages. The gap is smaller here, but still real: a 33% relative improvement on a metric that directly measures test quality.

The Price of Trust — What It Costs

The agent itself is free and open-source under the MIT license. It runs inside the tools developers already pay for — GitHub Copilot CLI and VS Code — which means the real cost question is about the Copilot subscription tiers that give you access:

Copilot TierUSD (monthly)EUR (approx.)Key Features
Free$0€0Limited completions, no agent support
Individual$10~€9.16Full completions + chat, agent support via CLI
Business$19/user~€17.41Team management, IP indemnification, org policies
Enterprise$39/user~€35.73Custom models, knowledge bases, fine-tuning

Exchange rate: 1 USD ≈ 0.916 EUR as of August 2026.

For a European development team of 10, adding Copilot Business at ~€17.41 per user per month costs about €174/month (€2,089/year). If the testing agent catches even one production bug that would have taken a developer half a day to fix, the subscription pays for itself several times over.

What This Means for European Developers

Availability: The dotnet/skills repository is publicly accessible on GitHub and the testing agent works through GitHub Copilot CLI, which is fully available across the EU. VS Code and VS Code Insiders support is in preview; Microsoft says Visual Studio support is coming.

Languages beyond .NET: Despite living in the dotnet-test plugin, the agent covers a dozen languages including Python, Go, Java, and Rust — a practical choice, since many European teams run mixed-language codebases. If you are building microservices in Go with a Python data pipeline and a .NET backend, you can use the same testing workflow across all three.

GDPR and the AI Act: Because the agent runs locally inside Copilot CLI or VS Code, test generation stays within your existing GitHub Copilot data processing boundaries. For Enterprise tier customers, Microsoft's data protection terms apply — code snippets are not stored or used for model training. Under the EU AI Act, which entered its main enforcement phase on August 2, 2026, software testing tools are not classified as high-risk AI systems, so no additional conformity assessment is required. However, if your tests touch personal data (even synthetic test data that mirrors production schemas), GDPR Article 25 data-protection-by-design principles apply — the agent's local-first design helps here.

Our own experience: We run multiple AI-driven pipelines in production — article generation, RSS monitoring, publishing workflows — and we have seen first-hand that AI-generated code passes without thinking when coverage targets are the only gate. On our own RTX 5060 Ti test rig, we routinely benchmark local LLMs via Ollama, and the difference between a test that asserts something and a test that actually catches a regression is something we measure, not assume. Microsoft's approach — mutation testing on AI output as a built-in step — mirrors what we have learned the hard way: the bottleneck is not generating tests, it is generating tests that fail when the code breaks.

The Bigger Pattern — Procedure Over Prompts

None of this makes AI-written code trustworthy by default. What it does is point at something narrower and more useful: a workflow that treats test generation as a process with checkpoints — research, plan, write, validate, mutate, fix — not a single prompt-and-done request.

Given how much AI-generated code teams are shipping right now, and how thin the testing behind it often is, that kind of structure matters. The agent is not a smarter model — it is a smarter procedure wrapped around whatever model you bring. The benchmark proves that the same model, given a structured workflow, produces dramatically more reliable results.

The agent is open source and available now through GitHub Copilot CLI, with support in Visual Studio Code and VS Code Insiders in preview. Microsoft says Visual Studio support is coming, and the team is exploring whether the same approach could extend to integration tests, end-to-end tests, and performance tests down the line.

Does the testing agent work with languages other than .NET?

Yes. Despite being part of the dotnet-test plugin, the agent covers Python, Go, Java, Rust, TypeScript, and several other languages. Microsoft's benchmarks showed it more than doubled the completion rate on Python tasks and achieved 100% on Go tasks.

Do I need a paid Copilot subscription to use the agent?

You need GitHub Copilot access to use Copilot CLI and the plugin system. The Copilot Free tier offers limited completions but may not support agent-level features. The Individual tier ($10/month, ~€9.16) includes full agent access via Copilot CLI. Business and Enterprise tiers ($19–$39/user/month) add team management and compliance features relevant for European organisations.

Does mutation testing on its own output really make a difference?

It is the single most distinctive feature. Most testing tools generate tests and check coverage. Microsoft's agent goes one step further: it introduces small bugs into the code and confirms the tests catch them. This is what reduced failures by 63% — not more tests, but tests that actually verify behaviour. On specific code-diff prompts, the agent passed all 15 test cases while stock Copilot passed zero.

X

Don't miss out!

Subscribe for the latest news and updates.