Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

xunit.net

How to dynamically skip a test with Xunit 2.0?

December 3, 2023 by Tarik

[Update: XUnit v2.0 (RTM) is now available and skippable tests are supported by it directly. Use [Fact (Skip = “specific reason”)] ] Note that XUnit v2.0 has not shipped. This example is compatible with Xunit 2.0 beta5 which you can find on nuget.org. There may be other ways to accomplish this (as this is just … Read more

Categories xunit.net Tags xunit.net Leave a comment

dotnet test > is there a way to show list of tests ran in console?

August 21, 2023 by Tarik

I’m using .Net 6 with NUnit on macOS. Setting the verbosity level for dotnet test does not print a list of all executed tests (successful or otherwise). What does print such a list is setting the logger verbosity like this: dotnet test -l “console;verbosity=normal”

Categories xunit.net Tags dotnet-cli, xunit.net Leave a comment

xUnit.net does not capture console output

February 20, 2023 by Tarik

The situation has changed a little with xUnit.net 2. I know the question is about an earlier version, but as people will land here having performed the upgrade, I thought it was worth pointing this out. In order to see some kind of output in the test output in version 2 you will need to … Read more

Categories xunit.net Tags xunit.net Leave a comment

How do I run specific tests using dotnet test?

February 8, 2023 by Tarik

With the dotnet version 1.0.0, you have to use the –filter option: You can filter by DisplayName, FullyQualifiedName and Traits. Ex: dotnet test –filter “FullyQualifiedName=YourNamespace.TestClass1.Test1” Also, these operators are allowed: =, != and ~ (contains). More info here: docs

Categories xunit.net Tags .net-core, .net-core-rc2, xunit.net, xunit2 Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa