Filter
Exclude
Time range
-
Near
8๏ธโƒฃ ๐—”๐˜‚๐˜๐—ผ๐—™๐—ถ๐˜…๐˜๐˜‚๐—ฟ๐—ฒ Produces unrealistic, hard to understand tests with randomly-generated data. ๐Ÿ‘‰ Better choice: Bogus 9๏ธโƒฃ ๐—ก๐—ฆ๐˜‚๐—ฏ๐˜€๐˜๐—ถ๐˜๐˜‚๐˜๐—ฒ Its syntax uses the original interface, leading to confusing, unclear tests. ๐Ÿ‘‰ Better choice: Moq ๐Ÿ”Ÿ ๐—ก๐—จ๐—ป๐—ถ๐˜ Older, verbose framework with outdated practices. ๐Ÿ‘‰ Better choice: xUnit Which harmful packages are you still using in your projects? Drop in the comment below! ๐Ÿ‘‡ โ€”โ€” โ™ป๏ธ Repost to help your network learn about harmful NuGet packages โž• Follow me ( @AntonMartyniuk ) to improve your .NET and Architecture Skills
3
1
9
683
Replying to @DevLeaderCa
My stack nowadays is: - xunit - nsubstitute - awesomeassertions - autofixture - testcontainers respawn for db-related tests - playwright for e2e if needed - xunit.combinatorial if I need it for more paramtetized cases - stryker for mutation tests when I have the time
1
11
484
Developers who say they don't have time for tests Are lying. Seriosly ๐Ÿ‘‡ Many .NET developers write code for months without a single test. Most say - I don't have time or a budget for tests But in the age of AI... It's never been easier and faster to write any kind of tests. You need to have a good template for your tests. And the AI will follow. โš ๏ธSo, no more excuses for not writing tests. I created a 2026 Testing Cheatsheet that covers everything you need. Save this post. You will thank me later. ๐Ÿ“Œ Testing Frameworks โ€ข xUnit โ€ข TUnit โ€ข NUnit ๐Ÿ“Œ Assertions โ€ข xUnit Assertions โ€ข Shouldly โ€ข FluentAssertions (is now paid) ๐Ÿ“Œ Integration Testing โ€ข Testing with .NET Aspire โ€ข WebApplicationFactory TestContainers โ€ข Respawn ๐Ÿ“Œ Frontend Testing โ€ข Playwright โ€ข Selenium ๐Ÿ“Œ Mocking โ€ข NSubstitute โ€ข Moq ๐Ÿ“Œ Fake Data โ€ข Bogus โ€ข AutoFixture ๐Ÿ“Œ Snapshot Testing โ€ข Verify ๐Ÿ“Œ Behaviour Testing โ€ข ReqNRoll โ€ข SpecFlow (not maintained anymore) ๐Ÿ“Œ Performance Testing โ€ข BenchmarkDotNet โ€ข k6 โ€ข NBomber (paid for commercial usage) โ€ข JMeter Here is what I recommend in 2026: โœ… xUnit remains the most popular testing framework โœ… TUnit is a modern alternative worth exploring โœ… Shouldly is my go-to for readable assertions โœ… NSubstitute has the cleanest mocking API โœ… Bogus makes generating fake data easy โœ… Aspire provides the easiest way to write integration tests โœ… TestContainers spins up real databases in your tests โœ… Respawn resets your database between integration tests โœ… Playwright is the best choice for frontend testing today โœ… BenchmarkDotNet is the standard for micro-benchmarking in .NET โœ… k6 is excellent for load testing APIs โœ… NBomber allows you to reuse existing C# code for load tests โŒ Avoid **SpecFlow** โ†’ it is no longer maintained โŒ Be aware **FluentAssertions** is now a paid library ๐Ÿ‘‰ You don't need every tool on this list. Here is your plan for adopting tests: 1. Unit Tests 2. Integration tests. 3. Load (performance) tests 4. Frontend (E2E) tests ๐Ÿ“Œ I have created a free guide for you on integration testing in Aspire: antondevtips.com/blog/dotnetโ€ฆ Which testing tools are you using in 2026? Share in the comments ๐Ÿ‘‡ โ€”โ€” โ™ป๏ธ Repost to help other .NET developers write better tests โž• Follow me ( @AntonMartyniuk ) to improve your .NET and Architecture Skills
4
16
99
3,132
Atรฉ agora vendo sobre testes de integraรงรฃo com AutoFixture, MongoDBFixture & Bogus utilizando padrรฃo AAA. Estava odiando no comeรงo, agora odeio menos ๐Ÿค“ literalmente sou este esquilo no momento
6
499
Replying to @AntonMartyniuk
1. Mapperly! 4. Awesome Assertions is also an alternative. 6. Sometimes you really need the power of not default DI container. 8. Their philosophy is slightly different. Bogus is documented even worse than AutoFixture.
1
2
452
๐—ง๐—ผ๐—ฝ ๐Ÿญ๐Ÿฌ ๐—บ๐—ผ๐˜€๐˜ ๐—ต๐—ฎ๐—ฟ๐—บ๐—ณ๐˜‚๐—น ๐—ก๐˜‚๐—š๐—ฒ๐˜ ๐—ฝ๐—ฎ๐—ฐ๐—ธ๐—ฎ๐—ด๐—ฒ๐˜€ ๐˜†๐—ผ๐˜‚'๐—ฟ๐—ฒ ๐˜‚๐˜€๐—ถ๐—ป๐—ด ๐˜„๐—ถ๐˜๐—ต๐—ผ๐˜‚๐˜ ๐—ฟ๐—ฒ๐—ฎ๐—น๐—ถ๐˜‡๐—ถ๐—ป๐—ด ๐—ถ๐˜! You might think these popular .NET packages make your life easier โ€” but they often introduce hidden issues ๐Ÿ‘‡ 1๏ธโƒฃ ๐—”๐˜‚๐˜๐—ผ๐— ๐—ฎ๐—ฝ๐—ฝ๐—ฒ๐—ฟ Encourages overly-complex mapping logic hidden behind profiles. AutoMapper is slow and makes debugging almost impossible. ๐Ÿ‘‰ Better choice: Manual mapping 2๏ธโƒฃ ๐— ๐—ฒ๐—ฑ๐—ถ๐—ฎ๐˜๐—ฅ Adds unnecessary reflection overhead and complexity. ๐Ÿ‘‰ Better choice: Own manual handlers 3๏ธโƒฃ ๐—ก๐—ฒ๐˜„๐˜๐—ผ๐—ป๐˜€๐—ผ๐—ณ๐˜.๐—๐˜€๐—ผ๐—ป Heavy and slower compared to newer, built-in options. ๐Ÿ‘‰ Better choice: System.Text.Json 4๏ธโƒฃ ๐—™๐—น๐˜‚๐—ฒ๐—ป๐˜๐—”๐˜€๐˜€๐—ฒ๐—ฟ๐˜๐—ถ๐—ผ๐—ป๐˜€ Now has a paid license for commercial use. ๐Ÿ‘‰ Better choice: Shouldly or xUnit assertions 5๏ธโƒฃ ๐—ฅ๐—ฒ๐˜€๐˜๐—ฆ๐—ต๐—ฎ๐—ฟ๐—ฝ Has become outdated and less intuitive compared to modern HTTP clients. ๐Ÿ‘‰ Better choice: Refit 6๏ธโƒฃ ๐—”๐˜‚๐˜๐—ผ๐—™๐—ฎ๐—ฐ Outdated DI container adding unnecessary complexity. ๐Ÿ‘‰ Better choice: Microsoft DI 7๏ธโƒฃ NServiceBus Expensive licensing model in production and complex setup. ๐Ÿ‘‰ Better choice: MassTransit, Wolverine 8๏ธโƒฃ ๐—”๐˜‚๐˜๐—ผ๐—™๐—ถ๐˜…๐˜๐˜‚๐—ฟ๐—ฒ Produces unrealistic, hard to understand tests with randomly-generated data. ๐Ÿ‘‰ Better choice: Bogus 9๏ธโƒฃ ๐—ก๐—ฆ๐˜‚๐—ฏ๐˜€๐˜๐—ถ๐˜๐˜‚๐˜๐—ฒ Its syntax uses the original interface, leading to confusing, unclear tests. ๐Ÿ‘‰ Better choice: Moq ๐Ÿ”Ÿ ๐—ก๐—จ๐—ป๐—ถ๐˜ Older, verbose framework with outdated practices. ๐Ÿ‘‰ Better choice: xUnit Which harmful packages are you still using in your projects? Drop in the comment below! ๐Ÿ‘‡ โ™ป๏ธ Repost to help your network learn about harmful NuGet packages โž• Follow me (@AntonMartyniuk) for more #Dotnet
11
17
120
10,883
.๐—ก๐—˜๐—ง ๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ ๐—ฅ๐—ผ๐—ฎ๐—ฑ๐—บ๐—ฎ๐—ฝ ๐—ณ๐—ผ๐—ฟ ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฑ. I have been coding in C# for more than 15 years now, and I am often asked how to learn C#/.NET development, what learning resources to use, etc. Here's a roadmap to master C# / .NET development. ๐Ÿ“‚ ๐—ก๐—˜๐—ง ๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ ๐—ฅ๐—ผ๐—ฎ๐—ฑ๐—บ๐—ฎ๐—ฝ โˆŸ๐Ÿ“‚ C# โ””๐Ÿ“„ Learn basics of C# 6 - 13 โ””๐Ÿ“„ Learn .NET 8 and .NET 9 โ””๐Ÿ“„ Learn dotnet CLI โˆŸ๐Ÿ“‚ General Development skills โ””๐Ÿ“„ Learn Git โ””๐Ÿ“„ Learn HTTP/HTTPS โ””๐Ÿ“„ Learn data structures and algorithms โ””๐Ÿ“„ Learn SOLID, YAGNI, DRY, KISS principles โ””๐Ÿ“„ Learn Design Patterns โˆŸ๐Ÿ“‚ ASP. NET Core โ””๐Ÿ“„ MVC โ””๐Ÿ“‚ APIs โ””๐Ÿ“„ REST โ””๐Ÿ“„ GraphQL โ””๐Ÿ“„ gRPC โ””๐Ÿ“„ Web APIs โ””๐Ÿ“„ Minimal APIs โ””๐Ÿ“„ Middlewares โ””๐Ÿ“„ Filters & Attributes โ””๐Ÿ“„ Authentication & Authorisation โˆŸ๐Ÿ“‚ Client-Side .NET โ””๐Ÿ“„ Razor โ””๐Ÿ“„ Blazor โ””๐Ÿ“„ .NET MAUI โˆŸ๐Ÿ“‚ Databases โ””๐Ÿ“„ Database design & SQL โ””๐Ÿ“„ Stored procedures โ””๐Ÿ“‚ DBMS โ””๐Ÿ“‚ Relational โ””๐Ÿ“„ SQL Server โ””๐Ÿ“„ Postrges โ””๐Ÿ“„ MySQL/MariaDB โ””๐Ÿ“‚ NoSQL โ””๐Ÿ“„ MongoDB โ””๐Ÿ“„ RavenDB โ””๐Ÿ“„ CosmosDB โˆŸ๐Ÿ“‚ ORM โ””๐Ÿ“‚ Entity Framework Core โ””๐Ÿ“„ Learn basics โ””๐Ÿ“„ Code first & migrations โ””๐Ÿ“„ Change tracker API โ””๐Ÿ“„ Lazy/eager loading โˆŸ๐Ÿ“‚ Caching โ””๐Ÿ“„ Memory Cache โ””๐Ÿ“„ Redis โ””๐Ÿ“„ Application-level โˆŸ๐Ÿ“‚ Logging โ””๐Ÿ“„ Serilog โ””๐Ÿ“„ NLog โˆŸ๐Ÿ“‚ Real-time communication โ””๐Ÿ“„ SignalR Core โ””๐Ÿ“„ Web Sockets โˆŸ๐Ÿ“‚ Background tasks โ””๐Ÿ“„ Native Backround Service โ””๐Ÿ“„ HangFire โ””๐Ÿ“„ Quartz โˆŸ๐Ÿ“‚ Object Mapping โ””๐Ÿ“„ AutoMapper โ””๐Ÿ“„ Mapster โˆŸ๐Ÿ“‚ Testing โ””๐Ÿ“‚ Unit Testing โ””๐Ÿ“‚ Frameworks โ””๐Ÿ“„ xUnit โ””๐Ÿ“„ NUnit โ””๐Ÿ“‚ Mocking โ””๐Ÿ“„ NSubstitute โ””๐Ÿ“„ Moq โ””๐Ÿ“‚ Assertion โ””๐Ÿ“„ FluentAssertions โ””๐Ÿ“‚ Test Data Generators โ””๐Ÿ“„ Bogus โ””๐Ÿ“„ AutoFixture โ””๐Ÿ“‚ Integration Testing โ””๐Ÿ“„ WebApplicationFactory โ””๐Ÿ“„ TestServer โ””๐Ÿ“‚ Snapshot Testing โ””๐Ÿ“„ Verify โ””๐Ÿ“‚ End-to-End Testing โ””๐Ÿ“„ Playwright โ””๐Ÿ“‚ Performance Testing โ””๐Ÿ“„ K6 โ””๐Ÿ“„ JMeter โˆŸ๐Ÿ“‚ Monitoring & Telemetry โ””๐Ÿ“„ OpenTelemetry (Jeager) โ””๐Ÿ“„ Prometheus โ””๐Ÿ“„ Grafana โ””๐Ÿ“„ ELK Stack โ””๐Ÿ“„ Datadog โˆŸ๐Ÿ“‚ Cloud โ””๐Ÿ“„ Azure โ””๐Ÿ“„ AWS โˆŸ๐Ÿ“‚ Continous integration & delivery โ””๐Ÿ“„ GitHub actions โ””๐Ÿ“„ GitLab CI โ””๐Ÿ“„ Azure Pipelines โ””๐Ÿ“„ Jenkins โˆŸ๐Ÿ“‚ .NET Libraries โ””๐Ÿ“„ MediatR โ””๐Ÿ“„ Polly โ””๐Ÿ“„ FluentValidation ๐Ÿ‘‰ Check my complete .NET Developer roadmap with other learning resources in my Ultimate .NET Bundle: patreon.com/techworld_with_mโ€ฆ. (Use 64E76 code for 39% off until the end of the week) #technology #softwarengineering #programming #charp #dotnet
1
12
67
4,085
In this post, @KyleMcMaster shows us how to use AutoFixture to generate test data and how it can help you write better tests: bit.ly/4d1Bw1I #TestDrivenDevelopment #TDD

1
42
Replying to @fjzeit @slimjimmy
Guard classes using FluentAssertions please. Config via IOptions<T>. Add unit and integration tests. Use Moq for all the DI stuff, FluentAssertions, AutoFixture We're several hundred lines of code in and the tests fail.... Oh, we forgot the 5 lines that actually send the email.
1
3
32
.๐—ก๐—˜๐—ง ๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ ๐—ฅ๐—ผ๐—ฎ๐—ฑ๐—บ๐—ฎ๐—ฝ ๐—ณ๐—ผ๐—ฟ ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฐ. I have been coding in C# for over 15 years and am often asked how to learn C#/.NET development, what learning resources to use, etc. Here's a roadmap to Master C# / .NET development. ๐Ÿ“‚ ๐—ก๐—˜๐—ง ๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ ๐—ฅ๐—ผ๐—ฎ๐—ฑ๐—บ๐—ฎ๐—ฝ โˆŸ๐Ÿ“‚ C# โ””๐Ÿ“„ Learn basics of C# 6 - 13 โ””๐Ÿ“„ Learn .NET 8 and .NET 9 โ””๐Ÿ“„ Learn dotnet CLI โˆŸ๐Ÿ“‚ General Development skills โ””๐Ÿ“„ Learn Git โ””๐Ÿ“„ Learn HTTP/HTTPS โ””๐Ÿ“„ Learn data structures and algorithms โ””๐Ÿ“„ Learn SOLID, YAGNI, DRY, KISS principles โ””๐Ÿ“„ Learn Design Patterns โˆŸ๐Ÿ“‚ ASP. NET Core โ””๐Ÿ“„ MVC โ””๐Ÿ“‚ APIs โ””๐Ÿ“„ REST โ””๐Ÿ“„ GraphQL โ””๐Ÿ“„ gRPC โ””๐Ÿ“„ Web APIs โ””๐Ÿ“„ Minimal APIs โ””๐Ÿ“„ Middlewares โ””๐Ÿ“„ Filters & Attributes โ””๐Ÿ“„ Authentication & Authorisation โˆŸ๐Ÿ“‚ Client-Side .NET โ””๐Ÿ“„ Razor โ””๐Ÿ“„ Blazor โ””๐Ÿ“„ .NET MAUI โˆŸ๐Ÿ“‚ Databases โ””๐Ÿ“„ Database design & SQL โ””๐Ÿ“„ Stored procedures โ””๐Ÿ“‚ DBMS โ””๐Ÿ“‚ Relational โ””๐Ÿ“„ SQL Server โ””๐Ÿ“„ Postrges โ””๐Ÿ“„ MySQL/MariaDB โ””๐Ÿ“‚ NoSQL โ””๐Ÿ“„ MongoDB โ””๐Ÿ“„ RavenDB โ””๐Ÿ“„ CosmosDB โˆŸ๐Ÿ“‚ ORM โ””๐Ÿ“‚ Entity Framework Core โ””๐Ÿ“„ Learn basics โ””๐Ÿ“„ Code first & migrations โ””๐Ÿ“„ Change tracker API โ””๐Ÿ“„ Lazy/eager loading โˆŸ๐Ÿ“‚ Caching โ””๐Ÿ“„ Memory Cache โ””๐Ÿ“„ Redis โ””๐Ÿ“„ Application-level โˆŸ๐Ÿ“‚ Logging โ””๐Ÿ“„ Serilog โ””๐Ÿ“„ NLog โˆŸ๐Ÿ“‚ Real-time communication โ””๐Ÿ“„ SignalR Core โ””๐Ÿ“„ Web Sockets โˆŸ๐Ÿ“‚ Background tasks โ””๐Ÿ“„ Native Backround Service โ””๐Ÿ“„ HangFire โ””๐Ÿ“„ Quartz โˆŸ๐Ÿ“‚ Object Mapping โ””๐Ÿ“„ AutoMapper โ””๐Ÿ“„ Mapster โˆŸ๐Ÿ“‚ Testing โ””๐Ÿ“‚ Unit Testing โ””๐Ÿ“‚ Frameworks โ””๐Ÿ“„ xUnit โ””๐Ÿ“„ NUnit โ””๐Ÿ“‚ Mocking โ””๐Ÿ“„ NSubstitute โ””๐Ÿ“„ Moq โ””๐Ÿ“‚ Assertion โ””๐Ÿ“„ FluentAssertions โ””๐Ÿ“‚ Test Data Generators โ””๐Ÿ“„ Bogus โ””๐Ÿ“„ AutoFixture โ””๐Ÿ“‚ Integration Testing โ””๐Ÿ“„ WebApplicationFactory โ””๐Ÿ“„ TestServer โ””๐Ÿ“‚ Snapshot Testing โ””๐Ÿ“„ Verify โ””๐Ÿ“‚ End-to-End Testing โ””๐Ÿ“„ Playwright โ””๐Ÿ“‚ Performance Testing โ””๐Ÿ“„ K6 โ””๐Ÿ“„ JMeter โˆŸ๐Ÿ“‚ Monitoring & Telemetry โ””๐Ÿ“„ OpenTelemetry (Jeager) โ””๐Ÿ“„ Prometheus โ””๐Ÿ“„ Grafana โ””๐Ÿ“„ ELK Stack โ””๐Ÿ“„ Datadog โˆŸ๐Ÿ“‚ Cloud โ””๐Ÿ“„ Azure โ””๐Ÿ“„ AWS โˆŸ๐Ÿ“‚ Continous integration & delivery โ””๐Ÿ“„ GitHub actions โ””๐Ÿ“„ GitLab CI โ””๐Ÿ“„ Azure Pipelines โ””๐Ÿ“„ Jenkins โˆŸ๐Ÿ“‚ .NET Libraries โ””๐Ÿ“„ MediatR โ””๐Ÿ“„ Polly โ””๐Ÿ“„ FluentValidation Is anything missing? #programming #charp #dotnet
14
110
607
52,255
Love autofixture
2
25
Replying to @DevLeaderCa
xUnit, Moq, FluentAssertions, Autofixture, Autofixture Automoq
2
8
607
27 Jul 2024
TDD in golang is TeeDDiious Not sure if there a mocking and autofixture libraries but everything is so long. Might be worth grouping with other devs to do something similar to Moq and AutoFixture that C# has to make life eaiser. @anthdm wdyt any tips.
1
34
Replying to @kzu
I just edit the test and switch Fact to Theory and add a [RepeatAttribute(1000)] - usually 1,000 iterations is enough to find the bug. Hack: Use CsCheck instead of frameworks like AutoFixture, and shrink your bug repro down to a well-defined bad input that breaks the test.
1
2
50
In this post, @KyleMcMaster shows us how to use AutoFixture to generate test data and how it can help you write better tests: bit.ly/3t4hClT #TestDrivenDevelopment #TDD

2
2
219
A lot of people do use Autofac, Moq, Autofixture etc... but this doesn't really meet the standards of being able create humanizer quality code without a lot of setup and teardown. Instead just have the ai do that for you, authorize the specific area the user has authroization for, and then only that data and those methods can be debugged. You keep iterating iteratively until you uncover the necessary breadth of the bug or feature, then you update the ticket to explain the correct scope, environment, set of classes and methods, get approval from like a lead or senior dev, then tackle the problem. Then once the work is complete then your senior dev can verify the code solution matches the expectation. Establed your earned value, actual value relationship and estimated values roughly match and complete the ticket.
The other prominent part of this, considering AI advancements, would be to create an air gap of AI LLMs to handle loading in data on prod, removing any personal info or PII, and then also activating the repository or context to perform the interface between developer and the environment back and forth data transfers and still solve the bug issue without compromising some compliance issue or security issue. I can tell you right now this is about 2 years away at least.
65
Replying to @Dave_DotNet
I would rather go with something like AutoFixture. Writing all these builders just to get a nicer syntax to setup test data seems like too much work for me.
1
2
307
Blogged: Using AutoFixture with EF Core without circular references This will be part of a series of a few posts that detail some helpful practices when writing tests that involve EF Core. #dotnet daninacan.com/using-autofixtโ€ฆ

1
1
1
108
Replying to @Dave_DotNet
Moq AutoFixture Have used Telerik's JustMock as well ... NSubstitute looks almost identical to Moq, with a couple of less lines. I just wonder how else the two compare
1
3
146
In this post, @KyleMcMaster shows us how to use AutoFixture to generate test data and how it can help you write better tests: bit.ly/3t4hClT #TestDrivenDevelopment #TDD

2
2
982