<?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>Ryan Greenhall &#187; Uncategorized</title>
	<atom:link href="http://www.ryangreenhall.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ryangreenhall.com</link>
	<description>Thoughts on Software Development</description>
	<lastBuildDate>Sun, 21 Aug 2011 15:28:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Introducing Insight: A Dashboard to Collate Status information from Multiple Application Instances</title>
		<link>http://www.ryangreenhall.com/2011/08/introducing-insight-a-dashboard-to-collate-status-information-from-multiple-application-instances/</link>
		<comments>http://www.ryangreenhall.com/2011/08/introducing-insight-a-dashboard-to-collate-status-information-from-multiple-application-instances/#comments</comments>
		<pubDate>Sun, 21 Aug 2011 15:28:22 +0000</pubDate>
		<dc:creator>Ryan Greenhall</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ryangreenhall.com/?p=157</guid>
		<description><![CDATA[The goal of insight is to help teams have greater visibility of the state of the software they are deploying.  Insight makes it easy to answer questions such as: are all nodes running the same version? Are all nodes pointing at the correct database?  Are all the instances running?  In short, being [...]]]></description>
			<content:encoded><![CDATA[<p>The goal of <a href="https://github.com/ryangreenhall/insight">insight</a> is to help teams have greater visibility of the state of the software they are deploying.  Insight makes it easy to answer questions such as: are all nodes running the same version? Are all nodes pointing at the correct database?  Are all the instances running?  In short, being able to answer these questions takes a lot of the stress out of performing a release.  I was introduced to this style of dashboard by <a href="http://www.magpiebrain.com/">Sam Newman</a> and have used them extensively ever since.</p>
<p><img src="http://www.ryangreenhall.com/wp-content/uploads/2011/08/insight-small.png" alt="insight dashboard" /></p>
<h2>Configuration</h2>
<p>Insight relies on web applications exposing their configuration properties as a resource represented as JSON.  For example, a request to http://mywebapp:8080/internal/status.json responds with:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>
    <span style="color: #3366CC;">&quot;username&quot;</span> <span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #3366CC;">&quot;value&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;user&quot;</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;type&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;property&quot;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    <span style="color: #3366CC;">&quot;end.point&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #3366CC;">&quot;value&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://end.point.i.need.to.talk.to&quot;</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;type&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;integration&quot;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    <span style="color: #3366CC;">&quot;number.of.requests.in.last.hour&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #3366CC;">&quot;value&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;1678&quot;</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;type&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;event&quot;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>I started the project over a year ago as a breakable toy in order to learn Node.  It has proved useful at <a href="http://www.forwardtechnology.co.uk/">Forward</a> and a recent facelift by <a href="http://www.red-root.com">Luke Williams</a> has prompted me to advertise it for use by others.</p>
<p>Feedback most welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ryangreenhall.com/2011/08/introducing-insight-a-dashboard-to-collate-status-information-from-multiple-application-instances/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Non Descriptive Scenario Method Name</title>
		<link>http://www.ryangreenhall.com/2008/10/non-descriptive-scenario-method-name/</link>
		<comments>http://www.ryangreenhall.com/2008/10/non-descriptive-scenario-method-name/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 19:14:00 +0000</pubDate>
		<dc:creator>Ryan Greenhall</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ryangreenhall.com/2008/10/non-descriptive-scenario-method-name/</guid>
		<description><![CDATA[This is the first entry in a series of posts that provide practical advice on how to avoid or refactor away from common functional testing smells.
Non descriptive scenario method names can easily be identified by the presence of extremely short method names that provide little or no insight into the scenario being executed.  For [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first entry in a series of posts that provide practical advice on how to avoid or refactor away from common functional testing smells.</p>
<p>Non descriptive scenario method names can easily be identified by the presence of extremely short method names that provide little or no insight into the scenario being executed.  For example:</p>
<pre>     <span style="color: blue;">public class </span>SignInAcceptanceScenarios {

         <span style="color: darkgoldenrod;">@Test</span>
<span style="color: blue;">         public void</span> signIn() {
         }
     }</pre>
<p>So, what sign in scenario is being executed here? Known user? Unknown user? The only way to find out is to read what the method is doing.  Variations on this theme include partial attempts to describe the scenario.  For example:</p>
<pre>     <span style="color: blue;">public class </span>SignInAcceptanceScenarios {

         <span style="color: darkgoldenrod;">@Test</span>         <span style="color: blue;">
         public void</span> signInHappyScenario() {
         }

         <span style="color: darkgoldenrod;">@Test</span>         <span style="color: blue;">
         public void</span> signInSadScenario() {
         }
     }</pre>
<p>Using story and scenario identifiers in scenario method names should also be avoided.  Who would like to hazard a guess as to what behaviour the following scenarios describe?</p>
<pre>     <span style="color: blue;">public class </span>SignInAcceptanceScenarios {

         <span style="color: darkgoldenrod;">@Test</span>
         <span style="color: blue;">public void</span> story145Scenario1() {
         }

         <span style="color: darkgoldenrod;">@Test</span>
         <span style="color: blue;">public void</span> story145Scenario2() {
         }

         <span style="color: darkgoldenrod;">@Test</span>
         <span style="color: blue;">public void</span> story345Scenario1() {
         }
     }</pre>
<p>The use of scenario revealing method names in each of the examples would be far more helpful.</p>
<h3>Scenario Revealing Method Names</h3>
<p>I tend to prefer descriptive method names that describe the scenario being executed. A downside of this style is that it can lead to some very long method names. However, I would rather read a longer method name than a shorter one that has some important part of the scenario missing. Alternatively, if method names get ridiculously long then they can often be rephrased in a more concise manner. Personally I don&#8217;t worry too much about long method names. When writing scenarios I aim for an accurate and clear description of the scenario being executed.</p>
<p>Non descriptive scenario methods can easily be renamed, once the scenario has been understood, so that the scenario is clearly described using a scenario revealing method name.  For example:</p>
<pre>     <span style="color: blue;">public class</span> SignInAcceptanceScenarios {

         <span style="color: darkgoldenrod;">@Test</span>         <span style="color: blue;">
         public void</span> shouldPresentKnownUserWithTheWelcomePage() {
         }

         <span style="color: darkgoldenrod;">@Test</span>         <span style="color: blue;">
         public void</span> shouldDeclineUnknownUserAndAskThemToTryAgain() {
         }

         <span style="color: darkgoldenrod;">@Test</span>
         <span style="color: blue;">public void</span> shouldLockAccountAfterThreeSubsequentFailedSignInAttempt() {
         }
     }</pre>
<p>A subtle alternative to prefixing scenario method names with &#8217;should&#8217; is to simply provide a description of the expected behaviour.  I shall leave it as an exercise for readers to decide which style they prefer. My only advice, as with most things when developing software, is to be consistent.  For example:</p>
<pre>     <span style="color: blue;">public class</span> SignInAcceptanceScenarios {

         <span style="color: darkgoldenrod;">@Test</span>
         <span style="color: blue;">public void</span> knownUserIsPresentedWithTheWelcomePage() {
         }

         <span style="color: darkgoldenrod;">@Test</span>
         <span style="color: blue;">public void</span> unknownUserIsDeclinedAndAskedToTryAgain() {
         }

         <span style="color: darkgoldenrod;">@Test</span>
         <span style="color: blue;">public void</span> userAccountIsLockedAfterThreeSubsequentFailedSignInAttempts() {
         }
     }</pre>
<p>Scenario revealing methods are a huge improvement over their less descriptive counterparts, allowing readers to quickly grasp the intended behaviour<br />
of a given functional area.  The improved SignInAcceptanceScenarios class really does serve as documentation describing the behaviour of the sign in functionality provided by the application.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ryangreenhall.com/2008/10/non-descriptive-scenario-method-name/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
	</channel>
</rss>

