Question Details

No question body available.

Tags

unit-testing .net

Answers (1)

February 12, 2026 Score: 0 Rep: 85,652 Quality: Medium Completeness: 100%

There are multiple layers at work

  1. the test runner
  2. the test framework
  3. the test
  4. the results displayer

.net has many test frameworks, MSTest, NUnit, xUnit the test runner and visualiser will probably be Visual Studio Test explorer, but also a build pipeline might process command line test runner output

I note that JUnit says:

JUnit Jupiter itself does not differentiate between failed assertions (AssertionError) and other types of exceptions. All uncaught exceptions lead to a test failure. However, Integrated Development Environments (IDEs) and other tools may distinguish between these two types of failures by checking whether the thrown exception is an instance of AssertionError.

https://docs.junit.org/6.0.2/writing-tests/exception-handling.html

NUnit has :

Status - A TestStatus with four possible values: Inconclusive Skipped Passed Warning Failed

https://docs.nunit.org/articles/nunit/writing-tests/TestContext.html#:~:text=Status%20%2D%20An%20AssertionStatus%20with%20five,Status=Inconclusive)

Which tells us a lot about document testing.

MSTest has 10 possible outcomes:

https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.testtools.unittesting.unittestoutcome?view=mstest-net-4.0

VS Test Explorer... I think uses these 13 possible outcomes.

https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.testtools.common.testoutcome?view=visualstudiosdk-2022

So when you run unit tests these all get amalgamated together into what you see on the screen.

This is why if you are writing a test framework or runner you have to be aware of the detail of these states and try to stick as close to what the other parts of the stack expect if possible.

As a user of tests though, you are probably just looking for "tests that didn't pass"

I can see the merit in the Fail/Error distinction you say JUnit has, or had, or the Assumption idea it has, but I would achieve the same results though mocking components that are not part of the test. Hence avoiding a test fail which is actually the failure of a dependency.

If I hadn't mocked the particular dependency and was seeing a whole bunch of fails due to a single cause, I wouldn't be overly concerned as any failure would prompt human intervention to find the cause.

So overall in my experience No, the .net community doesn't have this distinction. an "Errored" test means the test runner threw an error trying to run the test. Not that the test itself threw an exception. That would count as a Fail