<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Farblondzshet in Code</title>
	
	<link>http://matthewmanela.com</link>
	<description>The life and work of Matthew Manela</description>
	<lastBuildDate>Sun, 28 Apr 2013 18:33:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Farblondzshet" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="farblondzshet" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Chutzpah 2.4 – Code Coverage is a go!</title>
		<link>http://matthewmanela.com/blog/chutzpah-2-4-code-coverage-is-a-go/</link>
		<comments>http://matthewmanela.com/blog/chutzpah-2-4-code-coverage-is-a-go/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 04:59:43 +0000</pubDate>
		<dc:creator>Matthew</dc:creator>
				<category><![CDATA[Chutzpah]]></category>

		<guid isPermaLink="false">http://matthewmanela.com/?p=1574</guid>
		<description><![CDATA[With the Chutzpah 2.4 release one of the most asked for features is now available: built-in code coverage. In addition this release contains a bunch of bug fixes and added configurability. You can get the new bits from CodePlex, NuGet &#8230; <a href="http://matthewmanela.com/blog/chutzpah-2-4-code-coverage-is-a-go/">Continue reading <span class="meta-nav">&#8594;</span></a><div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/chutzpah-2-1-now-with-coffeescript-support/"     class="crp_title">Chutzpah 2.1 now with CoffeeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-2-with-typescript-support/"     class="crp_title">Chutzpah 2.2 with TypeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-3-released/"     class="crp_title">Chutzpah 2.3 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-4-0-released/"     class="crp_title">Chutzpah 1.4.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-2-0-released/"     class="crp_title">Chutzpah 1.2.0 Released</a></li></ul></div>]]></description>
				<content:encoded><![CDATA[<p>With the Chutzpah 2.4 release one of the most asked for features is now available: built-in code coverage. In addition this release contains a bunch of bug fixes and added configurability.</p>
<p>You can get the new bits from <a href="http://chutzpah.codeplex.com/">CodePlex</a>, <a href="http://nuget.org/List/Packages/Chutzpah">NuGet</a> or go to the Visual Studio Gallery to get the updated <a href="http://visualstudiogallery.msdn.microsoft.com/71a4e9bd-f660-448f-bd92-f5a65d39b7f0">Visual Studio Context Menu Extension</a>  and <a href="http://visualstudiogallery.msdn.microsoft.com/f8741f04-bae4-4900-81c7-7c9bfb9ed1fe">Unit Test Explorer adapter for Visual Studio 2012</a>.</p>
<h2>Changes and Fixes</h2>
<ul>
<li>Added Code Coverage support (item 113)</li>
<li>Updated versions of QUnit(v1.11.0), TypeScript(v0.8.3) and CoffeeScript(v1.6.2)</li>
<li>jasmin-jQuery toContain tests fail with reason &#8220;Passed.&#8221; (item 95)</li>
<li>FileSearchLimit=300 cancels test run with more than 300 tests (item 89)</li>
<li>/failOnScriptError exits with 1 even when there are not errors (item 97)</li>
<li>&#8216;undefined&#8217; is not a function after updating to 2.3 (item 96)</li>
<li>No tests found when using QUnit.test instead of test (item 94)</li>
<li>Allow including files without building them (item 93)</li>
<li>Improve &#8220;/openInBrowser&#8221; (item 91)</li>
<li>Add TestFileTimeout setting to chutzpah.json (item 110)</li>
<li>Need a later version of phantom bundled with Chutzpah (item 107)</li>
<li>QUnit test runner module gotcha in 2.3 (item 109)</li>
<li>Support for unicode (item 111)</li>
<li>Improve CoffeeScript parse error reporting (item 80)</li>
</ul>
<p>&nbsp;</p>
<h2>Code Coverage</h2>
<p>Chutzpah’s new code coverage features is built on top of the great open source library <a href="http://blanketjs.org/" target="_blank">Blanket.js</a>. When you run with code coverage enabled it will use Blanket.js to instrument the files under test and gather the coverage results. You can perform code coverage from the command line and both Visual Studio plugins.</p>
<p><strong>Command Line</strong></p>
<p>To get code coverage from the command line you pass the <strong>/coverage </strong>flag to chutzpah.console.exe.</p>
<pre class="brush: text;">chutzpah.console.exe /coverage /path test.js</pre>
<p>After this command finishes you will have a two files placed in your current directory</p>
<p>_Chutzpah.coverage.html – The rendered html results<br />
_Chutzpah.coverage.json – The raw json results</p>
<p>When you open the results html file you will see something like:</p>
<p><a href="http://matthewmanela.com/wp-content/uploads/2013/04/image2.png"><img style="display: inline; border-width: 0px;" title="image" alt="image" src="http://matthewmanela.com/wp-content/uploads/2013/04/image_thumb2.png" width="596" height="344" border="0" /></a></p>
<p>&nbsp;</p>
<p><strong>Visual Studio Context Menu Extension</strong></p>
<p>The <a href="http://visualstudiogallery.msdn.microsoft.com/71a4e9bd-f660-448f-bd92-f5a65d39b7f0">Visual Studio Context Menu Extension</a> now contains a <strong>Show Code Coverage</strong> command which will perform code coverage and open the results in a browser.</p>
<pre><a href="http://matthewmanela.com/wp-content/uploads/2013/04/image.png"><img style="display: inline; border-width: 0px;" title="image" alt="image" src="http://matthewmanela.com/wp-content/uploads/2013/04/image_thumb.png" width="280" height="123" border="0" /></a></pre>
<p><strong>Visual Studio 2012 Test Adapter Extension</strong></p>
<p>For the <a href="http://visualstudiogallery.msdn.microsoft.com/f8741f04-bae4-4900-81c7-7c9bfb9ed1fe">Unit Test Explorer adapter for Visual Studio 2012</a> Chutzpah piggybacks on the existing “Analyze Code Coverage” menu option and uses it to run with code coverage and show the results in a browser. Ideally, Chutzpah would integrate into the code coverage reporting built into VS but I was unable to figure out a good way to plug in to that. The side effect is that when you run this command VS will open their results window first (with nothing in it) and then Chutzpah will launch its results in a browser.</p>
<p><a href="http://matthewmanela.com/wp-content/uploads/2013/04/image1.png"><img style="display: inline; border-width: 0px;" title="image" alt="image" src="http://matthewmanela.com/wp-content/uploads/2013/04/image_thumb1.png" width="313" height="162" border="0" /></a></p>
<p><strong>NOTE:</strong> I have noticed some performance issues when running “Analyze Code Coverage for All Tests” command. I think it might be VS doing extra work for no reason since it is trying to generate its own report.</p>
<p>&nbsp;</p>
<p><strong>Configuration Code Coverage</strong></p>
<p>Being able to run code coverage is not enough since in many cases the results will not be accurate. For example, if your project uses jQuery you do not expect your test to cover all the lines of jQuery’s source code (that would be one impressive test). Therefore you need to exclude files/directories from participating in code coverage. There are two way you can do that with Chutpah: command line arguments or a chutzpah.json file.</p>
<p>If you are running Chutzpah from the command line there are two additional arguments you can pass <strong>coverageIncludes </strong>and  <strong>coverageExcludes. </strong>These are a comma separated list of files/paths you want to include or exclude from coverage. They can use a glob format where * matches zero or more characters and ? matches one character. For example:</p>
<p><em>Exclude files that ends in matt.js</em></p>
<pre class="brush: text;">chutzpah.console.exe /path test.js /coverage /coverageExcludes *matt.js</pre>
<p>&nbsp;</p>
<p><em>Include only dog.js and any file with a single character extension</em></p>
<pre class="brush: text;">chutzpah.console.exe /path test.js /coverage /coverageIncludes "*\dog.js, *.?"</pre>
<p>&nbsp;</p>
<p><em>Include *query.js but exclude jQuery.js</em></p>
<pre class="brush: text;">chutzpah.console.exe /path test.js /coverage /coverageIncludes *query.js /coverageExcludes *\jquery.js</pre>
<p>&nbsp;</p>
<p>The other option for configuring code coverage is the <a href="https://chutzpah.codeplex.com/wikipage?title=Chutzpah.json%20Settings%20File&amp;referringTitle=Documentation" target="_blank">chutzpah.json file</a>. There are two new setting which you can use <strong>CodeCoverageExcludes</strong> and <strong>CodeCoverageIncludes. </strong>These settings work in the same way as the their command line counterpart. The main difference is that you must escape backslashes.</p>
<pre class="brush: js;">{
  "CodeCoverageExcludes": ["*\\jquery.js"],
  "CodeCoverageIncludes": ["*query.js", "*\\dog.js"]
}</pre>
<h2></h2>
<h2>Test timeout setting</h2>
<p>Chutzpah already has a test timeout setting but you previously could only configure it from the command line or with a setting in VS. This was inflexible especially if you want a different timeout for different tests. To solve this Chutzpah now include a <strong>TestFileTimeout </strong>setting in the chutzpah.json file. For example if you want a 10 second time out for a certain directory just place a chutpah.json file with the following in it:</p>
<pre class="brush: js;">{
    "TestFileTimeout": "10000"
}</pre>
<h2></h2>
<h2>Chutzpah Specific Reference</h2>
<p>With the addition of TypeScript support a few releases ago several people reported issues when using Chutzpah with the TypeScript plugin in VS. The problem occurs since both TypeScript and Chutzpah are using the &lt;reference path…&gt; comments for different purposes. To get around this issue Chutzpah now supports two ways to reference dependent files.</p>
<p>1. The existing general way</p>
<pre class="brush: js;">/// &lt;reference path="foo.js" /&gt;</pre>
<p>2. The new Chutzpah specific way</p>
<pre class="brush: js;">/// &lt;chutzpah_reference path="foo.js" /&gt;</pre>
<p>Using the latter will let Chutzpah know about your dependency graph and should not confuse the TypeScript compiler.</p>
<h2>Excluding References</h2>
<p>The reference syntax is also used by VS to give intellisense in JS files. This leads to an issue since sometimes you may reference a version of a file just for intellisense but you do not want Chutzpah to copy it. In this case you now can include the chutzpah-exclude attribute to have it ignored by Chutzpah:</p>
<pre class="brush: js;">/// &lt;reference path="someDependency.js" chutzpah-exclude="true" /&gt;</pre>
<h2></h2>
<h2>Running against a remote url</h2>
<p>Chutzpah now supports executing a remote test harness. If you have a html test file on a remote server (like http://somesite.com/test.html) you can tell Chutzpah to execute that file directly</p>
<pre class="brush: text;">chutzpah.console.exe http://somesite.com/test.html</pre>
<p><b>Note:</b> Chutzpah does not support running anything but .html files remotely. If you want to run Chutzpah directly on a .js, .ts or .coffee file they must be local on disk.</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/chutzpah-2-1-now-with-coffeescript-support/"     class="crp_title">Chutzpah 2.1 now with CoffeeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-2-with-typescript-support/"     class="crp_title">Chutzpah 2.2 with TypeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-3-released/"     class="crp_title">Chutzpah 2.3 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-4-0-released/"     class="crp_title">Chutzpah 1.4.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-2-0-released/"     class="crp_title">Chutzpah 1.2.0 Released</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Farblondzshet/~4/8gDWbFoXP6w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://matthewmanela.com/blog/chutzpah-2-4-code-coverage-is-a-go/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Using SignalR in an ARR cluster</title>
		<link>http://matthewmanela.com/blog/using-signalr-in-an-arr-cluster/</link>
		<comments>http://matthewmanela.com/blog/using-signalr-in-an-arr-cluster/#comments</comments>
		<pubDate>Fri, 05 Apr 2013 22:27:50 +0000</pubDate>
		<dc:creator>Matthew</dc:creator>
				<category><![CDATA[ARR]]></category>
		<category><![CDATA[SignalR]]></category>

		<guid isPermaLink="false">http://matthewmanela.com/?p=1567</guid>
		<description><![CDATA[My team ran into an issue when deploying an application which uses SignalR on a clustered environment using Application Request Routing (ARR). We created a simple three server setup with one server as an ARR node and 2 servers running &#8230; <a href="http://matthewmanela.com/blog/using-signalr-in-an-arr-cluster/">Continue reading <span class="meta-nav">&#8594;</span></a><div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/water-pipes-my-first-windows-phone-app/"     class="crp_title">Water Pipes: My first Windows Phone app</a></li><li><a href="http://matthewmanela.com/blog/make-your-website-faster-with-requestreduce/"     class="crp_title">Make your website faster with RequestReduce</a></li><li><a href="http://matthewmanela.com/projects/chutzpah/"     class="crp_title">Chutzpah &#8211; A JavaScript Test Runner</a></li><li><a href="http://matthewmanela.com/blog/openwithtest-0-4-released/"     class="crp_title">OpenWithTest 0.4 Released</a></li><li><a href="http://matthewmanela.com/blog/launching-the-tortoisehg-log-more-conveniently-from-the-command-line/"     class="crp_title">Launching the TortoiseHg log more conveniently from the&hellip;</a></li></ul></div>]]></description>
				<content:encoded><![CDATA[<p>My team ran into an issue when deploying an application which uses <a href="http://signalr.net/" target="_blank">SignalR</a> on a clustered environment using <a href="http://www.iis.net/downloads/microsoft/application-request-routing" target="_blank">Application Request Routing</a> (ARR). We created a simple three server setup with one server as an ARR node and 2 servers running the application. When accessing the site we saw some odd behavior.</p>
<blockquote><p>1. All SignalR requests fail to use the more efficient transports (ServerSentEvents/ForeverFrame) and fall back to using Long Polling</p>
<p>2. Some messages get replayed multiple times in IE9</p>
</blockquote>
<p>After looking into the issue for a while we figured out it was caused by a setting in ARR called <strong>Response Buffer Threshold.</strong></p>
<blockquote><p><strong>Response buffer threshold (KB)</strong>
<p>Lists the size of the buffer, in kilobytes, that ARR uses to retain a response before sending it to the client. Content that is smaller in size than the threshold can be cached.</p>
</blockquote>
<p>By default this is set to 256kb which means that it will buffer responses until they reach that amount. By setting this to 0 ARR will no longer buffer and SignlR will function correctly.
<p><a href="http://matthewmanela.com/wp-content/uploads/2013/04/clip_image002.jpg"><img title="clip_image002" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image002" src="http://matthewmanela.com/wp-content/uploads/2013/04/clip_image002_thumb.jpg" width="547" height="366"></a></p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/water-pipes-my-first-windows-phone-app/"     class="crp_title">Water Pipes: My first Windows Phone app</a></li><li><a href="http://matthewmanela.com/blog/make-your-website-faster-with-requestreduce/"     class="crp_title">Make your website faster with RequestReduce</a></li><li><a href="http://matthewmanela.com/projects/chutzpah/"     class="crp_title">Chutzpah &#8211; A JavaScript Test Runner</a></li><li><a href="http://matthewmanela.com/blog/openwithtest-0-4-released/"     class="crp_title">OpenWithTest 0.4 Released</a></li><li><a href="http://matthewmanela.com/blog/launching-the-tortoisehg-log-more-conveniently-from-the-command-line/"     class="crp_title">Launching the TortoiseHg log more conveniently from the&hellip;</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Farblondzshet/~4/JFg5E3fK6Nw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://matthewmanela.com/blog/using-signalr-in-an-arr-cluster/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Chutzpah 2.3 Released</title>
		<link>http://matthewmanela.com/blog/chutzpah-2-3-released/</link>
		<comments>http://matthewmanela.com/blog/chutzpah-2-3-released/#comments</comments>
		<pubDate>Sun, 13 Jan 2013 23:11:41 +0000</pubDate>
		<dc:creator>Matthew</dc:creator>
				<category><![CDATA[Chutzpah]]></category>

		<guid isPermaLink="false">http://matthewmanela.com/?p=1554</guid>
		<description><![CDATA[This release contains a couple important new features and bug fixes. Chutzpah now gives you more control in how you want youe tests run using the new chutzpah.json settings file (described in detail below). You can get the new bits &#8230; <a href="http://matthewmanela.com/blog/chutzpah-2-3-released/">Continue reading <span class="meta-nav">&#8594;</span></a><div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/chutzpah-2-2-with-typescript-support/"     class="crp_title">Chutzpah 2.2 with TypeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-4-0-released/"     class="crp_title">Chutzpah 1.4.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-1-now-with-coffeescript-support/"     class="crp_title">Chutzpah 2.1 now with CoffeeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-4-code-coverage-is-a-go/"     class="crp_title">Chutzpah 2.4 &ndash; Code Coverage is a go!</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-2-0-released/"     class="crp_title">Chutzpah 1.2.0 Released</a></li></ul></div>]]></description>
				<content:encoded><![CDATA[<p>This release contains a couple important new features and bug fixes. Chutzpah now gives you more control in how you want youe tests run using the new chutzpah.json settings file (described in detail below).</p>
<p>You can get the new bits from <a href="http://chutzpah.codeplex.com/">CodePlex</a>, <a href="http://nuget.org/List/Packages/Chutzpah">NuGet</a> or go to the Visual Studio Gallery to get the updated <a href="http://visualstudiogallery.msdn.microsoft.com/71a4e9bd-f660-448f-bd92-f5a65d39b7f0">Visual Studio Context Menu Extension</a>  and <a href="http://visualstudiogallery.msdn.microsoft.com/f8741f04-bae4-4900-81c7-7c9bfb9ed1fe">Unit Test Explorer adapter for Visual Studio 2012</a>.</p>
<h2>Changes and Fixes</h2>
<ul>
<li>Added Chutzpah.json settings file support</li>
<li>Consistent conversion error (item 70)</li>
<li>System.IO.IOException: The handle is invalid when running from inside WebStorm (item 77)</li>
<li>Exception has been thrown by the target of an invocation. inside Visual Studio 2012 (item 65)</li>
<li>Tests are hanging (ChutzpahTimeoutException) (item 72)</li>
<li>Reference root path should be project (item 83)</li>
<li>Smarter coffeescript compilation (item 75)</li>
<li>Running with parallelism gives faulty timing (item 81)</li>
<li>Running with parallelism gives System.IO.IOException (item 74)</li>
<li>Compile all TypeScript files at the same time (item 82)</li>
</ul>
<h2>The Chutzpah Settings File</h2>
<p>The Chutzpah settings file is an .json file that you can place anywhere in your testing directories to inform Chutzpah of test specific settings. The Chuzpah settings file is completely optional and if the file or any of its properties are omitted Chutzpah will use the default values.</p>
<p>When Chutzpah is run on a file (lets say test.js) it scans the current directory for a file named chutzpah.json. If it does not find one it will recursively traverse up the directory chain looking for one. This behavior provides a lot of flexibility since you can provide multiple chutzpah.json files in your tree and each one will work over its sub-folder. This lets you have different settings for different groups of tests.</p>
<h4>Chutzpah.json Format</h4>
<p>The settings file is a text file with json content of the following format:</p>
<pre class="brush: xml;">{
    "Framework": "qunit|jasmine",

    "TestHarnessLocationMode": "TestFileAdjacent|SettingsFileAdjacent|Custom",

    "TestHarnessDirectory": "&lt;Path to a folder&gt;",

    "TypeScriptCodeGenTarget" : "ES3|ES5",

    "RootReferencePathMode":"DriveRoot|SettingsFileDirectory"
}</pre>
<p>The chutzpah.json file supports the following properties</p>
<p><strong>Framework – </strong>Determines what testing framework to use. This will override the other detection methods. This is helpful if Chutzpah is having trouble figuring out what your intended framework is. If left out Chutzpah will automatically try to detect the framework.</p>
<p><strong>TestHarnessLocationMode – </strong>Determines where to place the generated html test harness files. The default mode is <em>TestFileAdjacent</em> which means the harness is placed in the same directory as the test file. <em>SettingsFileAdjacent</em> means it is placed in the same directory as the chutzpah.json file. <em>Custom</em> mode lets you specify a custom path to the directory.</p>
<p><strong>TestHarnessDirectory – </strong>When TestHarnessLocationMode is set to C<em>ustom</em> this is either the relative or absolute path to the directory where to place the test harness.</p>
<p><strong>TypeScriptCodeGenTarget – </strong>When running on a <a href="http://www.typescriptlang.org/" target="_blank">TypeScript</a> file this property will tell the TypeScript compiler what type of code to generate. <em>ES3 </em>is for ECMAScript 3 and <em>ES5</em> is for ECMAScript 5.</p>
<p><strong>RootReferencePathMode – </strong>This property determines what directory a rooted reference path refers to. In a test file Chutzpah parses the &lt;reference path=&#8221;" /&gt; tags to determine your test dependencies. By default  (the <em>DriveRoot</em> setting) if you write &lt;reference path=&#8221;\a.js&#8221; /&gt; Chutzpah will look for a.js under C:\ (assuming you are running your test in the C drive). However, if you set this property to <em>SettingsFileDirectory</em> Chutpah will now look for a.js relative to the location of the chutzpah.json file. This is useful if you have a large project and want to minimize the number of long reference paths.</p>
<h4>Examples:</h4>
<p>This file tells Chutzpah to use QUnit and to place the test harness next to the chutzpah.json file:</p>
<pre class="brush: xml;">{
    "Framework": "qunit",
    "TestHarnessLocationMode": "SettingsFileAdjacent"
}</pre>
<p>&nbsp;</p>
<p>This file tells Chutzpah to convert TypeScript to ES5 code and to place the test harness in a custom directory:</p>
<pre class="brush: xml;">{
    "TypeScriptCodeGenTarget" : "ES5",
    "TestHarnessLocationMode": "Custom",
    "TestHarnessDirectory": "../Some/Folder"
}</pre>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/chutzpah-2-2-with-typescript-support/"     class="crp_title">Chutzpah 2.2 with TypeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-4-0-released/"     class="crp_title">Chutzpah 1.4.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-1-now-with-coffeescript-support/"     class="crp_title">Chutzpah 2.1 now with CoffeeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-4-code-coverage-is-a-go/"     class="crp_title">Chutzpah 2.4 &ndash; Code Coverage is a go!</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-2-0-released/"     class="crp_title">Chutzpah 1.2.0 Released</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Farblondzshet/~4/HPpCqU2ETcI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://matthewmanela.com/blog/chutzpah-2-3-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Chutzpah 2.2 with TypeScript support</title>
		<link>http://matthewmanela.com/blog/chutzpah-2-2-with-typescript-support/</link>
		<comments>http://matthewmanela.com/blog/chutzpah-2-2-with-typescript-support/#comments</comments>
		<pubDate>Thu, 25 Oct 2012 19:51:20 +0000</pubDate>
		<dc:creator>Matthew</dc:creator>
				<category><![CDATA[Chutzpah]]></category>
		<category><![CDATA[TypeScript]]></category>

		<guid isPermaLink="false">http://matthewmanela.com/?p=1547</guid>
		<description><![CDATA[This release contains a few new features most notably that Chutzpah can now work directly on TypeScript files. You can get the new bits from CodePlex, NuGet or go to the Visual Studio Gallery to get the updated Visual Studio &#8230; <a href="http://matthewmanela.com/blog/chutzpah-2-2-with-typescript-support/">Continue reading <span class="meta-nav">&#8594;</span></a><div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/chutzpah-2-1-now-with-coffeescript-support/"     class="crp_title">Chutzpah 2.1 now with CoffeeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-4-0-released/"     class="crp_title">Chutzpah 1.4.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-3-released/"     class="crp_title">Chutzpah 2.3 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-2-0-released/"     class="crp_title">Chutzpah 1.2.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-4-code-coverage-is-a-go/"     class="crp_title">Chutzpah 2.4 &ndash; Code Coverage is a go!</a></li></ul></div>]]></description>
				<content:encoded><![CDATA[<p>This release contains a few new features most notably that Chutzpah can now work directly on <a href="http://www.typescriptlang.org/" target="_blank">TypeScript</a> files. You can get the new bits from <a href="http://chutzpah.codeplex.com/">CodePlex</a>, <a href="http://nuget.org/List/Packages/Chutzpah">NuGet</a> or go to the Visual Studio Gallery to get the updated <a href="http://visualstudiogallery.msdn.microsoft.com/71a4e9bd-f660-448f-bd92-f5a65d39b7f0">Visual Studio Context Menu Extension</a>&nbsp; and <a href="http://visualstudiogallery.msdn.microsoft.com/f8741f04-bae4-4900-81c7-7c9bfb9ed1fe">Unit Test Explorer adapter for Visual Studio 2012</a>.</p>
<h2>Changes</h2>
<ul>
<li>Added support for writing tests in TypeScript (<a href="http://chutzpah.codeplex.com/workitem/67">item 67</a>)&nbsp;
<li>Fixed encoding problem with .coffee files (<a href="http://chutzpah.codeplex.com/workitem/63">item 63</a>)
<li>Allow reference paths for folders (<a href="http://chutzpah.codeplex.com/workitem/68">item 68</a>)
<li>Some Unit Test Explorer bug fixes
<li>Added clearer error messages when test file does not exist</li>
</ul>
<h2>TypeScript Support</h2>
<p>Chutzpah now supports running unit tests you write in <a href="http://www.typescriptlang.org/" target="_blank">TypeScript</a>. Chutzpah will automatically generate temporary JavaScript files for your referenced TypeScript files and use those to gather the test results.<br />For example given a TypeScript test file that references another TypeScript file:
<pre class="brush: js;">/// &lt;reference path="../code/code.ts" /&gt;

test("will add 5 to number", function () {
    var res:number = mathLib.add5(10);

    equal(res, 15, "should add 5");
});
</pre>
<p>It will parse that file as well as the referenced code.ts files and generate corresponding .js files. </p>
<p>If you are writing QUnit tests be aware that you need to write <strong>QUnit.module</strong> instead of just <strong>module </strong>since module is a reserved word in TypeScript.</p>
<h2>Referencing Folders</h2>
<p>In your test files you can now reference folders using the reference declarations. For example when Chutzpah sees this line:</p>
<pre class="brush: js;">/// &lt;reference path="../someFolder/" /&gt;

</pre>
<p>It will traverse that folder and add the files in it as references. This can be easier to manage than referencing many files individually.</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/chutzpah-2-1-now-with-coffeescript-support/"     class="crp_title">Chutzpah 2.1 now with CoffeeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-4-0-released/"     class="crp_title">Chutzpah 1.4.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-3-released/"     class="crp_title">Chutzpah 2.3 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-2-0-released/"     class="crp_title">Chutzpah 1.2.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-4-code-coverage-is-a-go/"     class="crp_title">Chutzpah 2.4 &ndash; Code Coverage is a go!</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Farblondzshet/~4/QvDpTGKkMBk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://matthewmanela.com/blog/chutzpah-2-2-with-typescript-support/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Quickly moving up a directory tree</title>
		<link>http://matthewmanela.com/blog/quickly-moving-up-a-directory-tree/</link>
		<comments>http://matthewmanela.com/blog/quickly-moving-up-a-directory-tree/#comments</comments>
		<pubDate>Fri, 05 Oct 2012 20:28:36 +0000</pubDate>
		<dc:creator>Matthew</dc:creator>
				<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://matthewmanela.com/?p=1529</guid>
		<description><![CDATA[I am lazy and I have been working recently on optimizing my PowerShell profile to become faster from the command line. My most recent target was a command I run often to move up a directory: &#62; cd ../ Now &#8230; <a href="http://matthewmanela.com/blog/quickly-moving-up-a-directory-tree/">Continue reading <span class="meta-nav">&#8594;</span></a><div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/launching-the-tortoisehg-log-more-conveniently-from-the-command-line/"     class="crp_title">Launching the TortoiseHg log more conveniently from the&hellip;</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-3-released/"     class="crp_title">Chutzpah 2.3 Released</a></li><li><a href="http://matthewmanela.com/blog/making-an-executable-take-pipelined-input-in-powershell/"     class="crp_title">Making an executable take pipelined input in PowerShell</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-4-code-coverage-is-a-go/"     class="crp_title">Chutzpah 2.4 &ndash; Code Coverage is a go!</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-2-0-released/"     class="crp_title">Chutzpah 1.2.0 Released</a></li></ul></div>]]></description>
				<content:encoded><![CDATA[<p>I am lazy and I have been working recently on optimizing my PowerShell profile to become faster from the command line. My most recent target was a command I run often to move up a directory:</p>
<pre class="brush: ps;">&gt; cd ../
</pre>
<p>Now that may not look like a lot of characters but it gets worse when I want to jump 3 or 4 levels up:</p>
<pre class="brush: ps;">&gt; cd ../../../../
</pre>
<p>Annoying! To fix this I added this little snippet to my PowerShell profile:</p>
<pre class="brush: ps;">for($i = 1; $i -le 5; $i++){
  $u =  "".PadLeft($i,"u")
  $unum =  "u$i"
  $d =  $u.Replace("u","../")
  Invoke-Expression "function $u { push-location $d }"
  Invoke-Expression "function $unum { push-location $d }"
}</pre>
<p>This beautiful bit of code generates two sets of functions. One lets me move up a directory a given number of times by running a command like:</p>
<pre class="brush: ps;">&gt; u4</pre>
<p>This will move up four directories. The second set of functions does the same thing but by typing <strong>u</strong> the number of times you want to traverse up:</p>
<pre class="brush: ps;">&gt; uuuu</pre>
<p>Now I can hear you saying “Hey Matt, You claim to be all about being fast from the command line so why would you ever run the command <strong>uuuu </strong>when you can just run <strong>u4</strong>?” </p>
<p>That is an astute observation nameless reader! But sometimes I am in a mood where it is satisfying to press one key repeatedly. Ok?</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/launching-the-tortoisehg-log-more-conveniently-from-the-command-line/"     class="crp_title">Launching the TortoiseHg log more conveniently from the&hellip;</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-3-released/"     class="crp_title">Chutzpah 2.3 Released</a></li><li><a href="http://matthewmanela.com/blog/making-an-executable-take-pipelined-input-in-powershell/"     class="crp_title">Making an executable take pipelined input in PowerShell</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-4-code-coverage-is-a-go/"     class="crp_title">Chutzpah 2.4 &ndash; Code Coverage is a go!</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-2-0-released/"     class="crp_title">Chutzpah 1.2.0 Released</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Farblondzshet/~4/te9w9hsEL48" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://matthewmanela.com/blog/quickly-moving-up-a-directory-tree/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Chutzpah 2.1 now with CoffeeScript support</title>
		<link>http://matthewmanela.com/blog/chutzpah-2-1-now-with-coffeescript-support/</link>
		<comments>http://matthewmanela.com/blog/chutzpah-2-1-now-with-coffeescript-support/#comments</comments>
		<pubDate>Sun, 09 Sep 2012 04:51:54 +0000</pubDate>
		<dc:creator>Matthew</dc:creator>
				<category><![CDATA[Chutzpah]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://matthewmanela.com/?p=1517</guid>
		<description><![CDATA[Chutzpah 2.1 is now available. This release contains a few new features but most notable is that Chutzpah can now work directly on CoffeeScript files. You can enjoy the new bits from CodePlex, NuGet or go to the Visual Studio &#8230; <a href="http://matthewmanela.com/blog/chutzpah-2-1-now-with-coffeescript-support/">Continue reading <span class="meta-nav">&#8594;</span></a><div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/chutzpah-2-2-with-typescript-support/"     class="crp_title">Chutzpah 2.2 with TypeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-4-0-released/"     class="crp_title">Chutzpah 1.4.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-2-0-released/"     class="crp_title">Chutzpah 1.2.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-3-released/"     class="crp_title">Chutzpah 2.3 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-4-code-coverage-is-a-go/"     class="crp_title">Chutzpah 2.4 &ndash; Code Coverage is a go!</a></li></ul></div>]]></description>
				<content:encoded><![CDATA[<p>Chutzpah 2.1 is now available. This release contains a few new features but most notable is that Chutzpah can now work directly on <a href="http://coffeescript.org" target="_blank">CoffeeScript</a> files. You can enjoy the new bits from <a href="http://chutzpah.codeplex.com/">CodePlex</a>, <a href="http://nuget.org/List/Packages/Chutzpah">NuGet</a> or go to the Visual Studio Gallery to get the updated <a href="http://visualstudiogallery.msdn.microsoft.com/71a4e9bd-f660-448f-bd92-f5a65d39b7f0">Visual Studio Context Menu Extension</a>&nbsp; and <a href="http://visualstudiogallery.msdn.microsoft.com/f8741f04-bae4-4900-81c7-7c9bfb9ed1fe">Unit Test Explorer adapter for Visual Studio 2012</a>.</p>
<h2>Changes</h2>
<ul>
<li>Added support for writing tests in coffee script (<a href="http://chutzpah.codeplex.com/workitem/58">item 58</a>)&nbsp; &#8211; More details below
<li>Added option to ouput test results to XML file (<a href="http://chutzpah.codeplex.com/workitem/57">item 57</a>)
<li>Changed chutzpah.console.exe output to support VS error list integration (<a href="http://chutzpah.codeplex.com/workitem/48">item 48</a>)
<li>Tests complete doesn&#8217;t match total when using parallelism (<a href="http://chutzpah.codeplex.com/workitem/59">item 59</a>)</li>
</ul>
<h2>More about CoffeeScript Support</h2>
<p>Chutzpah now supports running unit tests you write in the <a href="http://coffeescript.org/">CoffeeScript</a> language. Chutzpah will automatically generate temporary JavaScript files for your referenced CoffeeScript files and use those to gather the test results.<br />For example given a CoffeeScript test file that references another CoffeeScript file:
<pre class="brush: js;">## &lt;reference path="../code/code.coffee" /&gt;

test "A basic test", -&gt;
  ok true, "this test is fine"
  value = "hello"
  equal "hello", value, "We expect value to be hello"
</pre>
<p>It will parse that file as well as the referenced code.coffee file and generate corresponding .js files. Notice the syntax for referencing other files. For CoffeeScript files Chutzpah uses comments that start with <b>##</b> to indicate a reference declaration.</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/chutzpah-2-2-with-typescript-support/"     class="crp_title">Chutzpah 2.2 with TypeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-4-0-released/"     class="crp_title">Chutzpah 1.4.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-2-0-released/"     class="crp_title">Chutzpah 1.2.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-3-released/"     class="crp_title">Chutzpah 2.3 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-4-code-coverage-is-a-go/"     class="crp_title">Chutzpah 2.4 &ndash; Code Coverage is a go!</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Farblondzshet/~4/KM8NlWX3gVI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://matthewmanela.com/blog/chutzpah-2-1-now-with-coffeescript-support/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Chutzpah 2.0 Released</title>
		<link>http://matthewmanela.com/blog/chutzpah-2-0-released/</link>
		<comments>http://matthewmanela.com/blog/chutzpah-2-0-released/#comments</comments>
		<pubDate>Sat, 14 Jul 2012 06:21:07 +0000</pubDate>
		<dc:creator>Matthew</dc:creator>
				<category><![CDATA[Chutzpah]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2012]]></category>

		<guid isPermaLink="false">http://matthewmanela.com/?p=1488</guid>
		<description><![CDATA[Chutzpah 2.0 is now available. This release contains many new and hopefully exciting changes. You can enjoy the new bits from CodePlex, NuGet or go to the Visual Studio Gallery to get the updated Visual Studio Context Menu Extension  and Unit &#8230; <a href="http://matthewmanela.com/blog/chutzpah-2-0-released/">Continue reading <span class="meta-nav">&#8594;</span></a><div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/chutzpah-1-3-0-released/"     class="crp_title">Chutzpah 1.3.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-1-now-with-coffeescript-support/"     class="crp_title">Chutzpah 2.1 now with CoffeeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-4-0-released/"     class="crp_title">Chutzpah 1.4.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-2-with-typescript-support/"     class="crp_title">Chutzpah 2.2 with TypeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-3-released/"     class="crp_title">Chutzpah 2.3 Released</a></li></ul></div>]]></description>
				<content:encoded><![CDATA[<p>Chutzpah 2.0 is now available. This release contains many new and hopefully exciting changes. You can enjoy the new bits from <a href="http://chutzpah.codeplex.com/">CodePlex</a>, <a href="http://nuget.org/List/Packages/Chutzpah">NuGet</a> or go to the Visual Studio Gallery to get the updated <a href="http://visualstudiogallery.msdn.microsoft.com/71a4e9bd-f660-448f-bd92-f5a65d39b7f0">Visual Studio Context Menu Extension</a>  and <a href="http://visualstudiogallery.msdn.microsoft.com/f8741f04-bae4-4900-81c7-7c9bfb9ed1fe">Unit Test Explorer adapter for Visual Studio 2012</a>.</p>
<h2>Notable Changes</h2>
<h4>Streaming of test results</h4>
<p>The previous version of Chutzpah would only report test results after the whole test file was finished. Version 2.0 re-architects how Chutzpah communicates with <a href="http://phantomjs.org/" target="_blank">PhantomJS</a> to stream the results in real-time. This change leads to a much more responsive test running experience. The streaming change enabled the addition of the TestStart, FileLog and FileError methods to the execution callback interfaces.</p>
<div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:dacdf93e-d9cd-4dea-a345-de9689f9ae63" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 4;  toolbar: false;  width: 837px; height: 315px;" style="width: 837px; height: 315px; overflow: auto;">public interface ITestMethodRunnerCallback
{
  void TestSuiteStarted();
  void TestSuiteFinished(TestCaseSummary testResultsSummary);
  void FileStarted(string fileName);
  void FileFinished(string fileName, TestCaseSummary testResultsSummary);
  void TestStarted(TestCase testCase);
  void TestFinished(TestCase testCase);
  void ExceptionThrown(Exception exception, string fileName);
  void FileError(TestError error);
  void FileLog(TestLog log);
}</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<h4></h4>
<p>&nbsp;</p>
<h4>HTML Test Files are run in place</h4>
<p>When running Chutzpah on an existing HTML test harness it will no longer parse this file and generate its own test harness in the temp directory. Chutzpah now <em>trusts </em>the HTML test harness you give it and will just run the file. This will help support many of the fringe scenarios that were not supported well before. For JavaScript files Chutzpah will still generate its own test harness.</p>
<h4></h4>
<p>&nbsp;</p>
<h4>Parallel Test File Execution</h4>
<p>You can now specify through both the command line and through a Visual Studio options page a level of parallelism for Chutzpah. By default this is 1 but if you have a large number of test files putting a larger number results in a significant performance increase.</p>
<p>From the command line the new argument is</p>
<div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:61f57802-1db7-4b6c-99af-c84859850b53" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: plain; gutter: false; first-line: 1; tab-size: 4;  toolbar: false;  width: 883px; height: 52px;" style="width: 883px; height: 52px; overflow: auto;"> /parallelism n           : Max degree of parallelism for Chutzpah. (Defaults to 1)</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<p>In Visual Studio you can set this in the existing options page for the context menu extension and in the new options page for the Unit Test Explorer adapter:</p>
<p><a href="http://matthewmanela.com/wp-content/uploads/2012/07/image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://matthewmanela.com/wp-content/uploads/2012/07/image_thumb.png" alt="image" width="644" height="376" border="0" /></a><br />
&nbsp;</p>
<h4>Testing Mode Drop Down</h4>
<p>In the screenshot above you may have noticed the Testing Mode option. This is a new configuration option for the Chutzpah test adapter. This lets you choose whether Chutzpah will scan and run HTML files, JS files or both.</p>
<h4></h4>
<p>&nbsp;</p>
<h4>Improved RequireJS support</h4>
<p>I will write a full post to go into more detail about this but Chutzpah is now able to run tests that are using <a href="http://requirejs.org/" target="_blank">RequireJS</a>. This support isn’t perfect and you may need to tweak your RequireJS testing setup to make it work. There are a couple examples checked in which demonstrate this functionality. For an HTML test file <a href="http://chutzpah.codeplex.com/SourceControl/changeset/view/5778d8b09c25#Facts.Integration%2fJS%2fTest%2frequirejs%2fqunit-test.html" target="_blank">see here</a> and for running a JS file directly <a href="http://chutzpah.codeplex.com/SourceControl/changeset/view/5778d8b09c25#Facts.Integration%2fJS%2fCode%2fRequireJS%2fall.tests.qunit.js" target="_blank">see here</a>.<br />
&nbsp;</p>
<h4>Upgraded versions of Jasmine and QUnit</h4>
<p>When generating its own test harness Chutzpah will now use <a href="https://github.com/jquery/qunit" target="_blank">QUnit</a> 1.9 and <a href="http://pivotal.github.com/jasmine/" target="_blank">Jasmine</a> 1.2</p>
<p>&nbsp;</p>
<p>And as always if you have any ideas/bugs/suggestions or you want to contribute code please check out the <a href="http://chutzpah.codeplex.com/" target="_blank">Chutzpah CodePlex page</a>.</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/chutzpah-1-3-0-released/"     class="crp_title">Chutzpah 1.3.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-1-now-with-coffeescript-support/"     class="crp_title">Chutzpah 2.1 now with CoffeeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-4-0-released/"     class="crp_title">Chutzpah 1.4.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-2-with-typescript-support/"     class="crp_title">Chutzpah 2.2 with TypeScript support</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-3-released/"     class="crp_title">Chutzpah 2.3 Released</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Farblondzshet/~4/BcTaiK9pNXg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://matthewmanela.com/blog/chutzpah-2-0-released/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Snippet Designer now supports C++</title>
		<link>http://matthewmanela.com/blog/snippet-designer-now-supports-c/</link>
		<comments>http://matthewmanela.com/blog/snippet-designer-now-supports-c/#comments</comments>
		<pubDate>Tue, 19 Jun 2012 02:59:35 +0000</pubDate>
		<dc:creator>Matthew</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Snippet Designer]]></category>
		<category><![CDATA[Visual Studio 2012]]></category>

		<guid isPermaLink="false">http://matthewmanela.com/?p=1480</guid>
		<description><![CDATA[Snippet Designer 1.4.2 is available on the Visual Studio Gallery and on CodePlex. Visual Studio 2012 includes C++ snippet functionality. Snippet Designer 1.4.2 adds support for this functionality. &#160; C++ users rejoice!<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/snippet-designer-now-supports-visual-studio-2012-rc/"     class="crp_title">Snippet Designer now supports Visual Studio 2012 RC</a></li><li><a href="http://matthewmanela.com/blog/snippet-designer-1-4-0-released/"     class="crp_title">Snippet Designer 1.4.0 Released</a></li><li><a href="http://matthewmanela.com/blog/snippet-designer-1-3-1-released/"     class="crp_title">Snippet Designer 1.3.1 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-test-adapter-for-visual-studio-11-beta/"     class="crp_title">Chutzpah test adapter for Visual Studio 11 Beta</a></li><li><a href="http://matthewmanela.com/projects/chutzpah/"     class="crp_title">Chutzpah &#8211; A JavaScript Test Runner</a></li></ul></div>]]></description>
				<content:encoded><![CDATA[<p>Snippet Designer 1.4.2 is available on the <a href="http://visualstudiogallery.msdn.microsoft.com/B08B0375-139E-41D7-AF9B-FAEE50F68392">Visual Studio Gallery</a> and on <a href="http://snippetdesigner.codeplex.com/">CodePlex</a>. Visual Studio 2012 includes C++ snippet functionality. Snippet Designer 1.4.2 adds support for this functionality. </p>
<p><a href="http://matthewmanela.com/wp-content/uploads/2012/06/cpp.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="cpp" border="0" alt="cpp" src="http://matthewmanela.com/wp-content/uploads/2012/06/cpp_thumb.png" width="644" height="389"></a></p>
<p>&nbsp;</p>
<p>C++ users rejoice!</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/snippet-designer-now-supports-visual-studio-2012-rc/"     class="crp_title">Snippet Designer now supports Visual Studio 2012 RC</a></li><li><a href="http://matthewmanela.com/blog/snippet-designer-1-4-0-released/"     class="crp_title">Snippet Designer 1.4.0 Released</a></li><li><a href="http://matthewmanela.com/blog/snippet-designer-1-3-1-released/"     class="crp_title">Snippet Designer 1.3.1 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-test-adapter-for-visual-studio-11-beta/"     class="crp_title">Chutzpah test adapter for Visual Studio 11 Beta</a></li><li><a href="http://matthewmanela.com/projects/chutzpah/"     class="crp_title">Chutzpah &#8211; A JavaScript Test Runner</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Farblondzshet/~4/Rfamq-IE_Zg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://matthewmanela.com/blog/snippet-designer-now-supports-c/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Anatomy of the Chutzpah test adapter for VS 2012 RC</title>
		<link>http://matthewmanela.com/blog/anatomy-of-the-chutzpah-test-adapter-for-vs-2012-rc/</link>
		<comments>http://matthewmanela.com/blog/anatomy-of-the-chutzpah-test-adapter-for-vs-2012-rc/#comments</comments>
		<pubDate>Tue, 12 Jun 2012 23:22:07 +0000</pubDate>
		<dc:creator>Matthew</dc:creator>
				<category><![CDATA[Chutzpah]]></category>
		<category><![CDATA[Visual Studio 2012]]></category>

		<guid isPermaLink="false">http://matthewmanela.com/?p=1449</guid>
		<description><![CDATA[Note: The following post describes interfaces that are part of the VS 2012 RC. These are still subject to change and may be different when the final version is released. Coinciding with the release Visual Studio 2012 RC, I pushed &#8230; <a href="http://matthewmanela.com/blog/anatomy-of-the-chutzpah-test-adapter-for-vs-2012-rc/">Continue reading <span class="meta-nav">&#8594;</span></a><div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/chutzpah-2-0-released/"     class="crp_title">Chutzpah 2.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-1-now-with-coffeescript-support/"     class="crp_title">Chutzpah 2.1 now with CoffeeScript support</a></li><li><a href="http://matthewmanela.com/projects/chutzpah/"     class="crp_title">Chutzpah &#8211; A JavaScript Test Runner</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-2-0-released/"     class="crp_title">Chutzpah 1.2.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-2-with-typescript-support/"     class="crp_title">Chutzpah 2.2 with TypeScript support</a></li></ul></div>]]></description>
				<content:encoded><![CDATA[<p><em><span style="color: #ff0000;">Note: The following post describes interfaces that are part of the VS 2012 RC. These are still subject to change and may be different when the final version is released.</span></em></p>
<p>Coinciding with the release Visual Studio 2012 RC, I pushed an update of the <a href="http://chutzpah.codeplex.com/">Chutzpah</a> <a href="http://visualstudiogallery.msdn.microsoft.com/f8741f04-bae4-4900-81c7-7c9bfb9ed1fe">test adapter</a> for the Unit Test Explorer (UTE). I increased performance of the adapter through better caching and the new UTE notification feature which lets a test adapter notify the UTE when a test has changed.  With these changes, the Chutzpah adapter is a strong example of a file based test adapter.</p>
<p>The Chutzpah test adapter revolves around four interfaces:</p>
<ol>
<li><strong>ITestContainer</strong> – Represents a file that contains tests</li>
<li><strong>ITestContainerDiscoverer</strong> – Finds all files that contain tests</li>
<li><strong>ITestDiscoverer</strong> – Finds all tests within a test container</li>
<li><strong>ITestExecutor</strong> – Runs the tests found inside the test container</li>
</ol>
<p>This post will cover each of these interfaces, show Chutzpah’s implementations and describe how to debug test adapters.</p>
<h2>ITestContainer</h2>
<p>A test container is an object that contains tests (shocking right?). You can have a test container represent a file, folder, a dll or anything else.  For Chutzpah a test container represents a JavaScript test file.  The interface for a test container contains several members:</p>
<div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:0f011ae0-7add-4eb1-942b-989cd9780a27" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 4;  toolbar: false;  width: 600px; height: 310px;" style="width: 600px; height: 310px; overflow: auto;">public interface ITestContainer
{
  ITestContainerDiscoverer Discoverer { get; }
  string Source { get; }
  int CompareTo(ITestContainer other);
  ITestContainer Snapshot();
  IEnumerable&lt;Guid&gt; DebugEngines { get; }
  FrameworkVersion TargetFramework { get; }
  Architecture TargetPlatform { get; }
  bool IsAppContainerTestContainer { get; }
  IDeploymentData DeployAppContainer();
}</pre>
<p>&nbsp;</p>
</div>
<p>but the most important are:</p>
<ul>
<li><strong>Discoverer</strong> – An instance of a test container discoverer, this is covered this in the next section.</li>
<li><strong>Source</strong> – A string that identifies this test container. For Chutzpah this is the file path.</li>
<li><strong>CompareTo</strong> – Compares two test containers to see which is newer.</li>
</ul>
<p>To implement CompareTo the Chutzpah test container includes a timestamp field. When the container gets created the timestamp is set to the last modified time of the file (whose path is the source property). The CompareTo method checks if the sources are the same and then compares their timestamps:</p>
<div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:3eaf0ce8-5622-4408-93d7-8a4e0166b727" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 4;  toolbar: false;  width: 600px; height: 310px;" style="width: 600px; height: 310px; overflow: auto;">public int CompareTo(ITestContainer other)
{
    var testContainer = other as JsTestContainer;
    if (testContainer == null)
    {
        return -1;
    }

    var result = String.Compare(this.Source, testContainer.Source, StringComparison.OrdinalIgnoreCase);
    if (result != 0)
    {
        return result;
    }

    return this.timeStamp.CompareTo(testContainer.timeStamp);
}</pre>
<p>&nbsp;</p>
</div>
<p>You can view Chutzpah’s implementation of ITestContainer in <a href="http://chutzpah.codeplex.com/SourceControl/changeset/view/7fd3a69f08cd#VS11.Plugin%2fJsTestContainer.cs" target="_blank">JsTestContainer.cs</a>.</p>
<h2><strong>ITestContainerDiscoverer</strong></h2>
<p>A container discoverer is responsible for finding test containers and returning them to the UTE. It has a simple interface:</p>
<div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:94a1e91f-f048-443c-8067-6b212d41f78f" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 4;  toolbar: false;  width: 646px; height: 272px;" style="width: 646px; height: 272px; overflow: auto;">public interface ITestContainerDiscoverer
{
	Uri ExecutorUri { get; }
	IEnumerable&lt;ITestContainer&gt; TestContainers { get; }
	event EventHandler TestContainersUpdated;
}</pre>
<p>&nbsp;</p>
</div>
<ul>
<li><strong>ExecuteUri</strong> &#8211; A string which uniquely identifies a test adapter. This string is used to tie a container discoverer with a test discoverer and executor.</li>
<li><strong>TestContainersUpdated</strong> – An event to invoke when test containers are found or are changed.</li>
<li><strong>TestContainers</strong> &#8211; A property which returns the discovered test containers. This is called when the UTE when a solution is first loaded, before unit tests are executed and after you fire the TestContainersUpdated event.</li>
</ul>
<p>Since the TestContainers property is called often it is crucial that it returns quickly. In Chutzpah’s initial implementation the whole solution was scanned each time looking for test files and returning containers for them. This was far too slow. Thus, the current implementation it keeps a cached list of test containers which are updated incrementally by monitoring solution and file events. When the TestContainers property is called the cached list is returned.</p>
<p>To manage the cached list of test containers the container discoverer subscribes to <a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivssolutionevents(v=vs.110).aspx" target="_blank">IVsSolutionEvents</a> for solution events, <a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivstrackprojectdocumentsevents2.aspx" target="_blank">IVsTrackProjectDocumentsEvents2</a> for project events and use a <a href="http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher(v=vs.110).aspx" target="_blank">FileSystemWacther</a> for file events.</p>
<p>IVsSolutionEvents fires events when projects and solutions are loaded and unloaded. When a project is loaded the discoverer scans for JavaScript files, checks if they contain tests and adds them to the containers list. On project unload its test containers are removed from the list. IVsTrackProjectDocumentsEvents2 fires events when a file is added, removed or renamed in a project. When these events occur test containers are added or removed. FileSystemWacther fires events when the content of the file has changed. File watchers are added to monitor each JS file in the solution to detect when they change. Whenever a change happens the test container list is updated with a new instance of a test container and the old instance is removed.</p>
<p>To help keep the list of test containers small the container discoverer doesn’t create test containers for all JS files. When an event occurs on a file it is opened and checked to see if it contains tests. If it does then a test container for it is added to the list. This saves the ITestDiscoverer from needed to do extra work and results in a quicker testing experience.</p>
<p>You can see the implementation of these interfaces in <a href="http://chutzpah.codeplex.com/SourceControl/changeset/view/7fd3a69f08cd#VS11.Plugin%2fJsTestContainerDiscoverer.cs" target="_blank">JsTestContainerDiscoverer.cs</a>, <a href="http://chutzpah.codeplex.com/SourceControl/changeset/view/7fd3a69f08cd#VS11.Plugin%2fEventWatchers%2fSolutionEventsListener.cs" target="_blank">SolutionEventsListener.cs</a>, <a href="http://chutzpah.codeplex.com/SourceControl/changeset/view/7fd3a69f08cd#VS11.Plugin%2fEventWatchers%2fTestFileAddRemoveListener.cs" target="_blank">TestFileAddRemoveListener.cs</a> and <a href="http://chutzpah.codeplex.com/SourceControl/changeset/view/7fd3a69f08cd#VS11.Plugin%2fEventWatchers%2fTestFilesUpdateWatcher.cs" target="_blank">TestFilesUpdateWatcher.cs</a>.</p>
<h2><strong>ITestDiscoverer</strong></h2>
<p>Now that the UTE has the test containers the next step is discovering what tests are within them. The UTE looks for an implementation of ITestDiscoverer that has an <strong>DefaultExecutorUri</strong> attribute set to the same value as the <strong>ExecutorUri</strong> property in ITestContainerDiscoverer.</p>
<p>This interface contains one method.</p>
<div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:f094f18b-e2b0-4c3a-99aa-84957aec5825" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 4;  toolbar: false;  width: 646px; height: 272px;" style="width: 646px; height: 272px; overflow: auto;">public interface ITestDiscoverer
{
  void DiscoverTests(
          IEnumerable&lt;string&gt; sources,
          IDiscoveryContext discoveryContext,
          IMessageLogger logger,
          ITestCaseDiscoverySink discoverySink);
}</pre>
<p>&nbsp;</p>
</div>
<p>The key arguments are <strong>sources</strong> and <strong>discoverySink</strong>. Each string in the sources corresponds to the <strong>Source</strong> property on a test container. The discoverySink argument is an instance of ITestCaseDiscoverySink which also contains one method:</p>
<div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:e969fec1-d7a6-4fec-9c39-dc743b673a4d" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 4;  toolbar: false;  width: 692px; height: 195px;" style="width: 692px; height: 195px; overflow: auto;">public interface ITestCaseDiscoverySink
{
  void SendTestCase(TestCase discoveredTest);
}</pre>
<p>&nbsp;</p>
</div>
<p>For each source in the sources list the test discoverer will open that file and scan it for tests. For each test found a test case object is created and sent to the discovery sink.</p>
<p>In addition, the test discovery implementation needs the <strong>FileExtension </strong>attribute set to the file extension the discoverer is interested, for Chutzpah this is <strong>.js</strong>. Here is Chutzpah’s test discovery class:</p>
<div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:3ca96f5c-b93a-423a-a952-753dd5137fcb" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 4;  toolbar: false;  width: 745px; height: 248px;" style="width: 745px; height: 248px; overflow: auto;">[FileExtension(".js")]
[DefaultExecutorUri(Constants.ExecutorUriString)]
public class JsTestDiscoverer :ITestDiscoverer
{
    public void DiscoverTests(IEnumerable&lt;string&gt; sources,
                              IDiscoveryContext discoveryContext,
                              IMessageLogger logger,
                              ITestCaseDiscoverySink discoverySink)
    {
        var chutzpahRunner = TestRunner.Create();
        foreach (var testCase in chutzpahRunner.DiscoverTests(sources))
        {
            var vsTestCase = testCase.ToVsTestCase();
            discoverySink.SendTestCase(vsTestCase);
        }
    }
}</pre>
<p>&nbsp;</p>
</div>
<p>You can also view this on CodePlex in <a href="http://chutzpah.codeplex.com/SourceControl/changeset/view/c1485d31095f#VS11.Plugin%2fJsTestDiscoverer.cs" target="_blank">JsTestDiscoverer.cs</a>.</p>
<h2>ITestExecutor</h2>
<p>And finally we arrive at the last step in the process which is test execution. A test executor implements the ITestExecutor interface and has an <strong>ExtensionUri</strong> attribute on it that defines the executor uri we saw earlier. The ITestExecutor interface contains three members:</p>
<div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:9a317ab8-4716-4a7d-b647-938dc9ac4edc" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 4;  toolbar: false;  width: 745px; height: 248px;" style="width: 745px; height: 248px; overflow: auto;">public interface ITestExecutor
{
  void RunTests(IEnumerable&lt;string&gt; sources, IRunContext runContext, IFrameworkHandle frameworkHandle);
  void RunTests(IEnumerable&lt;TestCase&gt; tests, IRunContext runContext, IFrameworkHandle frameworkHandle);
  void Cancel();
}</pre>
<p>&nbsp;</p>
</div>
<ul>
<li><strong>RunTests(string)</strong> &#8211; Called when running all tests. It receives a collection of strings which correspond to the sources in the test containers.</li>
<li><strong>RunTests(TestCase)</strong> – Called when running selected tests. Chutzpah doesn’t yet support running individual tests (it runs the whole js file). It will grab the test container source from the TestCase object and call the other RunTests method that takes a list of test container sources.</li>
<li><strong>Cancel</strong> -  Called when the user tries to cancel the test. Chutzpah doesn’t implement this yet.</li>
</ul>
<p>Here is Chutzpah’s test execution class:</p>
<div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:2d0bcaf7-47d7-4b89-a6b7-57270ad4559b" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 4;  toolbar: false;  width: 791px; height: 562px;" style="width: 791px; height: 562px; overflow: auto;">[ExtensionUri(Constants.ExecutorUriString)]
public class JsTestExecutor : ITestExecutor
{
  public void Cancel()
  {
          // Will add code here when streaming tests is implemented
  }

  public void RunTests(IEnumerable&lt;string&gt; sources, IRunContext runContext, IFrameworkHandle frameworkHandle)
  {
          if (runContext.IsDataCollectionEnabled)
          {
              // DataCollectors like Code Coverage are currently unavailable for JavaScript
              frameworkHandle.SendMessage(TestMessageLevel.Warning, "DataCollectors like Code Coverage are unavailable for JavaScript");
          }

    var chutzpahRunner = TestRunner.Create();
    var callback = new ExecutionCallback(frameworkHandle);
    chutzpahRunner.RunTests(sources, callback);
  }

  public void RunTests(IEnumerable&lt;TestCase&gt; tests, IRunContext runContext, IFrameworkHandle frameworkHandle)
  {
    // We'll just punt and run everything in each file that contains the selected tests
    var sources = tests.Select(test =&gt; test.Source).Distinct();
    RunTests(sources, runContext, frameworkHandle);
  }
}</pre>
<p>&nbsp;</p>
</div>
<p>In the above code the IFrameworkHandle argument on the RunTests is wrapped in an ExecutionCallback class. This class implements the TestFinished callback that Chutzpah calls when running tests. The results of the test are converted into TestCase and TestResult objects and are passed to methods on the IFrameworkHandle object. The IFrameworkHandle interface inherits from ITestExecutionRecorder which provides methods for recording the beginning, end and results of a test case.</p>
<div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:06c69c3c-b499-442e-a1b3-12a30a61b5fe" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 4;  toolbar: false;  width: 791px; height: 253px;" style="width: 791px; height: 253px; overflow: auto;">  public interface ITestExecutionRecorder : IMessageLogger
  {
    void RecordResult(TestResult testResult);

    void RecordStart(TestCase testCase);

    void RecordEnd(TestCase testCase, TestOutcome outcome);

    void RecordAttachments(IList&lt;AttachmentSet&gt; attachmentSets);
  }</pre>
<p>&nbsp;</p>
</div>
<p>Inside of TestFinished, the methods RecordStart, RecordResult and RecordEnd are called:</p>
<div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:2397d9d8-9407-4788-bb64-ccbc22b3f6d7" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 4;  toolbar: false;  width: 791px; height: 253px;" style="width: 791px; height: 253px; overflow: auto;">public void TestFinished(Chutzpah.Models.TestResult result)
{
  var testCase = result.ToVsTestCase();
  var vsresult = result.ToVsTestResult();
  var outcome = result.ToVsTestOutcome();

  // The test case is starting
  frameworkHandle.RecordStart(testCase);

  // Record a result (there can be many)
  frameworkHandle.RecordResult(vsresult);

  // The test case is done
  frameworkHandle.RecordEnd(testCase, outcome);
}</pre>
<p>&nbsp;</p>
</div>
<p>It may seem odd that Chutzpah is invoking both RecordStart and RecordEnd from its TestFinished method but this is a result of Chutzpah’s execution of test files. Chutzpah executes the whole  JS  test file and collects the results. This means that it can’t notify when an individual test has started until the test is already completed. There are plans to change this in the future by adding the ability to stream test results while a test file is running.</p>
<p>You can view Chutzpah’s implementation of ITestExecutor in <a href="http://chutzpah.codeplex.com/SourceControl/changeset/view/c1485d31095f#VS11.Plugin%2fJsTestExecutor.cs" target="_blank">JsTestExecutor.cs</a>.</p>
<h2>Debugging Test Adapters</h2>
<p>The UTE will call into the interfaces listed above from three different processes. In order to debug, you must be attached to the correct ones.</p>
<ul>
<li>ITestContainerDiscoverer is called from the main Visual Studio process named devenv.exe. This is the default process you attach to when debugging.</li>
<li>ITestDiscoverer is called from a process named vstest.discoveryengine.x86.exe. This process starts when the UTE is first opened.</li>
<li>ITestExecutor is called from a process named vstest.executionengine.x86.exe. This process starts during first discovery pass.</li>
</ul>
<p>If you are attached to all three then you can be sure that your breakpoints will be hit.</p>
<p>&nbsp;</p>
<p>That was a quick tour of Chutzpah&#8217;s test adapter implementation. When the final version of Visual Studio 2012 is released I will update this post to reflect any changes.</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/chutzpah-2-0-released/"     class="crp_title">Chutzpah 2.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-1-now-with-coffeescript-support/"     class="crp_title">Chutzpah 2.1 now with CoffeeScript support</a></li><li><a href="http://matthewmanela.com/projects/chutzpah/"     class="crp_title">Chutzpah &#8211; A JavaScript Test Runner</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-1-2-0-released/"     class="crp_title">Chutzpah 1.2.0 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-2-2-with-typescript-support/"     class="crp_title">Chutzpah 2.2 with TypeScript support</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Farblondzshet/~4/Sk3XyM_kUrU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://matthewmanela.com/blog/anatomy-of-the-chutzpah-test-adapter-for-vs-2012-rc/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Snippet Designer now supports Visual Studio 2012 RC</title>
		<link>http://matthewmanela.com/blog/snippet-designer-now-supports-visual-studio-2012-rc/</link>
		<comments>http://matthewmanela.com/blog/snippet-designer-now-supports-visual-studio-2012-rc/#comments</comments>
		<pubDate>Sun, 10 Jun 2012 05:58:20 +0000</pubDate>
		<dc:creator>Matthew</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Snippet Designer]]></category>

		<guid isPermaLink="false">http://matthewmanela.com/?p=1462</guid>
		<description><![CDATA[Snippet Designer 1.4.1 is now available on the Visual Studio Gallery and on CodePlex which adds support for Visual Studio 2012 RC. Happy Snippeting!<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/snippet-designer-now-supports-c/"     class="crp_title">Snippet Designer now supports C++</a></li><li><a href="http://matthewmanela.com/blog/snippet-designer-1-4-0-released/"     class="crp_title">Snippet Designer 1.4.0 Released</a></li><li><a href="http://matthewmanela.com/blog/snippet-designer-1-3-1-released/"     class="crp_title">Snippet Designer 1.3.1 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-test-adapter-for-visual-studio-11-beta/"     class="crp_title">Chutzpah test adapter for Visual Studio 11 Beta</a></li><li><a href="http://matthewmanela.com/projects/chutzpah/"     class="crp_title">Chutzpah &#8211; A JavaScript Test Runner</a></li></ul></div>]]></description>
				<content:encoded><![CDATA[<p>Snippet Designer 1.4.1 is now available on the <a href="http://visualstudiogallery.msdn.microsoft.com/B08B0375-139E-41D7-AF9B-FAEE50F68392" target="_blank">Visual Studio Gallery</a> and on <a href="http://snippetdesigner.codeplex.com/" target="_blank">CodePlex</a> which adds support for Visual Studio 2012 RC.</p>
<p><a href="http://matthewmanela.com/wp-content/uploads/2012/06/image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://matthewmanela.com/wp-content/uploads/2012/06/image_thumb.png" alt="image" width="644" height="377" border="0" /></a></p>
<p>Happy Snippeting!</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://matthewmanela.com/blog/snippet-designer-now-supports-c/"     class="crp_title">Snippet Designer now supports C++</a></li><li><a href="http://matthewmanela.com/blog/snippet-designer-1-4-0-released/"     class="crp_title">Snippet Designer 1.4.0 Released</a></li><li><a href="http://matthewmanela.com/blog/snippet-designer-1-3-1-released/"     class="crp_title">Snippet Designer 1.3.1 Released</a></li><li><a href="http://matthewmanela.com/blog/chutzpah-test-adapter-for-visual-studio-11-beta/"     class="crp_title">Chutzpah test adapter for Visual Studio 11 Beta</a></li><li><a href="http://matthewmanela.com/projects/chutzpah/"     class="crp_title">Chutzpah &#8211; A JavaScript Test Runner</a></li></ul></div><img src="http://feeds.feedburner.com/~r/Farblondzshet/~4/Dp3ZewUxg7c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://matthewmanela.com/blog/snippet-designer-now-supports-visual-studio-2012-rc/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
