tags:

views:

38

answers:

2

I'm looking at NUnit XML output right now, and wonder if it's possible to generate the output for failures only.

I mean, if a test passes ok, no XML output gets generated for it at all.

(UPDATE: XSLT is not an option here. I don't want XML output for passed tests at all: if I don't need the details about the passed tests, I don't want the system to spend time generating those details.)

The idea is, XML output tend to be quite large if you have a lot of tests, but 80% of the time you're after failures anyway. For such cases, I'd like to run my tests in such a way that only info on failures get generated.

+1  A: 

You can specify an XSLT file when you run the NUnit console runner to customise the generated file:

nunit-console /transform:failures.xslt nunit.tests.dll

The default XML file is generated using this XSLT file which can be easily modified to report only failures.

Keith Bloom
Well, I mean I don't want any output for passed tests at all. If I don't need the details about the passed tests, I don't want the system to spend time generating those details.
andreister
+1  A: 

Posted this question to NUnit Google Group, and Charlie Poole confirmed that there's no such option.

andreister