Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`dotMemoryUnit` with `dotnet test`

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.

like image 634
rhughes Avatar asked Aug 27 '26 01:08

rhughes


1 Answers

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"

like image 102
Ed Pavlov Avatar answered Aug 29 '26 12:08

Ed Pavlov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!