Sunday, September 30, 2007

I have been using MbUnit's AutoRunner a lot lately and it rocks. To use the AutoRunner add a new class to your test project named SelfTester with the following code:

public class SelfTester
{
    public static void Main()
    {
        using(AutoRunner runner = new AutoRunner())
        {
            runner.Load();
            runner.Run();
            runner.ReportToHtml();
        }
    }
}

Next right click on your test project and set it as the start up project. Change the output type to Console Application and the startup object to your SelfTester class:

SelfTester

 Now hit F5 and your test results will appear in a nicely formatted html page. This works even if all your tests are written using NUnit as the framework. It does not however work with MSTest.

 

Now Playing: The Chemical Brothers - We Are The Night - All Rights Reversed

Sunday, September 30, 2007 6:17:03 AM (GMT Standard Time, UTC+00:00)  #    Comments [1]  | 

Theme design by Jelle Druyts

Pick a theme: