<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/microsoft-s-open-source-unit-test-agent-for-any-language-qnrzdaisk" -->

---
title: Microsoft&#x27;s open-source unit-test agent for any language
description: Microsoft&#x27;s .NET team has open-sourced code-testing-generator, an AI agent that writes and validates unit tests across multiple languages including .NET,...
canonical: https://daily.dev/posts/microsoft-s-open-source-unit-test-agent-for-any-language-qnrzdaisk
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Microsoft&#x27;s open-source unit-test agent for any language | daily.dev
og:description: Microsoft&#x27;s .NET team has open-sourced code-testing-generator, an AI agent that writes and validates unit tests across multiple languages including .NET,...
og:url: https://daily.dev/posts/microsoft-s-open-source-unit-test-agent-for-any-language-qnrzdaisk
og:image: https://api.daily.dev/og/posts/QnRzDAIsK.png
og:image:alt: Microsoft&#x27;s open-source unit-test agent for any language
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft's open-source unit-test agent for any language

**[Collections](https://daily.dev/sources/collections)** · 2 min read · 15 upvotes · 0 comments

## Summary

Microsoft's .NET team has open-sourced code-testing-generator, an AI agent that writes and validates unit tests across multiple languages including .NET, Python, Go, TypeScript, Java, and Rust. Unlike simple model prompting, it uses a 'research-plan-implement' (RPI) pipeline that first reads the repository to understand language, test framework, conventions, and build commands. It then selects one of three execution paths (direct, single-pass, or iterative) based on task complexity. Benchmarked against 152 internal tasks, it achieved a 92.1% completion rate versus 78.9% for plain GitHub Copilot, with 63% fewer failures overall. The agent is scoped to unit tests only and is available in the dotnet/skills GitHub repository, working with GitHub Copilot CLI and VS Code.

## Content

Microsoft's .NET team has released [code-testing-generator](https://github.com/dotnet/skills), an open-source agent that writes unit tests across more than a dozen languages. It's available now via GitHub Copilot CLI, with VS Code support in preview.

## What makes it different from a plain Copilot prompt

Asking Copilot to "generate unit tests" works, sort of. The new agent takes a different approach: before writing a single test, it scans the repository to detect the language, test framework, existing conventions, and build commands. Then it picks one of three execution paths based on scope:

- **Direct** — for small, well-defined tasks
- **Single-pass** — for medium-scope work
- **Iterative** — for larger or more ambiguous tasks

From there it writes tests incrementally, starting with simpler code paths and working toward complex dependencies. As it goes, it fixes compilation errors, avoids flaky patterns like real URLs or timing-sensitive assertions, and runs the full test suite to confirm everything passes.

The last step is lightweight mutation testing — deliberately breaking the code under test to verify the tests actually catch bugs, not just execute without failing.

## Benchmark results

Microsoft ran the agent against stock GitHub Copilot across 152 real-repository tasks:

| | code-testing-generator | Stock Copilot |
|---|---|---|
| Task completion | 92.1% | 78.9% |
| Failure reduction | 63% fewer | — |
| Speed | 5.5% faster | — |

The gap was sharpest on vague prompts (88.8% vs. 66.3%) and on diff-specific prompts, where the agent went 15-for-15 while stock Copilot went 0-for-15. Coverage and test count were roughly comparable — the agent produced slightly fewer tests at similar coverage, which suggests it's not padding output.

The workflow held up across Claude Opus 4.8, GPT-5.5, and Claude Haiku 4.5, so the gains aren't model-specific.

## Language support and limitations

The agent supports .NET, Python, Go, TypeScript, Java, Rust, and more. It's explicitly scoped to unit tests only — integration, end-to-end, browser, and performance tests are out of scope for now.

The repository is at [dotnet/skills](https://github.com/dotnet/skills) on GitHub.

## Questions this post answers

### What is Microsoft's code-testing-generator and how does it improve on asking Copilot to generate unit tests?

Code-testing-generator is an open-source agent from the .NET team that writes unit tests across more than a dozen languages, available via GitHub Copilot CLI with VS Code support in preview. Unlike a plain Copilot prompt, it first scans the repository to detect language, test framework, conventions, and build commands, then picks a direct, single-pass, or iterative execution path based on task scope before writing tests incrementally.

_Developers automating test coverage can follow daily.dev for updates on agent-based testing tools like this one._

### How does code-testing-generator compare to stock GitHub Copilot on unit test generation benchmarks?

Across 152 real-repository tasks, code-testing-generator completed 92.1% of tasks versus 78.9% for stock Copilot, with 63% fewer failures and 5.5% faster execution. The advantage was largest on vague prompts (88.8% vs 66.3%) and diff-specific prompts, where it succeeded 15 out of 15 times compared to stock Copilot's 0 out of 15. Results held across Claude Opus 4.8, GPT-5.5, and Claude Haiku 4.5.

_Teams weighing AI testing agents against baseline Copilot can track benchmark comparisons like this on daily.dev._

### What testing scope does Microsoft's code-testing-generator agent support and what is excluded?

The agent is explicitly scoped to unit tests only, supporting languages including .NET, Python, Go, TypeScript, Java, and Rust. Integration, end-to-end, browser, and performance testing are out of scope for now. It also runs lightweight mutation testing at the end, deliberately breaking code to confirm generated tests actually catch bugs rather than merely executing without failure.

_Anyone scoping which testing tasks to hand off to AI agents can follow tool capability updates on daily.dev._

## Similar posts on daily.dev

- [GitHub Copilot Testing for .NET Brings AI-powered Unit Tests to Visual Studio 2026](https://daily.dev/posts/github-copilot-testing-for-net-brings-ai-powered-unit-tests-to-visual-studio-2026-sj5p2ksw8) · ASP.NET Blog · 0 upvotes · 0 comments

---

Tags: [#microsoft](https://daily.dev/tags/microsoft), [#testing](https://daily.dev/tags/testing), [#github](https://daily.dev/tags/github), [#ai-agents](https://daily.dev/tags/ai-agents)

[View this post on daily.dev](https://daily.dev/posts/microsoft-s-open-source-unit-test-agent-for-any-language-qnrzdaisk)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Microsoft's open-source unit-test agent for any language","url":"https://daily.dev/posts/microsoft-s-open-source-unit-test-agent-for-any-language-qnrzdaisk","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/microsoft-s-open-source-unit-test-agent-for-any-language-qnrzdaisk"},"datePublished":"2026-08-06T23:39:14.219Z","dateModified":"2026-09-13T19:44:13.627Z","description":"Microsoft's .NET team has open-sourced code-testing-generator, an AI agent that writes and validates unit tests across multiple languages including .NET,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5cbf5ec53fb1e3e566e5a90266612193?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5cbf5ec53fb1e3e566e5a90266612193?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Collections","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collections","logo":"https://media.daily.dev/image/upload/s--fk_6ycEi--/f_auto,q_auto/v1780996001/logos/collections?_a=BAMAMiWQ0","url":"https://daily.dev/sources/collections"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/microsoft-s-open-source-unit-test-agent-for-any-language-qnrzdaisk","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":15},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"microsoft,testing,github,ai-agents","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collections","item":"https://daily.dev/sources/collections"},{"@type":"ListItem","position":3,"name":"Microsoft's open-source unit-test agent for any language"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/microsoft-s-open-source-unit-test-agent-for-any-language-qnrzdaisk#faq","mainEntity":[{"@type":"Question","name":"What is Microsoft's code-testing-generator and how does it improve on asking Copilot to generate unit tests?","acceptedAnswer":{"@type":"Answer","text":"Code-testing-generator is an open-source agent from the .NET team that writes unit tests across more than a dozen languages, available via GitHub Copilot CLI with VS Code support in preview. Unlike a plain Copilot prompt, it first scans the repository to detect language, test framework, conventions, and build commands, then picks a direct, single-pass, or iterative execution path based on task scope before writing tests incrementally. Developers automating test coverage can follow daily.dev for updates on agent-based testing tools like this one."}},{"@type":"Question","name":"How does code-testing-generator compare to stock GitHub Copilot on unit test generation benchmarks?","acceptedAnswer":{"@type":"Answer","text":"Across 152 real-repository tasks, code-testing-generator completed 92.1% of tasks versus 78.9% for stock Copilot, with 63% fewer failures and 5.5% faster execution. The advantage was largest on vague prompts (88.8% vs 66.3%) and diff-specific prompts, where it succeeded 15 out of 15 times compared to stock Copilot's 0 out of 15. Results held across Claude Opus 4.8, GPT-5.5, and Claude Haiku 4.5. Teams weighing AI testing agents against baseline Copilot can track benchmark comparisons like this on daily.dev."}},{"@type":"Question","name":"What testing scope does Microsoft's code-testing-generator agent support and what is excluded?","acceptedAnswer":{"@type":"Answer","text":"The agent is explicitly scoped to unit tests only, supporting languages including .NET, Python, Go, TypeScript, Java, and Rust. Integration, end-to-end, browser, and performance testing are out of scope for now. It also runs lightweight mutation testing at the end, deliberately breaking code to confirm generated tests actually catch bugs rather than merely executing without failure. Anyone scoping which testing tasks to hand off to AI agents can follow tool capability updates on daily.dev."}}]}
```

