2

I typically run my unit tests using dotnet test. The framework I'm using is xunit. As such, I'm not sure how to run dotMemory unit tests with the CLI.

The documentation recommends:

dotMemoryUnit.exe
-targetExecutable="C:\NUnit 2.6.4\bin\nunit-console.exe"
-returnTargetExitCode --"E:\MyProject\bin\Release\MainTests.dll"

What should I put in -targetExecutable? It expects a path, so entering dotnet test doesn't work.

rhughes
  • 9,257
  • 11
  • 59
  • 87

1 Answers1

2

I tried to run tests using latest dotMemory Unit 3.1, it works

dotMemoryUnit.exe "c:\Program Files\dotnet\dotnet.exe" -- test "path\to\the\solution.sln"

For your version it would be

dotMemoryUnit.exe -targetExecutable="c:\Program Files\dotnet\dotnet.exe" -returnTargetExitCode -- test "E:\MyProject\bin\Release\MainTests.dll"

Ed Pavlov
  • 2,353
  • 2
  • 19
  • 25