# xUnit

Published articles for xUnit.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Making testing work better for AI driven development

DevFeed: [Making testing work better for AI driven development](<https://devfeed.tech/articles/making-testing-work-better-for-ai-driven-development-20426.md>)

Original publisher: [Read original article](<https://semaphore.io/blog/making-testing-work-better-for-ai-driven-development>)

Author: Pete Miloravac

Published: 2026-09-10T09:28:14Z

Content type: release

Language: en

Sources: [Semaphore Engineering](<https://devfeed.tech/sources/semaphore-engineering.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Development](<https://devfeed.tech/topics/development.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Test coverage](<https://devfeed.tech/topics/coverage.md>), [RSpec](<https://devfeed.tech/topics/rspec.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [flaky](<https://devfeed.tech/tags/flaky.md>), [framework](<https://devfeed.tech/tags/framework.md>), [product-news](<https://devfeed.tech/tags/product-news.md>), [test-coverage](<https://devfeed.tech/tags/test-coverage.md>), [testing](<https://devfeed.tech/tags/testing.md>), [xunit](<https://devfeed.tech/tags/xunit.md>)

### AI overview

Semaphore describes product work to make testing more useful for developers and AI agents. The update covers richer test reports from testing frameworks, signal-based flaky-test detection, and code-graph-based selection of tests affected by code changes.

### Source excerpt

AI agents can generate and modify code quickly. But when a test fails, speed is no longer enough. The agent needs enough context to understand what happened, why it happened, and whether the code or the test itself needs to change. In our latest product update, Marko Gaćeša is joined by Semaphore engineers Nick and [...] The post Making testing work better for AI driven development appeared first on Semaphore.

## Retry flaky tests with dotnet test and PowerShell

DevFeed: [Retry flaky tests with dotnet test and PowerShell](<https://devfeed.tech/articles/retry-flaky-tests-with-dotnet-test-and-powershell-20782.md>)

Original publisher: [Read original article](<https://conductofcode.io/post/retry-flaky-tests-with-dotnet-test-and-powershell/>)

Author: {"twitter"=\>"hlaueriksson"}

Published: 2023-03-26T19:00:00Z

Content type: tutorial

Language: en

Sources: [Henrik Lau Eriksson](<https://devfeed.tech/sources/henrik-lau-eriksson.md>)

Topics: [PowerShell](<https://devfeed.tech/topics/powershell.md>), [.NET](<https://devfeed.tech/topics/net.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Smoke Tests](<https://devfeed.tech/topics/smoke-tests.md>), [Playwright](<https://devfeed.tech/topics/playwright.md>), [Selenium](<https://devfeed.tech/topics/selenium.md>)

Tags: [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [cli](<https://devfeed.tech/tags/cli.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [dotnet](<https://devfeed.tech/tags/dotnet.md>), [flaky](<https://devfeed.tech/tags/flaky.md>), [jenkins](<https://devfeed.tech/tags/jenkins.md>), [mstest](<https://devfeed.tech/tags/mstest.md>), [nunit](<https://devfeed.tech/tags/nunit.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [powershell](<https://devfeed.tech/tags/powershell.md>), [retry](<https://devfeed.tech/tags/retry.md>), [selenium](<https://devfeed.tech/tags/selenium.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>), [xunit](<https://devfeed.tech/tags/xunit.md>)

### AI overview

This tutorial presents a PowerShell script that uses dotnet test and TRX result files to track failed tests, retry them, report the final result, and allow a configured percentage of failures. It demonstrates the script with NUnit, MSTest, and xUnit.

### Source excerpt

Introducing test.ps1, a script for running flaky tests - Keeps track of failing tests and retries them - Notifies the test framework of the current retry iteration - Makes it possible to accept a certain percentage of failing tests - Outputs the test result in a coherent way

## Automocking and the Dependency Inversion Principle

DevFeed: [Automocking and the Dependency Inversion Principle](<https://devfeed.tech/articles/automocking-and-the-dependency-inversion-principle-20775.md>)

Original publisher: [Read original article](<https://conductofcode.io/post/automocking-and-the-dependency-inversion-principle/>)

Author: {"twitter"=\>"hlaueriksson"}

Published: 2017-02-28T20:00:00Z

Content type: tutorial

Language: en

Sources: [Henrik Lau Eriksson](<https://devfeed.tech/sources/henrik-lau-eriksson.md>)

Topics: [Dependency Inversion](<https://devfeed.tech/topics/dependency-inversion.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [C#](<https://devfeed.tech/topics/csharp.md>), [IoC (Disambiguation)](<https://devfeed.tech/topics/ioc.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [client](<https://devfeed.tech/topics/client.md>)

Tags: [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [dependency-inversion](<https://devfeed.tech/tags/dependency-inversion.md>), [framework](<https://devfeed.tech/tags/framework.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [testing](<https://devfeed.tech/tags/testing.md>), [xunit](<https://devfeed.tech/tags/xunit.md>)

### AI overview

This tutorial explains how to adapt an automocking base class for C# code that uses internal classes. It shows how friend assemblies, public interfaces, an IoC container, and injected real or fake dependencies can support unit testing while preserving dependency inversion.

### Source excerpt

I had reason to revisit the automocked base class from a previous blog post. I am working with another code base and have new opportunities for automocking. We have a lot of internal classes. Approximately 30% of the classes are marked as internal. The old approach did not work anymore.

## Maintainability and Expect Literals

DevFeed: [Maintainability and Expect Literals](<https://devfeed.tech/articles/maintainability-and-expect-literals-31920.md>)

Original publisher: [Read original article](<http://blog.jayfields.com/2016/06/maintainability-and-expect-literals.html>)

Author: Jay (noreply@blogger.com)

Published: 2016-06-16T11:21:00Z

Content type: opinion

Language: en

Sources: [Jay Fields](<https://devfeed.tech/sources/jay-fields.md>)

Topics: [Maintainability](<https://devfeed.tech/topics/maintainability.md>), [unit test](<https://devfeed.tech/topics/unit-test.md>), [test](<https://devfeed.tech/topics/test.md>), [Code](<https://devfeed.tech/topics/code.md>), [function](<https://devfeed.tech/topics/function.md>), [formatting](<https://devfeed.tech/topics/formatting.md>)

Tags: [advice](<https://devfeed.tech/tags/advice.md>), [alternatives](<https://devfeed.tech/tags/alternatives.md>), [code](<https://devfeed.tech/tags/code.md>), [formatting](<https://devfeed.tech/tags/formatting.md>), [function](<https://devfeed.tech/tags/function.md>), [literals](<https://devfeed.tech/tags/literals.md>), [maintainability](<https://devfeed.tech/tags/maintainability.md>), [readability](<https://devfeed.tech/tags/readability.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [unit-test](<https://devfeed.tech/tags/unit-test.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>), [wewut](<https://devfeed.tech/tags/wewut.md>), [xunit](<https://devfeed.tech/tags/xunit.md>)

### AI overview

The author argues that literal expected values in unit tests improve readability and keep failures focused, while helper functions can broaden the scope of maintenance and couple tests. For changing or inconsistent strings, the article suggests duplication with bulk edits or testing variable-dependent behavior separately from formatting.

### Source excerpt

Recently, Stephen Schaub asked the following on the wewut group: Several of the unit test examples in the book verify the construction of both HTML and plain text strings. Jay recommends using literal strings in the assertions. However, this strikes me as not a particularly maintainable approach. If the requirements regarding the formatting of these strings changes (a very likely scenario), every single test that verifies one of these strings using a literal must be updated. Combined with the advice that each test should check only one thing, this leads to a large number of extremely brittle tests. Am I missing something here? I can appreciate the reasons Jay recommends using literals in the tests. However, it seems that we pay a high maintainability price in exchange for the improved readability. I responded to Stephen; however, I've seen similar questions asked a few times. Below are my extended thoughts regarding literals as expected values. In general, given the option of having many similar strings (or any literal) vs a helper function, I would always prefer the literal. When a test is failing I only care about that single failing test. If I have to look at the helper function I no longer have the luxury of staying focused on the single test; now I need to consider what the helper function is giving me and what it's giving all other callers. Suddenly the scope of my work has shifted from one test to all of the tests coupled by this helper function. If this helper function wasn't written by me, this expansion in scope wasn't even my decision, it was forced upon me by the helper function creator. In the best case the helper function could return a single, constant string. The scope expansion becomes even worse when the helper function contains code branches. As for alternatives, my solution would depend on the problem. If the strings were fairly consistent, I would likely simply duplicate everything knowing that any formatting changes can likely be addressed usin

## Test Driven Development

DevFeed: [Test Driven Development](<https://devfeed.tech/articles/test-driven-development-40749.md>)

Original publisher: [Read original article](<https://radek.io/posts/test-driven-development/>)

Published: 2012-02-10T00:00:00Z

Content type: opinion

Language: en

Sources: [Radek Pazdera](<https://devfeed.tech/sources/radek-pazdera.md>)

Topics: [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [Software](<https://devfeed.tech/topics/software.md>)

Tags: [book](<https://devfeed.tech/tags/book.md>), [design-patterns](<https://devfeed.tech/tags/design-patterns.md>), [development](<https://devfeed.tech/tags/development.md>), [junit](<https://devfeed.tech/tags/junit.md>), [refactor](<https://devfeed.tech/tags/refactor.md>), [regression](<https://devfeed.tech/tags/regression.md>), [review](<https://devfeed.tech/tags/review.md>), [tdd](<https://devfeed.tech/tags/tdd.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>), [xunit](<https://devfeed.tech/tags/xunit.md>)

### AI overview

A review of Kent Beck's book Test Driven Development: By Example. The article describes the book's treatment of TDD, including its small-step case study, the xUnit family of unit-testing frameworks, design patterns, and the Red-Green-Refactor routine. The reviewer finds the opening case study tedious but considers the later sections more interesting.

### Source excerpt

A review of Kent Beck's famous book on testing