Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug mbunit/Gallio unit tests in visual studio

I am trying to figure out how I can hit breakpoints in my unit tests that are written with MbUnit/Gallio. I tried running Gallio.Icarus, attaching vs debugger to it, the breakpoints weren't hit. Next I tried to start Gallio.Echo from project properties, but I was getting an error message, after supplying the dll, saying only .exe's can be tested. The unit test runs fine from Gallio.Icarus, however, I am unable to debug them.

Thanks!

like image 253
laconicdev Avatar asked May 05 '09 15:05

laconicdev


People also ask

How do I debug unit tests in Visual Studio?

To start debugging: In the Visual Studio editor, set a breakpoint in one or more test methods that you want to debug. Because test methods can run in any order, set breakpoints in all the test methods that you want to debug. In Test Explorer, select the test method(s) and then choose Debug on the right-click menu.

How do you debug test cases in Visual Studio react?

Debugging Tests in Chrome​Select inspect on your process and a breakpoint will be set at the first line of the react script (this is done to give you time to open the developer tools and to prevent Jest from executing before you have time to do so).

How do I run unit tests in Visual Studio?

To run all the tests in a default group, choose the Run icon and then choose the group on the menu. Select the individual tests that you want to run, open the right-click menu for a selected test and then choose Run Selected Tests (or press Ctrl + R, T).


2 Answers

Grab Gallio v3.0.6 Update 1. Load up your tests and click on the shiny new "Debug" button in the Icarus GUI itself.

like image 128
Jeff Brown Avatar answered Oct 28 '22 14:10

Jeff Brown


I would use TestDriven.Net for this. It supports MbUnit tests, and you can debug by simply right clicking from within Visual Studio

like image 23
Martin Harris Avatar answered Oct 28 '22 16:10

Martin Harris