Paul Krill
Editor at Large

Visual Studio adds GitHub Copilot unit testing for C#

news
Feb 12, 20262 mins

GitHub Copilot testing for .NET in Visual Studio 2026 v18.3 can generate tests for the xUnit, NUnit, and MSTest test frameworks.

Female Developer Thinking and Typing on Computer, Surrounded by Big Screens Showing Coding Language. Professional Programmer Working in an Office, Running Coding Tests. Futuristic Programming
Credit: Gorodenkoff / Shutterstock

Microsoft has made GitHub Copilot testing for .NET, a new capability in GitHub Copilot Chat that automates the testing of C# code, generally available in the just-released Visual Studio 2026 v18.3 IDE.

Microsoft announced the capability on February 11.

GitHub Copilot testing for .NET automates the creation, running, and testing of C# code for projects, files, classes, or members. It has built-in awareness of the developer’s solution structure, test frameworks, and build system and operates as an end-to-end testing workflow rather than a single-response prompt, Microsoft said. GitHub Copilot testing for .NET can generate tests for the xUnit, NUnit, and MSTest test frameworks.

When prompted with a testing request, GitHub Copilot testing generates unit tests scoped to the selected code, builds and runs the tests automatically, detects failures and attempts to fix them, and reruns the tests until a stable starting point is reached, according to Microsoft.

When test generation is completed, GitHub Copilot provides a structured summary to help developers understand what has been changed, Microsoft said. This summary includes test files and projects completed or modified, before-and-after coverage information, pass/fail signals and unstable cases, insights into testability gaps, and direct links to the generated tests for immediate review and iteration.

Additionally, GitHub Copilot testing for .NET now supports free-form prompting, making it easier for the developer to describe what to test. GitHub Copilot testing for .NET requires a paid GitHub Copilot license.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author