473,396 Members | 1,833 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

nUnit Return Code?

Is there a way to get nUNIT to return an error code from the console
version(like 0 or 1)? I need to signal an automated build tool to stop
upon any errors encountered by nUnit in its analysis of the project
code.

Thanks,

Brian
br**********@cox.net
Nov 16 '05 #1
3 6995
Brian wrote:

Is there a way to get nUNIT to return an error code from the console
version(like 0 or 1)? I need to signal an automated build tool to stop
upon any errors encountered by nUnit in its analysis of the project
code.

Thanks,

Brian
br**********@cox.net


From what?

From a batch file:

%errorlevel%

From an application
Process.ExitCode

0 = success
Nov 16 '05 #2
Thanks.

I found the failures to happen as expected by running the nUnit
command line directly in the build step. The batch file I created was
hiding the error code somewhat.

Can I use that %errorlevel% macro to check the errors occurring in the
DOS batch file?

br**********@cox.net

Julie <ju***@nospam.com> wrote in message news:<41***************@nospam.com>...
Brian wrote:

Is there a way to get nUNIT to return an error code from the console
version(like 0 or 1)? I need to signal an automated build tool to stop
upon any errors encountered by nUnit in its analysis of the project
code.

Thanks,

Brian
br**********@cox.net


From what?

From a batch file:

%errorlevel%

From an application
Process.ExitCode

0 = success

Nov 16 '05 #3
Brian wrote:

Thanks.

I found the failures to happen as expected by running the nUnit
command line directly in the build step. The batch file I created was
hiding the error code somewhat.

Can I use that %errorlevel% macro to check the errors occurring in the
DOS batch file?
Yes, that't right.

To find out more, go to a command prompt and type:

help if

and it will give you a lot of details on using errorlevel.


br**********@cox.net

Julie <ju***@nospam.com> wrote in message news:<41***************@nospam.com>...
Brian wrote:

Is there a way to get nUNIT to return an error code from the console
version(like 0 or 1)? I need to signal an automated build tool to stop
upon any errors encountered by nUnit in its analysis of the project
code.

Thanks,

Brian
br**********@cox.net


From what?

From a batch file:

%errorlevel%

From an application
Process.ExitCode

0 = success

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Alvin Bruney | last post by:
I've a question on unit testing with NUnit. I'm sure I'm missing just a little thing here. Why doesn't NUnit allow me to test a routine with parameter in it like what i want to do is test ...
3
by: Ole Hanson | last post by:
Hi I am trying to engineer a way of testing that my logging framework is capable of writing to my eventlog. I want to include this test in my already existing NUnit tests - but I'm a little low...
5
by: Naveen Mukkelli | last post by:
Hi all, How can we use "NUnit" in socket programming. I mean, I'm writing a server program which accepts connection requests from the clients. I want to test the number of clients whenever a...
3
by: Julia | last post by:
Hi, We are going to invest in testing and I wonder are there any guidelines to design NUnit friendly classes? Should I consider at all ease of use in unit testing when designing my classes? ...
0
by: Ray Tayek | last post by:
hi, getting a: .\Stdafx.cpp : fatal error C1192: #using failed on 'i: nunit\samples\cpp-sample"' 'The filename, directory name, or volume label syntax is incorrect.' nunit is installed in...
6
by: Ray Tayek | last post by:
hi, i am preparing to teach a class in c++ and would like to intoduce some unit testing. i can make unit tests in c# using this dll and nant from the command line. i am using visual c++ 2005...
20
by: Parag | last post by:
Hi, I am trying to figure out best testing tool for my project. I have narrowed down my requirements to two tools NUNIT and VSTS unit. But I have used neither and I have to use only one of them....
6
by: tchaiket | last post by:
Hey all, I'm using NUNIT to test our classes. However, I don't want to hard code test data into the NUNIT classes. For example, to test adding a new Client, I don't want to hard code the...
0
by: noway001 | last post by:
Hi, I need to learn how to do unit tests for certain functions. I have googled and come accross some stuff, but all the examples are easy. I read multiple articles on code project, but it didn't...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.