Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically Gathering NUnit results

I am running some NUnit tests automatically when my nightly build completes. I have a console application which detects the new build, and then copies the built MSI's to a local folder, and deploys all of my components to a test server. After that, I have a bunch of tests in NUnit dll's that I run by executing "nunit-console.exe" using Process/ProcessStartInfo. My question is, how can programmatically I get the numbers for Total Success/Failed tests?

like image 215
skb Avatar asked Dec 03 '25 09:12

skb


1 Answers

Did you consider using a continous integration server like CruiseControl.NET?

It builds and runs the tests for you and displays the results in a web page. If you just want a tool, let the nunit-console.exe output the results in XML and parse/transform it with an XSLT script like the ones coming from cruise control.

Here is an example of such an XSL file if you run the transformation on the direct output of nunit-console.exe then you will have to adapt the select statements and remove cruisecontrol.

However it sounds like you might be interested in continuous integration.

like image 59
jdehaan Avatar answered Dec 05 '25 21:12

jdehaan