testing
xUnit for C# and .NET Articles, Tutorials & News
xUnit for C# and .NET articles, tutorials, and news from the DotNetNews archive.
16 articles Updated
This DotNetNews topic collects xUnit C# material from the daily archive. xUnit for C# and .NET is the verification side of C# delivery, from unit suites to the habits that keep regressions cheap. The page is for people who already ship C# and need a faster way to find relevant posts.
Expect publisher tutorials, release notes, architecture write-ups, and field notes linked from DotNetNews issues. Start here is a short editorial shortlist for xUnit for C# and .NET; the archive list is chronological and larger. Nothing here claims every article was production-tested by the editors.
Recurring subtopics in recent issues include xUnit C#, xUnit.net, xUnit ASP.NET Core, and xUnit theories. Secondary angles such as xUnit C# and xUnit.net appear when the archive actually covered them. Related hubs such as C# and .NET Unit Testing and Test-Driven Development in C# cover adjacent problems.
Each card points at the original publisher URL and the DotNetNews issue that carried it, so you can read the article in context or jump straight to the source.
Start here
Editor picks for xUnit.net
-
How to Implement Unit Testing in .NET using xUnit with Example
c-sharpcorner.com Issue #439
A practical xUnit primer that fits newer .NET developers and teams trying to build better testing habits before bugs escape into production.
-
Use fixtures in xUnit for shared context in unit tests
roundthecode.com Issue #309
Learn how to use xUnit fixtures like IClassFixture and ICollectionFixture to share setup and context across your unit tests efficiently.
-
Using AI to Generate Better Unit Tests for Bug Reproduction in .NET
blog.stackademic.com Issue #495
Interesting use of AI for reproducing bugs through tests, where the value is reliability more than novelty.
-
No more regressions with Snapshot Tests in C# using Verify: a practical guide
code4it.dev Issue #493
Snapshot testing still feels underused in .NET. Verify can be a sharp tool when you need confidence during refactors.
-
HackerRank: Mini Max Sum Solution in C#
davutdursun.medium.com Issue #196
Mini Max Sum is a classic HackerRank warmup, but it still makes a decent test of clean problem-solving habits.
-
Comprehensive Guide to Unit Testing with MSTest in C#
c-sharpcorner.com Issue #173
MSTest remains relevant, and this guide is a solid reminder to keep tests focused and maintainable.
-
The Best Way to Write Parameterized Tests in .NET Using xUnit (Clean, Fast, and Not Annoying)
medium.com Issue #335
A clean xUnit parameterized-testing approach is worth reading if you want less ceremony and more readable test cases.
-
Choosing the Right Testing Framework for .NET: XUnit, MSTest, or NUnit?
medium.com Issue #167
Framework comparisons are handy, but the best takeaway is choosing the test stack that fits your team’s habits.
Archive
Newest first
-
Using AI to Generate Better Unit Tests for Bug Reproduction in .NET
blog.stackademic.com Issue #495
Turn bug reports into reliable unit tests using the AI Continue reading on Stackademic »
-
No more regressions with Snapshot Tests in C# using Verify: a practical guide
code4it.dev Issue #493
Snapshot Tests are an uncommon type of test that focuses on checking that no regressions were introduced after a code refactoring. Let’s learn how they work and how to use the Verify NuGet libra...
-
How to Implement Unit Testing in .NET using xUnit with Example
c-sharpcorner.com Issue #439
Master .NET unit testing with xUnit! Learn to write effective tests, catch bugs early, and improve code quality. Includes practical examples and best practices.
-
The Best Way to Write Parameterized Tests in .NET Using xUnit (Clean, Fast, and Not Annoying)
medium.com Issue #335
If you want the full source code, join our community: Here
-
New dotnet test Experience with Microsoft.Testing.Platform
youtube.com Issue #330
.NET Aspire 13 — Simplified orchestration for cloud-native apps: https://aka.ms/aspire13/announcement Learn how the new platform works with popular testing frameworks like MSTest, NUnit, and xUnit.
-
11 Battle-Tested Tips for Unit Testing CQRS Handlers (with Moq, FluentAssertions, and xUnit) — from…
medium.com Issue #310
If you want the full source code, join our community: Here
-
Use fixtures in xUnit for shared context in unit tests
roundthecode.com Issue #309
Learn how to use xUnit fixtures like IClassFixture and ICollectionFixture to share setup and context across your unit tests efficiently. The page Use fixtures in xUnit for shared context in unit tests...
-
HackerRank: Mini Max Sum Solution in C#
davutdursun.medium.com Issue #196
https://davutdursun.medium.com/hackerrank-mini-max-sum-solution-in-c-34ea7855f256
-
Comprehensive Guide to Unit Testing with MSTest in C#
c-sharpcorner.com Issue #173
https://www.c-sharpcorner.com/article/comprehensive-guide-to-unit-testing-with-mstest-in-c-sharp/
-
Choosing the Right Testing Framework for .NET: XUnit, MSTest, or NUnit?
medium.com Issue #167
https://medium.com/c-sharp-programming/choosing-the-right-testing-framework-for-net-xunit-mstest-or-nunit-36037822dc92?source=rss------dotnet-5
-
xUnit Advanced Features: Fixtures
medium.com Issue #145
https://medium.com/@leogjorge/xunit-advanced-features-fixtures-6b0ca4d10469
-
Testing, performance, and architecture
DotNetNews Issue #107
A varied .NET roundup covering xUnit and Moq, encryption, middleware, C# 12 static lambdas, EF Core AutoInclude, Azure CLI, and Visual Studio.
-
JSON, AI, and ASP.NET Core tips
DotNetNews Issue #77
Issue #77 covers JSON choices, unit testing, OpenAI and Azure AI, ASP.NET Core middleware, Swagger, DDD, Blazor, and Cosmos DB tools.
-
Essential .NET libraries, logging, and testing
DotNetNews Issue #54
Issue 54 covers useful .NET libraries, ASP.NET Core logging patterns, xUnit combinatorial testing, ChatGPT API structured responses, and C# 12 metadata.
-
C# 13, .NET 9, auth & API versioning
DotNetNews Issue #40
Issue #40 covers C# 13 and .NET 9 features, ASP.NET Core API versioning, authorization patterns, xUnit v3, SQL Server ranking, and Hangfire.
-
EF Core, Blazor, API Versioning
DotNetNews Issue #33
Issue #33 covers EF Core, Blazor WebAssembly, API versioning, OAuth setup, Brotli compression, state management, and Copilot in Visual Studio.