Favourite Quote

Every artist was first an amateur. - Ralph Waldo Emerson The more difficulties one has to encounter, within and without, the more significant and the higher in inspiration his life will be. - Horace Bushnell

Thursday, April 19, 2012

Generating HTML report for NUnit with Nant


In my earlier post we saw how we can get the NUnit runner with our Visual Studio 2010 ultimate.

Now let's look at how to generate reports in html format.

Steps invloved in generating a html report for nunit tests :

1. Download Nunit2report from http://sourceforge.net/projects/nunit2report/ and unzip it to a location just like in the screen shot

2. Download Nant from http://nant.sourceforge.net/ if you don't have already place it in a location suitable to you

3. Once you are in Nunit2Report bin directory - You must have these files just like i have in screen shot

4. Copy all files from the bin directory of Nunit2Report to Nant/bin directory - Just as in screen shot

5. Add reference to Nant with Visual Studio 2010

6. Click on Tools Menu in Visual Studio and click on External Tools - Just like in Screen shot

7. Add details just like i have entered in the external tools configuration for nant

8. You can either follow step 7 for integrating Nant with Visual studio or just create a batch file with details $NANT_HOME\bin\nant.exe -buildfile

9. Let's look at how our build file looks - Have a look at the screen shot

10. You should see a nice html report - Just like screen shot

11. We can add a task to email results as well using the mail task
automationwithselenium.blogspot.com-Google pagerank and Worth