xUnit.net
A popular open-source unit testing framework for .NET, where [Fact] marks a test method and Assert checks results.
In more detail
Its name nods to the xUnit family of frameworks descended from Smalltalk's SUnit and Java's JUnit, which share the same test, fixture and assertion ideas. Tests are methods marked with a Fact or Theory attribute; a Theory is the equivalent of a parametrized test. The dotnet test command discovers and runs them.
Related terms
- unit test — An automated check of one small piece of code, such as a single function, that runs quickly and on its own.
- assertion — A check that a condition is true, which stops a test or program with a failure if it is false.
- test fixture — Fixed, known data or setup that tests use so their results are predictable, such as a sample file, a seeded database or a started application.
- dotnet test — The dotnet command that builds test projects and runs their tests, reporting passes and failures.
- test framework — A library and set of conventions for writing, organising and running automated tests in a language.
- Fluent Assertions — A C# library of readable assertion methods, used with xUnit.net and other frameworks.
- .NET — Microsoft's free, open-source platform for building and running applications, made of a runtime, a large standard library and a toolchain.
Taught in
- A Testing Strategy In The Pipeline — Microsoft Azure DevOps Engineer Expert (AZ-400) Exam Prep
- Unit Testing with xUnit and NSubstitute — Modern .NET Core, C# & Enterprise Microservices
- Integration Testing with WebApplicationFactory — Modern .NET Core, C# & Enterprise Microservices
- Behavior-Driven Development with Reqnroll — Modern .NET Core, C# & Enterprise Microservices
- Introducing pytest — Automated Testing, TDD & Quality Engineering