Search code examples
.net-coremstest

dotnet test command to display individual test run times?


I am switching from javascript Mocha to the MSTest framework with .NET Core 3.x.

Currently running dotnet test displays:

Passed! - Failed: 0, Passed: 6, Skipped: 0, Total: 6, Duration: 521 ms

Is there a way I can get it to display similar to Mocha?

TestClass1
  TestMethod1 (51ms)
  TestMethod2 (100ms)
  TestMethod3 (24ms)

TestClass2
  TestMethod1 (115ms)
  TestMethod2 (55ms)

Solution

  • You can try the following to get a similar output.

    dotnet test -l "console;verbosity=detailed"