<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/from-generated-code-to-trusted-code-with-a-unit-test-agent-ipcxebvho" -->

---
title: From generated code to trusted code with a unit-test agent
description: Microsoft&#x27;s .NET team built an open-source polyglot unit-test agent called code-testing-generator, available in the dotnet/skills repository. Unlike a plain...
canonical: https://daily.dev/posts/from-generated-code-to-trusted-code-with-a-unit-test-agent-ipcxebvho
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: From generated code to trusted code with a unit-test agent | daily.dev
og:description: Microsoft&#x27;s .NET team built an open-source polyglot unit-test agent called code-testing-generator, available in the dotnet/skills repository. Unlike a plain...
og:url: https://daily.dev/posts/from-generated-code-to-trusted-code-with-a-unit-test-agent-ipcxebvho
og:image: https://api.daily.dev/og/posts/IpcxeBvhO.png
og:image:alt: From generated code to trusted code with a unit-test agent
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.

# From generated code to trusted code with a unit-test agent

**[.NET Blog](https://daily.dev/sources/dotnet)** · 9 min read · 14 upvotes · 2 comments

## Summary

Microsoft's .NET team built an open-source polyglot unit-test agent called code-testing-generator, available in the dotnet/skills repository. Unlike a plain Copilot prompt, the agent first learns the repository's language, test framework, conventions, and build commands before writing tests. It selects one of three execution paths (direct, single-pass, or iterative) based on task scope, then validates tests with lightweight mutation testing, assertion checks, and a full CI-compatible test run. Benchmarked against 152 internal tasks, the specialized agent achieved a 92.1% completion rate versus 78.9% for stock GitHub Copilot, with 63% fewer failures — gains concentrated on vague prompts. It supports .NET, Python, Go, TypeScript, Java, Rust, and more, and is usable today via GitHub Copilot CLI and VS Code.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://devblogs.microsoft.com/dotnet/polyglot-unit-testing-agent>

## Questions this post answers

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

It is an open-source polyglot agent in the dotnet/skills repository that learns a repository's language, test framework, and conventions before writing unit tests, then validates that the tests build, pass, and are discoverable by the repo's test runner. In benchmarks it completed 92.1% of 152 tasks versus 78.9% for stock GitHub Copilot using the same model, with the largest gains on vague prompts.

_Developers automating test generation can track new agent releases like this one on daily.dev._

### How much does a specialized unit-test agent help compared to stock Copilot when the prompt is vague?

On vague prompts such as 'generate unit tests,' the specialized agent passed 79 of 89 tasks (88.8%) compared to 59 of 89 (66.3%) for stock GitHub Copilot, a 67% reduction in failures. On detailed prompts specifying exactly what to test, both setups tied at 96.8%, showing the agent's value comes from filling in decisions a vague prompt leaves open.

_Teams weighing agent workflows for testing can follow benchmark results like these on daily.dev._

### Does the code-testing-generator agent work well for languages other than C# and .NET?

Yes, using Claude Opus 4.8, the agent passed all 15 Go tasks (100%) versus 10 for stock Copilot, and 13 of 15 Python tasks (86.7%) versus 6 for stock Copilot. It underperformed slightly on PowerShell, passing 7 of 10 tasks versus 8 for stock Copilot, showing gains vary by language rather than being uniform.

_Developers choosing a testing agent across polyglot codebases can compare results like these on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@luispsarmiento** · 0 upvotes

> It sounds like a very good tool to validate and test our code or the code generated by agentic code tools.

**@pdfopsdev** · 0 upvotes

> 92% vs 79% completion is a solid number but the more interesting stat buried in there is 63% fewer failures concentrated on vague prompts, that's the actual signal a repo-aware agent beats a generic Copilot call. mutation testing as the validation step instead of just checking for green CI is the right call too, plenty of agents ship tests that pass but don't actually assert anything.

## 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: [#testing](https://daily.dev/tags/testing), [#github](https://daily.dev/tags/github), [#ai-agents](https://daily.dev/tags/ai-agents), [#.net](https://daily.dev/tags/.net)

[View this post on daily.dev](https://daily.dev/posts/from-generated-code-to-trusted-code-with-a-unit-test-agent-ipcxebvho)

```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":"From generated code to trusted code with a unit-test agent","url":"https://daily.dev/posts/from-generated-code-to-trusted-code-with-a-unit-test-agent-ipcxebvho","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/from-generated-code-to-trusted-code-with-a-unit-test-agent-ipcxebvho"},"datePublished":"2026-07-31T15:00:58.488Z","dateModified":"2026-09-13T18:41:54.763Z","description":"Microsoft's .NET team built an open-source polyglot unit-test agent called code-testing-generator, available in the dotnet/skills repository. Unlike a plain...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/612b9f35e615bd792459629e4463331d?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/612b9f35e615bd792459629e4463331d?_a=AQAEuop","isAccessibleForFree":true,"articleSection":".NET Blog","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":".NET Blog","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/f23eb59371bd4f07aeef64c4eef73266","url":"https://daily.dev/sources/dotnet"},"commentCount":2,"discussionUrl":"https://daily.dev/posts/from-generated-code-to-trusted-code-with-a-unit-test-agent-ipcxebvho","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":14},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"keywords":"testing,github,ai-agents,.net","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":".NET Blog","item":"https://daily.dev/sources/dotnet"},{"@type":"ListItem","position":3,"name":"From generated code to trusted code with a unit-test agent"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/from-generated-code-to-trusted-code-with-a-unit-test-agent-ipcxebvho","comment":[{"@type":"Comment","text":"It sounds like a very good tool to validate and test our code or the code generated by agentic code tools.","datePublished":"2026-08-01T05:24:32.261Z","url":"https://daily.dev/posts/IpcxeBvhO#c-tu7TldABD","author":{"@type":"Person","name":"Luis Puc","url":"https://daily.dev/luispsarmiento","image":"https://avatars.githubusercontent.com/u/25454970?v=4"}},{"@type":"Comment","text":"92% vs 79% completion is a solid number but the more interesting stat buried in there is 63% fewer failures concentrated on vague prompts, that’s the actual signal a repo-aware agent beats a generic Copilot call. mutation testing as the validation step instead of just checking for green CI is the right call too, plenty of agents ship tests that pass but don’t actually assert anything.","datePublished":"2026-08-02T18:15:39.833Z","url":"https://daily.dev/posts/IpcxeBvhO#c-qzohyYhqL","author":{"@type":"Person","name":"PDFops","url":"https://daily.dev/pdfopsdev","image":"https://media.daily.dev/image/upload/s---8isRBKc--/f_auto/v1782922291/avatars/avatar_orjMeK8QKaaVZwGq7ScPz?_a=BAMAMicg0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/from-generated-code-to-trusted-code-with-a-unit-test-agent-ipcxebvho#faq","mainEntity":[{"@type":"Question","name":"What is the code-testing-generator agent and how does it improve on asking Copilot to generate unit tests?","acceptedAnswer":{"@type":"Answer","text":"It is an open-source polyglot agent in the dotnet/skills repository that learns a repository's language, test framework, and conventions before writing unit tests, then validates that the tests build, pass, and are discoverable by the repo's test runner. In benchmarks it completed 92.1% of 152 tasks versus 78.9% for stock GitHub Copilot using the same model, with the largest gains on vague prompts. Developers automating test generation can track new agent releases like this one on daily.dev."}},{"@type":"Question","name":"How much does a specialized unit-test agent help compared to stock Copilot when the prompt is vague?","acceptedAnswer":{"@type":"Answer","text":"On vague prompts such as 'generate unit tests,' the specialized agent passed 79 of 89 tasks (88.8%) compared to 59 of 89 (66.3%) for stock GitHub Copilot, a 67% reduction in failures. On detailed prompts specifying exactly what to test, both setups tied at 96.8%, showing the agent's value comes from filling in decisions a vague prompt leaves open. Teams weighing agent workflows for testing can follow benchmark results like these on daily.dev."}},{"@type":"Question","name":"Does the code-testing-generator agent work well for languages other than C# and .NET?","acceptedAnswer":{"@type":"Answer","text":"Yes, using Claude Opus 4.8, the agent passed all 15 Go tasks (100%) versus 10 for stock Copilot, and 13 of 15 Python tasks (86.7%) versus 6 for stock Copilot. It underperformed slightly on PowerShell, passing 7 of 10 tasks versus 8 for stock Copilot, showing gains vary by language rather than being uniform. Developers choosing a testing agent across polyglot codebases can compare results like these on daily.dev."}}]}
```

