<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Haugerns Development Escapades &#187; nunit</title>
	<atom:link href="http://www.haugern.net/blog/category/nunit/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.haugern.net/blog</link>
	<description>Morten Haug on development and other curiosities</description>
	<lastBuildDate>Sun, 31 May 2009 21:56:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>NUnit swallowed errorcodes</title>
		<link>http://www.haugern.net/blog/nunit-swallowed-errorcodes/</link>
		<comments>http://www.haugern.net/blog/nunit-swallowed-errorcodes/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 14:28:31 +0000</pubDate>
		<dc:creator>haugern</dc:creator>
				<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[cruisecontrol.net]]></category>
		<category><![CDATA[nunit]]></category>

		<guid isPermaLink="false">http://www.haugern.net/blog/nunit-swallowed-errorcodes/</guid>
		<description><![CDATA[Update: The header is now in past tense as I figured out a GREAT solution; upgrade from 2.4.1 to 2.4.3!
By accident I earlier today checked in a failing unit-test to our TFS source control. While waiting for the dreaded red light from my CC tray I was about to fix it, when I suddenly discovered&#8230;
It [...]]]></description>
			<content:encoded><![CDATA[<p><font color="#ff0000">Update: The header is now in past tense as I figured out a GREAT solution; upgrade from 2.4.1 to 2.4.3!</font></p>
<p>By accident I earlier today checked in a failing unit-test to our TFS source control. While waiting for the dreaded red light from my CC tray I was about to fix it, when I suddenly discovered&#8230;</p>
<p><strong>It didn&#8217;t fail the build!</strong></p>
<p><a href="http://www.haugern.net/blog/wp-content/windowslivewriternunitswallowederrorcodes-d69dimage-4.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="117" alt="image" src="http://www.haugern.net/blog/wp-content/windowslivewriternunitswallowederrorcodes-d69dimage-thumb-1.png" width="270" border="0"></a> </p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Going through the build report revealed that it did in fact discover the failing test: </p>
<p><a href="http://www.haugern.net/blog/wp-content/windowslivewriternunitswallowederrorcodes-d69dimage-6.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="104" alt="image" src="http://www.haugern.net/blog/wp-content/windowslivewriternunitswallowederrorcodes-d69dimage-thumb-2.png" width="459" border="0"></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>I couldn&#8217;t really live with that so I started investigating. I tried the following:</p>
<ul>
<li>Testing the NAnt-target local on my machine &#8211; <strong>build successful</strong>
<li>Manually running NUnit with all the same parameters as in the build-file, checking errorcode after run &#8211; <strong>errorcode 0</strong> (success)
<li><em>At least now I know it&#8217;s NUnit that is failing</em>
<li>For no good reason at all I&#8217;m just trying the failing test-assembly, leaving the other test-assemblies alone &#8211; <strong>errorcode 1</strong> (1 failure)
<li><em>I&#8217;m on to something</em>
<li>I add another test-assembly that doesn&#8217;t have failing tests in it &#8211; <strong>errorcode 0</strong> (success)</li>
</ul>
<p>It looks like NUnit forgets the result from the first test, and is just giving me the errorcode from the latest test-assembly provided!</p>
<p>Adding several test-assemblies to a NUnit project however does work correctly.</p>
<h3>The solution</h3>
<p>I didn&#8217;t want to make &#8220;static&#8221; NUnit project files, so I had to look for answers somewhere else and turned to the NUnit home pages. Earlier searches for errorcodes didn&#8217;t bring me to these pages at all, but I started looking around on the site and I found my way into the release notes.</p>
<p>I was using version 2.4.1 from May, and there was a 2.4.3 out from August. I downloaded it, updated my solutions tools folder, and&#8230;.</p>
<p><strong>It was fixed (the build failed&#8230; confused yet?!?)!</strong></p>
<p>So, just to wrap it up: If you&#8217;ve been running NUnit 2.4.1 with more than one test-assembly, and your build server is happily saying the build is fine,<strong> don&#8217;t believe it!</strong></p>
<p><strong>Upgrade to a newer version and find out if your build is still fine .</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.haugern.net/blog/nunit-swallowed-errorcodes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
