Friday, August 20, 2010

 

Debugging using xUnit GUI

I was shown something today by a colleague that I thought could only be done with a visual studio plugin like CodeRush or TestDriven.net. The feat was debugging a unit test using the xUnit GUI (http://xunit.codeplex.com/). Here's how it's done:

1. Open visual studio and add a breakpoint to the test you want to break on.

2. Load the assembly of the project into xUnit. For a project called CRTTests load the assembly, CRTTests.dll, from the CRTTests bin folder, not from the "startup project"s' bin folder.

3. Back in Visual studio go to Tools/Attach to Process...

4. select "xunit.gui.clr4" from the Available processes and click attach.

5. Back in xUnit, select the test that has your break point and click the "Run Selected" button.

6. Visual studio will break when xUnit hits that break point.

Labels:


Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]