<?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>blog of josh &#187; cloud</title>
	<atom:link href="http://landofjosh.com/tag/cloud/feed/" rel="self" type="application/rss+xml" />
	<link>http://landofjosh.com</link>
	<description>software development under the big arch</description>
	<lastBuildDate>Thu, 22 Oct 2009 06:26:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>I have assembled the Triforce</title>
		<link>http://landofjosh.com/2009/10/i-have-assembled-the-triforce/</link>
		<comments>http://landofjosh.com/2009/10/i-have-assembled-the-triforce/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 06:26:24 +0000</pubDate>
		<dc:creator>josh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bespin]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[mercurial]]></category>
		<category><![CDATA[teamcity]]></category>

		<guid isPermaLink="false">http://landofjosh.com/?p=213</guid>
		<description><![CDATA[Recently I put in the final piece of a mini project I&#8217;d been thinking about for a while.  I made a change to an Agent Ralph source file and committed it to my Mercurial repo.  Within about a minute I was browsing the MbUnit test results.  Now that may not sound very exciting, but it [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I put in the final piece of a mini project I&#8217;d been thinking about for a while.  I made a change to an <a href="http://agentralphplugin.googlecode.com/"><span style="color: #000000;"><span style="text-decoration: none;">Agent Ralph</span></span></a> source file and committed it to my <a href="http://mercurial.selenic.com/wiki/"><span style="color: #000000;"><span style="text-decoration: none;">Mercurial</span></span></a> repo.  Within about a minute I was browsing the <a href="http://www.mbunit.com/"><span style="color: #000000;"><span style="text-decoration: none;">MbUnit</span></span></a> test results.  Now that may not sound very exciting, but it is.  It is because all of this was conducted online, through my browser, on a pc that didn&#8217;t have Mercurial, Visual Studio, or any development tools whatsoever.  I was coding in the cloud, baby.</p>
<div style="margin-top: 0px; margin-bottom: 0px; text-align: left;">
<p>Now with Agent Ralph I have boiled my unit tests down to the point where they are just code snippets.  Adding a new test case is as simple as dropping a csharp file into a directory.  It is automatically picked up and fed into a test harness, which parses the code and gets all Ralphy on it.  Here&#8217;s a sample, right out of the repo:</p>
<pre name="code" class="csharp">using System;
namespace AgentRalph.CloneCandidateDetectionTestData
{
    public class CloneInForeachBlock
    {
        void Target()
        {
            foreach (int i in new int[] { })
            {
                /* BEGIN */
                Console.WriteLine(7);
                /* END */
            }
        }

        private void Expected()
        {
            Console.WriteLine(7);
        }
    }
}</pre>
<p>This sample comes from the <a href="http://code.google.com/p/agentralphplugin/source/browse/#hg/Ralph.NRefactory/CloneCandidateDetectionTestData%3Fstate%3Dclosed">CloneCandidateDetectionTestData</a> folder.  Any file in that folder is assumed to hold a class containing at least two methods, Target and Expected.  Target is scanned for clones, and the test passes if a clone is found that matches Expected AND consists of all the code between the START and END &#8216;markup&#8217; embedded in the comments.   Thanks to the magic of MbUnit&#8217;s generative tests each code file appears as it&#8217;s own test, as if each were a method with it&#8217;s own [Test] attribute.  So you see, whipping up new tests is crazy easy.</p>
<p>Occasionally an idea for a test case will come to me, and it&#8217;s usually when I&#8217;m at a place where I have no access to Agent Ralph code.  Like work.  Typically I&#8217;d make some notes in an email and code it up when I got home.  It got me thinking, I don&#8217;t really need Visual Studio and the whole dev setup to create these test cases.  They&#8217;re just simple code snippets, scraped out of a directory.  I could be scraping them from anywhere, like off a wiki even.  The next thought of course was to run that test automatically.  How could I put this all together?</p>
<div style="margin-top: 0px; margin-bottom: 0px;">
<p>Building and running tests is easy, any continuous integration server would do.  I chose <a href="http://www.jetbrains.com/teamcity/">TeamCity</a>, which we&#8217;ve been using at work and is just great.  I can&#8217;t say enough nice things about it.  For this mini-project, it&#8217;s easy third party report integration and build artifact downloading features were exactly what I wanted.  A little dyndns magic and I had it <a href="http://jbuedel.isa-geek.net">online</a>.  My MbUnit <a href="http://jbuedel.isa-geek.net/viewLog.html?buildId=54&amp;buildTypeId=bt2&amp;tab=Gallio_Test_Report">tests</a> look pretty nice I think.</p>
<p>At some point I stumbled across Bespin.  <a href="https://bespin.mozilla.com/">Bespin</a> is a Mozilla project that &#8220;proposes an open extensible web-based framework for code editing&#8221;.  It&#8217;s a web based, code centric text editor, and more.  One part of the more is version control integration.  Mercurial is supported, which is what I use for Agent Ralph.  I can pull down the code, hack on it, and push changes back out to the Google code hosted repository, all right in the browser.  There&#8217;s the missing piece, my editor.</p>
<p>And of course, <a href="http://code.google.com/">Google Code</a> is the glue that brings them together.</div>
<p>And there you have it, coding in the cloud!  This graphic ought to help you fully grasp the awesomeness.</p>
<p><img class="aligncenter size-full wp-image-214" title="MyForce" src="http://landofjosh.com/wp-content/uploads/2009/10/MyForce.png" alt="MyForce" width="300" height="300" /></div>
]]></content:encoded>
			<wfw:commentRss>http://landofjosh.com/2009/10/i-have-assembled-the-triforce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
