How to find NUnit Exit Code

816 views
Skip to first unread message

Ganges

unread,
Mar 27, 2012, 8:10:31 AM3/27/12
to NUnit-Discuss
Hi,

I am testing .dll using NUnit GUI and test is getting failed.

How can I see which exitcode it is giving? I tried exporting xml log
and checked but could not find exitcode.

Pls help

Ganges

Charlie Poole

unread,
Mar 27, 2012, 2:07:57 PM3/27/12
to nunit-...@googlegroups.com
Hi Ganges,

The purpose of the Gui is to allow developers to run tests
interactively. Usually, there will be many test runs within a single
execution of the gui.

For that reason, it does not make use of an exit code to indicate
whether a run succeeded or failed. The only exit codes used by the gui
are in case you tried to run it with invalid arguments.

In most cases, if you are running tests programmatically, you should
use nunit-console, which does provide return codes indicating whether
the run succeeded or not.

Charlie

> --
> You received this message because you are subscribed to the Google Groups "NUnit-Discuss" group.
> To post to this group, send email to nunit-...@googlegroups.com.
> To unsubscribe from this group, send email to nunit-discus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nunit-discuss?hl=en.
>

Gangadhar Gaur

unread,
Mar 28, 2012, 3:18:58 AM3/28/12
to nunit-...@googlegroups.com
Hi Charlie,
 
Thanks for your reply.
 
Actully I am using nunit-console also in CruiseControl script but its is not showing any exit code in the log.
 
where can i finde exitcode if I am runing nunit-console?
 
Thanks
Ganges

Charlie Poole

unread,
Mar 28, 2012, 3:27:01 AM3/28/12
to nunit-...@googlegroups.com
Hi Ganges,

The exit code from nunit-console is a positive value if any tests
failed - i.e. the number of failures.

Exit codes are not anywhere, they are returned to the calling script,
which has to test for them. I suspect this is a matter of
cruisecontrol configuration.

Charlie

Reply all
Reply to author
Forward
0 new messages