Reputation: 71101
How do you, in any of the common .NET testing frameworks MSTest, NUnit, MbUnit, or xUnit.NET, get the command line test runner to output a simple yes/no or true/false or 1/0 on whether all the tests passed or failed?
I'm open to workarounds like:
Which of these frameworks provide this kind of capability?
I did some playing with MSTest today and didn't see a way to make MSTest.exe output something I could use.
Upvotes: 1
Views: 2000
Reputation: 7474
Have a look at Gallio, a framework and other tools (test runner, etc.) that MbUnit is built on, but that also handles the outputs MSTest, NUnit, RSpec, etc.
While that isn't exactly what you asked for, if you use the output from the Gallio test-runner, then you've got free support for the test formats - it's essentially a standard output.
Upvotes: 2
Reputation: 65496
They all output XML if you want (especially MSTest). You can use XSLT like my version for MSTest.
Upvotes: 3
Reputation: 4392
MSTest and most other runners return an exitcode you can check on.
Upvotes: 0