<?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>patrickwilsonwelsh.com</title>
	<atom:link href="http://patrickwilsonwelsh.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://patrickwilsonwelsh.com</link>
	<description>Agile coding, agile testing, agile coaching, the agile enterprise, and Network Weaving.</description>
	<lastBuildDate>Sat, 04 Sep 2010 01:13:04 +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>Selenium RC Patterns: Self-Verifying Page Objects</title>
		<link>http://patrickwilsonwelsh.com/?p=343</link>
		<comments>http://patrickwilsonwelsh.com/?p=343#comments</comments>
		<pubDate>Sat, 04 Sep 2010 00:53:12 +0000</pubDate>
		<dc:creator>patrickwilsonwelsh</dc:creator>
				<category><![CDATA[Agility]]></category>
		<category><![CDATA[SW Mgmt]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[agile testing]]></category>

		<guid isPermaLink="false">http://patrickwilsonwelsh.com/?p=343</guid>
		<description><![CDATA[[Part of a series of posts on Java Selenium RC patterns I find useful.] What we Want: Expressive, Succinct Tests Let&#8217;s say I want to test that I can log into an app. I want my Selenium RC Java test code to look something like this, because I want it to read, aloud, the way [...]]]></description>
			<content:encoded><![CDATA[<p>[Part of a <a href="http://patrickwilsonwelsh.com/?p=332" target="_blank">series of posts on Java Selenium RC patterns I find useful</a>.]</p>
<h3>What we Want: Expressive, Succinct Tests</h3>
<p>Let&#8217;s say I want to test that I can log into an app. I want my Selenium RC Java test code to look something like this, because I want it to read, aloud, the way I would describe actually logging in and checking that everything went mostly OK:</p>

<div class="wp_syntax"><div class="code"><pre class="java5" style="font-family:monospace;">@Test
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #006600; font-weight: bold;">void</span> canLoginToFatFreeCRM<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399; font-weight: bold;">Exception</span> <span style="color: #009900;">&#123;</span>
  LoginPage loginPage = <span style="color: #000000; font-weight: bold;">new</span> LoginPage<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  DashBoard homePage = loginPage.<span style="color: #006633;">login</span><span style="color: #009900;">&#40;</span>BrowserDriver.<span style="color: #006633;">DEFAULT_USERNAME</span>,
                          BrowserDriver.<span style="color: #006633;">DEFAULT_PASSWORD</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  assertTrue<span style="color: #009900;">&#40;</span>homePage.<span style="color: #006633;">isLoaded</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Several techniques make this possible, but the one we will focus on in this blog post is the notion of a<strong> self-verifying <a href="http://code.google.com/p/selenium/wiki/PageObjects" target="_blank">PageObject</a></strong>.</p>
<p>Note that this test knows nothing about Selenium. Indeed, neither does the LoginPage class (below). More on that later. Note that this test does not include any waitUntilPageIsFrickinLoaded() calls, nor (worse) Thread.sleep() code, and very little direct instantiation of PageObjects. The page flow mechanics is encapsulated elsewhere. Note also that as I go from page to page, I don&#8217;t explicitly assert that I got there. I shouldn&#8217;t have to. My test should be able to take that for granted. It turns out that assertions are being made under the covers about having arrived successfully on intermediate pages, but that code is abstracted away. That&#8217;s what this post covers.</p>
<p>The only useful assertion in the test proper is that, once I have logged in with proper credentials, I arrive safely at the homepage (and even this assertion in the test is redundant, and included here only to reveal intention; the DashBoard page is also self-verifying).</p>
<h3>Glance-Readability</h3>
<p>A test as short and expressive as the one above passes the &#8220;glance readability&#8221; test. Anyone familiar with automated testing semantics, and the biz language of this CRM domain, ought to be able to grasp what this test does at a single glance.</p>
<p>Suffice to say, we want our Selenium RC tests, as much as they can, to be this succinct. And, again, that requires that they stick to expressing page traversal and manipulation in the local biz-specific language of the web app&#8217;s business domain. So, finally, let&#8217;s see the under-the-covers page self-verification mechanics.</p>
<h3>PageObjects as I Use Them</h3>
<p>The <a href="http://code.google.com/p/learning-codebases/source/browse/#svn/trunk/selenium-rc-patterns" target="_blank">selenium-rc-patterns</a> sample Java codebase that illustrates all of the patterns in this series of posts talks to a localhost copy of a Rails project called <a href="http://www.fatfreecrm.com/" target="_blank">Fat Free CRM</a>. If you want to learn a bit about this app, you can play with a <a href="http://demo.fatfreecrm.com/" target="_blank">hosted sample version here</a> (you have to sign up for an account first, which is easy).</p>
<p>This <a href="http://en.wikipedia.org/wiki/Customer_relationship_management" target="_blank">CRM</a> system has discrete web pages like a Dashboard (home page, essentially), and pages for Tasks, Leads, Campaigns, Contacts, Accounts, and Opportunities. For each of these actual, production pages, my selenium-rc-patterns Eclipse project contains a matching <a href="http://code.google.com/p/selenium/wiki/PageObjects" target="_blank">PageObject</a> with methods and fields that provide access to the services on that page.</p>
<p>Above, when you ask an instance of a LoginPage to login(username, password), then the TextFields and PageLink type know how to return us a <a href="http://code.google.com/p/selenium/wiki/PageObjects" target="_blank">PageObject</a> that should then be cast to a DashboardPage and returned. (More on that in another post.)</p>
<p>Selenium RC developers have been using a <a href="http://code.google.com/p/selenium/wiki/PageObjects" target="_blank">PageObject</a> pattern for awhile. The pattern dates back, at least, to the original <a href="http://htmlunit.sourceforge.net/" target="_blank">HTMLUnit</a>, whose API rather strongly encourages you to represent your pages under test as extensions of what it calls an HtmlPage. I don&#8217;t use Se 2 yet (might someday, might not), so I don&#8217;t use its PageFactory pattern.</p>
<p>Instead, I use my own PageObjects that extend a BasePage (or BasePane), partly so that I can control how and when PageObjects are instantiated, and verify <strong><em>automatically and ambiently</em></strong> on instantiation that Selenium is indeed on that page. Again, that&#8217;s much of what keeps the above test code so simple: I&#8217;m not explicitly waiting for a page to load, and I&#8217;m not asserting all over the place that I&#8217;ve successfully arrived on a given page.</p>
<p>So, my LoginPage class has a login() method that accepts a username and password (we&#8217;ll cover the return types of these fields and methods in another post that describes how page-flow works):</p>

<div class="wp_syntax"><div class="code"><pre class="java5" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">bizdomain.pages</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">util.BasePane</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">util.elements.PageLink</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">util.elements.TextField</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> LoginPage <span style="color: #000000; font-weight: bold;">extends</span> BasePane <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #003399; font-weight: bold;">String</span> PAGE_IS_LOADED_CSS
                                           = <span style="color: #0000ff;">&quot;input[id=authentication_username]&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399; font-weight: bold;">TextField</span> userNameField<span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399; font-weight: bold;">TextField</span> passwordField<span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">private</span> PageLink loginButton<span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> LoginPage<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">super</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    userNameField = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399; font-weight: bold;">TextField</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;input[id=authentication_username]&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    passwordField = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399; font-weight: bold;">TextField</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;input[id=authentication_password]&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    loginButton = <span style="color: #000000; font-weight: bold;">new</span> PageLink<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;input[id=authentication_submit]&quot;</span>,
                                                                                DashBoard.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  @<span style="color: #003399; font-weight: bold;">Override</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399; font-weight: bold;">String</span> getPageLoadedCssLocator<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">return</span> PAGE_IS_LOADED_CSS<span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> DashBoard login<span style="color: #009900;">&#40;</span><span style="color: #003399; font-weight: bold;">String</span> userName, <span style="color: #003399; font-weight: bold;">String</span> password<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    userNameField.<span style="color: #006633;">enter</span><span style="color: #009900;">&#40;</span>userName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    passwordField.<span style="color: #006633;">enter</span><span style="color: #009900;">&#40;</span>password<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span>DashBoard<span style="color: #009900;">&#41;</span> loginButton.<span style="color: #006633;">clickToNewPage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><em><span style="font-style: normal;"> </span></em></p>
<p><em> </em></p>
<p><em> </em></p>
<p><em> </em></p>
<p><em> </em></p>
<p><em> </em></p>
<p><em> </em></p>
<p><em> </em></p>
<p><em> </em></p>
<p><em> </em></p>
<p><em> </em></p>
<h3><span style="font-style: normal;">Verifying That the Production Page has Been Loaded</span></h3>
<p><span style="font-style: normal;">The real point of my flavor of PageObject pattern is the self-verifying bit. Let&#8217;s dive into that &#8212; not later, but now. </span></p>
<p><span style="font-style: normal;">Note that each of these PageObjects extends BasePane, and has a PAGE_IS_LOADED_CSS constant:</span></p>

<div class="wp_syntax"><div class="code"><pre class="java5" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">bizdomain.pages</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> LoginPage <span style="color: #000000; font-weight: bold;">extends</span> BasePane <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #003399; font-weight: bold;">String</span> PAGE_IS_LOADED_CSS = <span style="color: #0000ff;">&quot;input[id=authentication_username]&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p><span style="font-style: normal;">In the LoginPage constructor way above up there, you can see we first explicitly call super() on BasePane. Here is BasePane:</span></p>

<div class="wp_syntax"><div class="code"><pre class="java5" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">abstract</span> <span style="color: #000000; font-weight: bold;">class</span> BasePane <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> BasePane<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    waitUntilLoaded<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #006600; font-weight: bold;">boolean</span> isLoaded<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">return</span> BrowserDriver.<span style="color: #006633;">isElementPresent</span><span style="color: #009900;">&#40;</span>getPageLoadedCssLocator<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #006600; font-weight: bold;">boolean</span> isVisible<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">return</span> BrowserDriver.<span style="color: #006633;">isElementVisible</span><span style="color: #009900;">&#40;</span>getPageLoadedCssLocator<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #006600; font-weight: bold;">void</span> waitUntilLoaded<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>  <span style="color: #009900;">&#123;</span>
    BrowserDriver.<span style="color: #006633;">waitForElementVisible</span><span style="color: #009900;">&#40;</span>getPageLoadedCssLocator<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">abstract</span> <span style="color: #003399; font-weight: bold;">String</span> getPageLoadedCssLocator<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><span style="font-style: normal;">You can see that this constructor calls waitUntilLoaded(), which makes a static call to a method on our BrowserDriver (the Facade / Decorator that handles all of the actual Selenium calls) in order to loop until our LoginPage (in this case) actually is loaded. The argument supplied is the result of calling getPageLoadedCssLocator(). </span></p>
<p><span style="font-style: normal;">But wait! That&#8217;s an abstract method! So Yes, we have something very like a <a href="http://en.wikipedia.org/wiki/Template_method_pattern" target="_blank">template method pattern</a> here in waitUntilLoaded(): the concrete implementation of getPageLoadedCssLocator() on LoginPage returns that PAGE_IS_LOADED_CSS constant String.</span></p>
<p><span style="font-style: normal;">Deep, deep under the covers, the BrowserDriver.waitForElementIsVisible() method looks like this:</span></p>

<div class="wp_syntax"><div class="code"><pre class="java5" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #006600; font-weight: bold;">void</span> waitForElementVisible<span style="color: #009900;">&#40;</span><span style="color: #003399; font-weight: bold;">String</span> cssLocator<span style="color: #009900;">&#41;</span>  <span style="color: #009900;">&#123;</span>
  <span style="color: #000000;  font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #006600; font-weight: bold;">int</span> second = <span style="color: #cc66cc;">0</span><span style="color: #339933;">;;</span> second++<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000;  font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>second <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>=
 <span style="color: #003399; font-weight: bold;">Integer</span>.<span style="color: #006633;">valueOf</span><span style="color: #009900;">&#40;</span>BrowserDriver.<span style="color: #006633;">STANDARD_DHTML_LOAD_WAIT_</span>  TIME<span style="color: #009900;">&#41;</span> / MS_PER_SECOND<span style="color: #009900;">&#41;</span>
&nbsp;
  fail<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Timeout waiting for element &quot;</span> + cssLocator + <span style="color: #0000ff;">&quot; to become visible.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000;  font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>isElementVisible<span style="color: #009900;">&#40;</span>cssLocator<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
    sleepForASecond<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #006600; font-weight: bold;">boolean</span> isElementVisible<span style="color: #009900;">&#40;</span><span style="color: #003399; font-weight: bold;">String</span> cssLocator<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  injectJqueryIfAbsent<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">return</span> executeJavascript<span style="color: #009900;">&#40;</span>JqueryCodeFactory.<span style="color: #006633;">getVisibilityCode</span><span style="color: #009900;">&#40;</span>cssLocator<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span>TRUE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>We&#8217;ll discuss the BrowerDriver class at length elsewhere. And we&#8217;ll also discuss the injectJqueryIfAbsent() method, which we hope an upcoming Selenium RC release will obviate.</p>
<p><span style="font-style: normal;">The upshot of the waitForElementVisible() method and the LoginPage and BasePane code above is that <strong><em>the LoginPage object will not successfully finish instantiating</em></strong> until Selenium can <strong><em>successfully verify that a unique element on that page has been loaded.</em></strong> In other words, once a LoginPage instance is loaded in memory, we actually are on the LoginPage, by definition, as long as that CSS element selector syntax is correct. Voila, automatic, ambient page flow assertion. </span></p>
<p><span style="font-style: normal;">This is much of how we get our test methods so succinct. The PageObjects take care of verifying for us, at instantiation, that we have safely arrived on their corresponding production app web pages.</span></p>
<p><span style="font-style: normal;">Caveat Lector: there is a flaw in my code I have yet to squeeze out:  duplication between a BasePane, used above, which I usually use for dynamic changes in the HTML, and a BasePage, which presumes that a real HTTP Request/Response cycle has occurred. I will collapse those two together shortly. </span></p>
<p><span style="font-style: normal;">Next: we&#8217;ll talk about reusable HTML Element objects, and how the linkish ones know, in my code, how to return the PageObject we wish to traverse to next. </span></p>
<p><span style="font-style: normal;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://patrickwilsonwelsh.com/?feed=rss2&amp;p=343</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selenium RC Java Patterns: Watch this Space</title>
		<link>http://patrickwilsonwelsh.com/?p=332</link>
		<comments>http://patrickwilsonwelsh.com/?p=332#comments</comments>
		<pubDate>Thu, 12 Aug 2010 18:30:40 +0000</pubDate>
		<dc:creator>patrickwilsonwelsh</dc:creator>
				<category><![CDATA[Agility]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[agile testing]]></category>

		<guid isPermaLink="false">http://patrickwilsonwelsh.com/?p=332</guid>
		<description><![CDATA[My opinion about through-the-web-GUI enterprise-app-testing, in general, is that it is like driving on ice in a blizzard: not something you want to do lots and lots of, because sooner or later you&#8217;ll get into deep trouble. But given your context (living in MI, for me), driving on ice in the snow is something that [...]]]></description>
			<content:encoded><![CDATA[<p>My opinion about through-the-web-GUI enterprise-app-testing, in general, is that it is like driving on ice in a blizzard: not something you want to do lots and lots of, because sooner or later you&#8217;ll get into deep trouble. But given your context (living in MI, for me), driving on ice in the snow is something that is useful to know how to do well, in a pinch.</p>
<p>I&#8217;ve blogged in the past about <a href="http://patrickwilsonwelsh.com/?p=47" target="_blank">low-TCO (Total Cost of Ownership) Selenium RC testing in general</a>, and about  <a href="http://patrickwilsonwelsh.com/?p=32" target="_blank">how much of your automated testing budget should be allocated to different kinds of testing at different points in an agile transformation</a>. Of late, I have been helping teams learn to use Selenium RC, in Java, to test web apps through their GUIs. Once the above Caveat Tester is spoken, I help them do the Selenium RC testing that they feel they MUST do as well as possible.</p>
<p>I have been diving more deeply into it for a client recently, and finding and refining some useful patterns I had not needed or found before (with the help of several colleagues). And, admittedly, some of what I am doing is refining my old patterns in response to things like Refactoring pressure. In general, I am devising increasingly DRY Object Oriented Selenium RC Java patterns. I recently<a title="Why your Selenium tests are so dang brittle, and what to do about it." href="http://agile2010.agilealliance.org/testing.html#5496" target="_blank"> presented on them at Agile 2010</a>.  Using your subversion client, you  can checkout the code that illustrates these patterns in a<a href="https://learning-codebases.googlecode.com/svn/trunk/selenium-rc-patterns" target="_blank"> Google Code repository here</a>.  You can find the subversion <a href="http://code.google.com/p/learning-codebases/source/checkout" target="_blank">check-out instructions here</a>. You can find my <a href="http://patrickwilsonwelsh.com/wp-content/uploads/2010/08/Why-Your-Se-Tests-are-Brittle.pptx" target="_blank">slide deck from Agile 2010 here</a>.</p>
<p>I intend to share each of these patterns with you, each in its own blog post, in coming weeks.</p>
<p>So watch this space for blog posts (with code, and links to a sample project on Google Code), covering the following topics:</p>
<ul>
<li>Clean, clear test methods</li>
<li>Separating DRY test-framework code from &#8220;wetter&#8221; tests, and separating reusable, generic test-framework code from biz-domain-specific framework code</li>
<li>Wrapping Selenium and other frameworks in Facade/Decorator that provides static Singleton test framework access.</li>
<li>Pushing all framework static Singleton references down into base classes and html element classes.</li>
<li>Biz-Domain-specific Page Objects that are &#8220;lazy loaded&#8221; and self-verifying, and that encourage Dry OO test code</li>
<li>Always using CSS as a DOM element locator strategy; never using XPath.</li>
<li>Injecting the entire jQuery framework into pages under test, in order to verify visibility of elements that appear after dynamic html or Ajax calls.</li>
<li>Generic HTML Element objects (ala HtmlUnit&#8217;s API) that encourage Dry OO test code</li>
<li>DhtmlLink and PageLink Factory classes that are instantiated with the Page Object classes they should &#8220;go to,&#8221; and that automatically return those objects when &#8220;clicked&#8221;.</li>
<li>Pushing out access to common elements across several pages to static Singletons on base page classes.</li>
</ul>
<p>The code I link to above illustrates all of these patterns, expecting (for now) to run against a localhost instance of a Rails app called <a href="http://www.fatfreecrm.com/" target="_blank">FatFreeCRM</a>, which is straightforward to download and install. I intend to publish a different example soon that points to, for example, Wikipedia.</p>
]]></content:encoded>
			<wfw:commentRss>http://patrickwilsonwelsh.com/?feed=rss2&amp;p=332</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Automated Acceptance Tests: Hold on Just a Second Here</title>
		<link>http://patrickwilsonwelsh.com/?p=319</link>
		<comments>http://patrickwilsonwelsh.com/?p=319#comments</comments>
		<pubDate>Fri, 05 Mar 2010 19:22:10 +0000</pubDate>
		<dc:creator>patrickwilsonwelsh</dc:creator>
				<category><![CDATA[Agility]]></category>
		<category><![CDATA[SW Mgmt]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://patrickwilsonwelsh.com/?p=319</guid>
		<description><![CDATA[Long Live Storytests, Dang Blast It The recent claims made by a well-known agile coaching thoughtleader notwithstanding, I work hard to get clients to adopt real Storytesting practices, with real Storytesting tools (FitNesse is still my tool of choice; I work mostly with Java teams). I will continue to do so. I find no false economy [...]]]></description>
			<content:encoded><![CDATA[<h3>Long Live Storytests, Dang Blast It</h3>
<p>The recent claims made by a <a href="http://jamesshore.com/Blog/The-Problems-With-Acceptance-Testing.html" target="_blank">well-known agile coaching thoughtleader notwithstanding</a>, I work hard to get clients to adopt real Storytesting practices, with real Storytesting tools (<a href="http://fitnesse.org/" target="_blank">FitNesse</a> is still my tool of choice; I work mostly with Java teams). I will continue to do so. I find no false economy or Faustian bargain with FitNesse tests, and I suspect it is because I am coaching the use of them differently than James Shore is.</p>
<h3>Manual Regression Testing = Really Bad Thing; Agreed</h3>
<p>Regression testing of any kind is classically about proving that we are <em>Building the Thing Right</em>. For true regression protection purposes, I want manual regression tests to be replaced with a requisite blend of automated tests (using the <a href="http://patrickwilsonwelsh.com/?p=32" target="_blank">testing triangle pattern</a> for allocating test automation resources) plus a requisite amount of manual exploratory testing.</p>
<h3>Whoa Nelly: Storytests Are Not About Bugs</h3>
<p>But Storytesting / Automated Acceptance testing is really an entirely different kind of testing. It is indeed an unaffordable way to attempt to prove that we are <em>Building the Thing Right</em>, but in my experience, the perfect way to prove that we are <em>Building the Right Thing</em>. I want these kinds of tests to simply demonstrate that we mostly got the scope and Definition of Done right for a given story. This is a far cry from all of the edge cases and unhappy paths that make up complete regression protection for a story.</p>
<p>If, as James claims, clients are trying to use Storytests for what they are not good at, I stop it. I suggest other testing avenues for regression protection.</p>
<p>This difference really is critical. <strong>Storytests merely tend to prove, better than anything else, that we got the story done.</strong></p>
<p>Granted, a story is not Done Done Done until we have squeezed all the defects out of it. I hope to heck the bottom of my testing triangle, where the giant, high-speed suites of tiny little xUnit isolation tests / microtests live, does the lion&#8217;s share of the regression protection for me. Yes, TDD/BDD are design practices. AND, only from my cold dead hands will you pry the regression protection those tests/specs provide me. Please, please, don&#8217;t try to use FitNesse for that work. Wrong tool, man.</p>
<h3>The Benefits of a Precise, Deterministic Definition of Done</h3>
<p>So if I do have awesome xUnit test suites (and a bit of other regression protection) to prove we have <em>Built the Thing Right</em>, my Storytests need only prove, to some customer-acceptable extent, that we have <em>Built the Right Thing</em>. What benefits do I give up if I give up this use of Storytesting?  Well, I have a list, but here is the number one item on it:</p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<ol>
<li><span style="font-weight: normal;"><strong>My best tool for story breakdown</strong>. You want me to prove that a story in a web application <em>without browser-resident behavior</em> got done as estimated in this Sprint? Some small increment of useful service layer code or biz logic or whatever?  Storytesting is the first thing I reach for.
<p>Without that practice, I have teams (especially new ones) presuming that <em>stories can only be as small as the smallest bit of browser resident behavior they evidence</em>. That is a truly horrible thing, because then my stories can clandestinely grow to ginormous size. This leads, in turn, to late cycle iteration surprises (&#8220;Uh, it turns out that we just found out that this 6 foot-pound story is really gonna be something like 67 foot-pounds. It won&#8217;t be ready for the verification meeting tomorrow.&#8221;)</p>
<p>Heck, one recent team I coached had an app with no GUI-evident behavior anywhere. FitNesse was the perfect way for them to show progress. Indeed, to them, it now seems in retrospect that Storytesting was the only way to fly. <em><strong>Without something like it, there would have been no way for product owners to verify anything at all.</strong></em> </span></li>
</ol>
<h3>Retiring Old Storytests</h3>
<p>Large suites of automated functional tests, in any tool, are notoriously expensive to maintain, especially compared to xUnit microtests. FitNesse, being a web app without in-built refactoring support for things like multiple references across tables and pages, can make things worse. (People are slapping FitNesse front ends on top of Selenium suites these days, which strike me as truly  horrible for regression suites.)</p>
<p>Fine. Storytests are functional tests. They run slow and are very expensive to maintain  <strong><em>Therefore let&#8217;s only keep our Stortytests for as long as they are useful for verification, requirements scope, acceptance kinds of purposes</em></strong>.</p>
<p>Do I really need to prove, in Sprint n+10, that I got scope correct in Sprint n?  I suggest that I don&#8217;t. That&#8217;s old news. Deleting old Storytest suites also applies healthy pressure on the team to derive their regression protection from healthier tests and mechanisms.</p>
<h3>Small Groups of Stakeholders Can Learn to Collaborate on Storytests</h3>
<p>Don&#8217;t believe for a minute that this is impossible to do. I have frequently done it. I am happy to show you how to do it.</p>
<p>Yes it is difficult, but compared to what? Teaching teams OOD?  Teaching teams TDD? Configuring a Tomcat cluster? Please.</p>
<p>I&#8217;ve had several successes getting small sub-teams of developers, testers, and (critically) product owners to collaborate on Storytest design and development. No, I don&#8217;t want testers writing acceptance tests alone. No, I don&#8217;t think Product Owners can or should write such tests on their own either. And also, perhaps controversially, I am starting to think that good old fashioned Decision Table style permutation tables, as a Storytesting semantics, is the sweet spot for Java Storytesting. BDD step definitions, as developed so far in at least two ways for FitNesse, leave me cold: either I have several tables referring to each other in a way that makes refactoring cumbersome, or I have complex fixture code that uses regex and annotations. I will use these things if pressed by a savvy, committed product owner, but otherwise, give me Slim Decision Tables.</p>
<p>Honestly, I have on several occasions found ways to craft suites of Decision Tables (nee ColumnFixture tables) so that they are plenty expressive for all concerned. I&#8217;ve had several teams, including product owners, fall in love with the practice and the tool. I&#8217;ll keep rolling with that.</p>
<h3>Summary: Be Careful What You Throw Away, and Why</h3>
<p>Used as, I would claim, originally intended, Storytests / Automated Acceptance tests are a wonderful and essential tool for agile teams. More on this in later posts. I personally cannot control scope, carve stories small enough, or show deterministic enough definition of done without them.</p>
<p>Yes, client teams can learn to use the practice and tools improperly, in which case, it&#8217;s our job to step in and suggest alternatives.</p>
<p>Let&#8217;s try to come to agreement as a community on the ROI, the uses, and the best practices and patterns for Storytesting before we declare it dead.</p>
]]></content:encoded>
			<wfw:commentRss>http://patrickwilsonwelsh.com/?feed=rss2&amp;p=319</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&#8220;Lingos&#8221; and &#8220;Lingual Design&#8221;</title>
		<link>http://patrickwilsonwelsh.com/?p=307</link>
		<comments>http://patrickwilsonwelsh.com/?p=307#comments</comments>
		<pubDate>Fri, 12 Feb 2010 20:44:26 +0000</pubDate>
		<dc:creator>patrickwilsonwelsh</dc:creator>
				<category><![CDATA[Agility]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://patrickwilsonwelsh.com/?p=307</guid>
		<description><![CDATA[Hypothesis: Good OOD Programming is &#8220;Lingual&#8221; Design As is often said and written, the history of programming, and programming language design, is about programs becoming more expressive, fluent, lingual. All of the Object Oriented programmers I know and trust most would say that when they program, they are creating what are, in effect, languages. So, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Hypothesis: Good OOD Programming is &#8220;Lingual&#8221; Design</strong></p>
<p>As is often said and written, the history of programming, and programming language design, is about programs becoming more expressive, fluent, lingual. All of the Object Oriented programmers I know and trust most would say that when they program, they are creating what are, in effect, languages. So, as a community of software craftsmen, how intentional and explicit are we about programming &#8212; and teaching programming &#8212; in a &#8220;lingual way,&#8221; and what does that mean?</p>
<p>I care a lot about helping novice OO programmers learn OOD, because when I set out to learn it years ago, my education was flawed. And because most programmers in OO languages are very bad at OOD. And because when I try to teach OOD to others, these concepts are still not as easy to teach as I want them to be. And finally, because there is no better or more natural metaphor for expressiveness than the notion of a spoken language itself. Perhaps by definition.</p>
<p>I want to encourage novice OO programmers to think in an expressive, lingual, semantic way. And the terms of art in OOD are not helpful enough there.</p>
<h3>I Dislike a Lot of OOD Terms</h3>
<p>Don&#8217;t get me wrong. There is a rich vocabulary about being clear, clean, and expressive in programming, but none of the terms helps me in the way that I want. Here are some terms that are helpful, but not in the right way: <em>programming by intention</em>, <em>meaningful names</em>, <em>expressive names</em>, <em>abstraction level</em>, <em>object modeling</em>, <em>domain-driven design</em>, etc, etc. Each of these terms is either just plain hard to learn (&#8220;abstraction level&#8221;), or it is  focused on too small a lingual granule (a meaningfully-named method), or it is not especially lingual in focus at all (&#8220;object modeling&#8221;).</p>
<p>An object model can be healthy in the sense that the classes and their methods are about the right size, and focus on about the right scope of responsibility. And it can have OK, not great names, that are not semantically coherent. And the whole thing can feel like a non-German speaker driving through Germany:<em> &#8220;What a beautiful little town!  Where the hell are we?&#8221;</em></p>
<p>An abstraction level can be decoupled nicely, and still not be expressive in a lingual way. <em>&#8220;Wow, nice clean scoping!  What&#8217;s going on in here?&#8221;</em></p>
<p>A group of classes, methods, and variables can be pretty well named, in their own narrow, individual  contexts, and still not form a semantically consistent little vernacular.</p>
<h3>In Charges the DSL</h3>
<p>There is a sudden sexiness emerging around Domain Specific Languages (DSLs), and Martin Fowler&#8217;s book will increase the buzz. To Fowler&#8217;s mind, based on his research into the prior art around DSLs, the term should be reserved for a level of fluency that is &#8220;sentence like&#8221; in its grammatical richness. The chief application is to make problem domains, more than solution domains, very fluent and expressive, especially to non-technical stakeholders, rather in a Ubiqituous Language, Domain-Driven Design fashion. Fair enough. It&#8217;s a great idea, and frequently worth the effort. I am 110% in favor of it.</p>
<p>But FitNesse/Slim <em>Given/When/Then</em> DSLs (for example) don&#8217;t solve my problem, which is this: <strong>encouraging OO programmers to program in a lingually expressive way, within the limits of whatever programming language they are using</strong>. You <em>can </em>create real DSLs in Java using techniques like method chaining, and tools like Hamcrest matchers, but that ain&#8217;t exactly novice-level craft.</p>
<p>Fowler&#8217;s book draft defines DSL to explicitly <em>exclude </em>traditional command-query class APIs in languages like Java and C#. I want a term that encourages, describes, and defines what it means to make those command-query APIs as lingual as possible. I want novices to have guidelines for creating command-query APIs that form consistent, lingual semantics as collections of verbs, nouns, and other parts of speech.</p>
<p><em><strong>That thing</strong></em>. That thing I just said. That&#8217;s what I want a term for.</p>
<h3>Lingos and Lingual Design</h3>
<p>So, unscared by the prospect of inventing a dumb pair of terms, I am inventing these two, with the help of my pals Dave LeBlanc and Mike Hill, who helped me think this through. Truthfully, there is not much to it:</p>
<p>A <strong><em>Lingo</em></strong>, in our definition, is a coherent, object-model subset, a command-query API, that is semantically consistent in its limited grammar, and as fluent as the programming language permits (without fancy stuff).</p>
<p>One typical scope for a Lingo is a package that adheres to all of the package coherence principles of common reuse and common closure. Those classes that tend to be released, reused, and changed together and therefore tend to cohere in their own package together, really ought to be crafted as a little language. That&#8217;s an example of what we mean by a Lingo.</p>
<p>And, a class can be a Lingo, and should be when it can: the semantics of the method names within the class should be grammatically consistent.</p>
<p>Now, <em><strong>Lingual Design</strong></em> is simply an orientation toward ensuring that our command-query APIs have clear, SRP-compliant boundaries (e.g., package boundaries or class boundaries), and tend to hang together as coherent, consistent Lingos.</p>
<p>[TODO: Insert code examples here!]</p>
<p>No, Java and C# and many strongly typed languages do not make this easy to do, and make you jump through fancy hoops to get all the way to Fowler&#8217;s definition of DSL fluency. So what!</p>
<h3>You Are Always Creating a Language</h3>
<p>Whatever general purpose programming language, or <em>Domain Indifferent Language</em> (as Mike Hill puts it) you are using, no matter what sort of API and object model you are crafting, you are always creating another language. More or less crude, more or less fluent, more or less semantically consistent, whatever you end up making will be read by other programmers in the high hopes that it reads like a consistent little bit of spoken language.</p>
<p>Try thinking, for a bit of your programming, in terms of Lingual Design. Try to see the boundaries between, and the hierarchical tiers, of your Lingos.</p>
<p>How does it feel, and how does it work, to be intentional about OOD in this particular way?  Can this be a useful way to teach and learn OOD?</p>
<p>Are these terms useful or just more pedagogical noise?</p>
<p>Am I, once again, smoking crack?</p>
<p>Time, and my friend Ron, will tell. ;&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://patrickwilsonwelsh.com/?feed=rss2&amp;p=307</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The Tao of Tester/Programmer</title>
		<link>http://patrickwilsonwelsh.com/?p=271</link>
		<comments>http://patrickwilsonwelsh.com/?p=271#comments</comments>
		<pubDate>Thu, 28 Jan 2010 16:11:52 +0000</pubDate>
		<dc:creator>patrickwilsonwelsh</dc:creator>
				<category><![CDATA[Agility]]></category>
		<category><![CDATA[Contemplative Practice]]></category>
		<category><![CDATA[SW Mgmt]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[craftsmanship]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[yang]]></category>
		<category><![CDATA[yin]]></category>

		<guid isPermaLink="false">http://patrickwilsonwelsh.com/?p=271</guid>
		<description><![CDATA[Balancing a Classic Software Duality In the West, we are very dual. Our opposites tend not to touch or integrate, much less balance. The true, intertwined and balanced nature of duality comes more easily to Eastern cultures than to us. Opposites naturally include and oppose each other in the East. Yin includes some Yang, and [...]]]></description>
			<content:encoded><![CDATA[<h2>Balancing a Classic Software Duality</h2>
<div>In the West, we are very dual. Our opposites tend not to touch or integrate, much less balance. The true, <a href="http://en.wikipedia.org/wiki/Yin_and_yang" target="_self">intertwined and balanced nature of duality</a> comes more easily to Eastern cultures than to us. Opposites naturally include and oppose each other in the East. Yin includes some Yang, and vice versa, as captured in the <a href="http://en.wikipedia.org/wiki/File:Yin_and_Yang.svg" target="_blank">classic Taoist circular image of entwined white and black teardrops</a>.</div>
<p>This balance can be hard for Westerners to grasp, but it helps us to learn balance. An odd example of Yin/Yang balance can be found in healthy programming, balanced with healthy testing.</p>
<h2>The Yang of Programming</h2>
<div id="_mcePaste">Yang energy is creative, moving, active, striving, masculine, intense, goal-directed. It is represented by the dark teardrop in the Yin/Yang circle. Ashtanga Yoga is a classic, Eastern Yang activity. Programming is a classic Yang activity too, and in unhealthy software development environments, where programming has no Yin energy, programming is Yang out of balance. It can become thrash, churn, movement without progress, movement with panic, creation without business value, stressful striving, aggressive striving. &#8220;Don&#8217;t distract me with facts!&#8221; might be the battle cry of pure, arrogant, unbalanced Yang programming.</div>
<h2>The Yin of Testing</h2>
<div id="_mcePaste">Yin energy is witnessing, curious, investigative, being, still, resting, observing, listening. The white teardrop. It can be directed or undirected &#8212; exploratory in an improvisatory way, without making up any stories beforehand. Meditation is a classic Eastern Yin activity. You could say that the Yin of Testing is, in its purest form, perfectly skeptical and empirical, without either positive or negative expectation. In its worst form, the Yin of Testing becomes submissive, overly passive, retreating, denying, disengaged, and dissociated. It retreats and hides.</div>
<h2>Balanced Yang/Yin Programming</h2>
<div id="_mcePaste">Healthy programmming embraces its creative power and juice, while reserving some energy and disposition to witness and check its predisposition to not witness, to be biased, to blast across the observable data. TDD is a perfect tool for balancing Yang and Yin in programming. You create a small, observable goal and its criterion for empirical verification; you then engage in just enough creative Yang passionate activity to satisfy that empirical goal. Then you pause in a Yin Testing moment to observe that you have returned to the balance of the green bar. Then you rest further in another Yin Testing moment of dispassionately observing the fact of the mess you made. Then you engage in just enough creative Yang refactoring to restore the balance of Clean Code.</div>
<p>Healthy programming is lots and lots of passionate, creative Yang, with just the right amount of Yin observation and Testing. It is creative engineering and artistic passion balanced with a bit of skeptical, empirical Science. It is the black teardrop with the small white circle at its heart.</p>
<h2>Balanced Yin/Yang Testing</h2>
<p>Healthy testing embraces the calm, dispassionate, empirical, deeply-concentrating power of witnessing, observing, and noting the truth of reality, without preconception. It delights in defects not merely because it is fun to break things, but also because it is fun to find precise, repeatable, deterministic discoveries of any kind. A bug is just another kind of delightful new discovery that happens not to be desirable by the customer (in most cases!).</p>
<p>Balanced Yin testing begins with the open, empirical, unscripted extemporizing act of manual Exploratory Testing. This demands that ET skills have already been deeply somaticized by the tester, rather like the kata of programming, or like the &#8220;forms&#8221; of Tai Chi. Before you can deeply explore the behaviors of an application, you must already have internalized the skills of that exploration. I dare say that masterful ET has a meditative, contemplative aspect to it. You allow the application, as it truly is, to you draw you in, without agenda, without story.</p>
<p>And, healthy Yin testing is then balanced by the passionate Yang activity of test automation. Automating regression happy paths and unhappy paths is such a Yang activity. Another balancing Yang activity is courageously sharing results with programmers, and with the team. The best testers, Agile Testers, are powerfully creative in their own right as Yang programmers. But their Yang programming tends to serve their Yin goals of observation, gathering empirical results, witnesssing. Balanced Yin testing: the white teardrop of observation with the small black dot of Yang creation at its heart.</p>
<h2>Balanced Testing/Programming: Conversations and Careers</h2>
<div id="_mcePaste">Programmers can and should consider transitioning to periods of at least partial self-identification as testers. Spend 10,000 hours at it. Let your first 10,000 hours be Test-Driving and refactoring Clean Code.</div>
<p>Also consider becoming, for awhile, an Agile Tester. You think you understand every aspect of software testing, and how important all of the kinds of testing are? Rest more fully in the Yin of Agile Testing for a few days, weeks, iterations, or years, and think again. (Also, do not make up stories that this is somehow beneath you, or insufficiently challenging or stimulating, or not worthwhile, unless and until you have tried it in good faith, and found that to be so.)</p>
<div id="_mcePaste">Testers, on the other hand, should consider mastering much of the inherent craft demanded by healthy professional programming. Spend 10,000 hours at it. Let your first 10,000 hours be finding ways to write beautiful automated tests, especially Storytests. Embrace the Yin and Yang of bringing together small communities of customers, programmers, testers, and others to write Storytests as an excellent Definition of Done.</div>
<p>Also consider becoming, for awhile, an Agile Programmer, or a Software Craftsman. You think you understand all of the craft and technical depth and pure creative striving required to test-drive all manner of production implementations through all manner of technology stacks, with least defects and cleanest code? Strive powerfully in the Yang of Agile Programming and Software Craftsmanship for a few days, weeks, iterations, or years, and think again. (Also, do not make up stories that you cannot do that, unless you have already tried in good faith, and failed.)</p>
<h2>It&#8217;s Already Happening</h2>
<div id="_mcePaste">Agile Programmers and Agile Testers are already learning to pair on Storytests, to pair on Definitions of Done, to pair on design, to pair on implementation, to pair on testing. Programmers and Testers are already learning to balance their Yang and Yin through good faith conversation, good faith learning, and the softening of old, rigid boundaries, role definitions, and personality types.</div>
<p>Balance is possible between programming and testing, and it may help us to remember and honor our natural inclinations as Programmers and Testers as we work toward that balance. As programmers we are Creators, Engineers, Artists. As testers we are Observers, Skeptics, Research Scientists.</p>
<h2>Let it Happen More On Your Team, In Your Career</h2>
<p>And one avenue of balance, for the very brave and perhaps very advanced, is to push ourselves past our old internal stories about our inclinations and limitations. Specializing Generalists can shift their specialties occasionally. Creators: I dare you to master Observation. Obvservers: I dare you to master passionate Creation.</p>
<p>In the future, as teams become increasingly agile and healthy, I hope we will see a natural flow back and forth between the communities of those who self-identify as Testers, and those who self-identify as Programmers.</p>
<p>Because balance is better than good. Balance is at the heart of true excellence.</p>
]]></content:encoded>
			<wfw:commentRss>http://patrickwilsonwelsh.com/?feed=rss2&amp;p=271</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I am a Member of a Community of Thinkers</title>
		<link>http://patrickwilsonwelsh.com/?p=264</link>
		<comments>http://patrickwilsonwelsh.com/?p=264#comments</comments>
		<pubDate>Mon, 07 Dec 2009 20:18:38 +0000</pubDate>
		<dc:creator>patrickwilsonwelsh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://patrickwilsonwelsh.com/?p=264</guid>
		<description><![CDATA[Jean Tabaka and others devised this statement, and I love it. I heartily endorse it. To my mind, community provides the best mechanism for continuous learning, for continuous improvement, and for whatever safety we can expect from the world. Were I asked, I would add the meme of Network Weaving as an essential evolutionary mechanism [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight: normal; font-size: 13px;"><a href="http://www.rallydev.com/agileblog/2009/12/a-community-of-thinkers/" target="_blank">Jean Tabaka and others devised this statement</a>, and I love it. I heartily endorse it. To my mind, community provides the best mechanism for continuous learning, for continuous improvement, and for whatever safety we can expect from the world. Were I asked, I would add the meme of <a href="http://networkweaver.blogspot.com/2009/08/power-of-network-weaving.html" target="_blank">Network Weaving</a> as an essential evolutionary mechanism for any community of thinkers, but that&#8217;s just the hippie in me. </span></p>
<p><span style="font-weight: normal; font-size: 13px;">Well done Jean, Liz, Eric, and others. Good stuff:</span></p>
<hr />
<h2>A Community of Thinkers</h2>
<p><em>I am a member of a community of thinkers.</em></p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px;"><em>I believe that communities exist as homes for professionals to learn, teach, and reflect on their work.</em></p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px;"><em>I challenge each community in the software industry to:</em></p>
<ul>
<li><em>reflect and honor the practitioners who make its existence possible;</em></li>
<li><em>provide an excellent experience for its members;</em></li>
<li><em>support the excellent experience its members provide for their clients and colleagues in all aspects of their professional interactions;</em></li>
<li><em>exemplify, as a body, the professional and humane behavior of its members;</em></li>
<li><em>engage and collaborate within and across communities through respectful exploration of diverse and divergent insights;</em></li>
<li><em>embrace newcomers to the community openly and to celebrate ongoing journeys; and</em></li>
<li><em>thrive on the sustained health of the community and its members through continual reflection and improvement.</em></li>
</ul>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px;"><em>I believe that leaders in each community have a responsibility to exhibit these behaviors, and that people who exhibit these behaviors will become leaders.</em></p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px;"><em>I am a member of a community of thinkers. If I should happen to be a catalyst more than others, I consider that a tribute to those who have inspired me.</em></p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px;">
<hr />
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px;">”A Community of Thinkers” by Liz Keogh, Jean Tabaka and Eric Willeke is licensed under a<a style="color: #467aa3; text-decoration: underline;" href="http://creativecommons.org/licenses/by-sa/3.0/us/">Creative Commons Attribution-Share Alike 3.0 License</a>. Please attribute to the distributor of your copy or derivative.</p>
]]></content:encoded>
			<wfw:commentRss>http://patrickwilsonwelsh.com/?feed=rss2&amp;p=264</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Agile Team Lead, Take, Um, Three</title>
		<link>http://patrickwilsonwelsh.com/?p=258</link>
		<comments>http://patrickwilsonwelsh.com/?p=258#comments</comments>
		<pubDate>Thu, 12 Nov 2009 22:42:24 +0000</pubDate>
		<dc:creator>patrickwilsonwelsh</dc:creator>
				<category><![CDATA[Agility]]></category>
		<category><![CDATA[SW Mgmt]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://patrickwilsonwelsh.com/?p=258</guid>
		<description><![CDATA[Background By way of even more background, my original post on this topic is here. Patterns are Emerging In response to several comments and conversations with people in the industry, several of us, most recently Chris Beale, Gary Baker, John Huston, and Daryl Kulak, have been converging on a definition of this new role, this new [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>By way of even more background, <a href="http://patrickwilsonwelsh.com/?p=170" target="_blank">my original post on this topic is here</a>.</p>
<h3>Patterns are Emerging</h3>
<p>In response to several comments and conversations with people in the industry, several of us, most recently Chris Beale, Gary Baker, John Huston, and Daryl Kulak, have been converging on a definition of this new role, this new variety of leadership that we want agile teams to have. Many others are also involved in the conversation by now; too many to list here. The more we talk about it, the more comments we receive, the more all of us can see what we want. We are not in complete unanimity, by any stretch. Some folks think we are smoking crack. Not the first time. But most of us in the conversation can see useful patterns emerging.</p>
<h3 style="font-size: 1.17em;">This is a Big Role</h3>
<p>We can also see that this is quite  a lot of skill, experience, leadership, and sheer work to expect of one person. So part of my premise goes like this: the Agile Team Lead is the person that is ultimately accountable for ensuring that this work gets done. Depending on how the skillsets, preferences, team maturity, and other factors shake out for a leader and his/her team, the Agile Team Lead may well end up delegating much leadership to others (and other, subordinate leaders) within the team (the key phrase there being &#8220;within the team.&#8221;). So an Agile Team Lead might very well delegate to a Tech Lead, to an Agile Test Lead, to a Project Tracking Lead, to a Continuous Deployment Lead, etc., to cover off concerns. Whatever. The main point, of course, is that the buck stops with the Agile Team Lead. That person is, for whatever duration they are lead, the single wringable neck (for all responsibilities owned by the team itself).</p>
<h3>This Role Must Emerge From Within the Team, and Must Satisfy All Stakeholders</h3>
<p>So, while I am decidedly talking about DESIGNATING a person to act as the team lead, I am decidedly not talking about a traditional manager being imposed, permanently, from above, by fiat. There can be no Agile Team Lead designated FOR a team that does not know, admire, trust, respect, and like that person. Really, the final say in who leads the team should be the team&#8217;s.</p>
<h3 style="font-size: 1.17em;">This Role Should Likely Rotate</h3>
<p>This may be something we want several team members to try out, to get good at. Team members could rotate through it, perhaps on a fixed schedule.</p>
<h3 style="font-size: 1.17em;">This Conversation, Um, Leads to a Few Others</h3>
<p>I&#8217;d like to postpone to another series of blog posts, (<a href="http://patrickwilsonwelsh.com/?p=236" target="_blank">already underway, however</a>), the thorny issues around the enterprise structural implications that arise from this new role, and related observations. Suffice it to say, for now, that I personally don&#8217;t know how to make agile teams work, nor how to make this role of Agile Team Lead work, unless everyone in the team room reports directly to the Agile Team Lead, and no-one else. I mean that that one person is accountable for all of the incentive structure, performance evaluation, and (in large part) the hiring and firing for everyone on the team. This does not, again, mean that they own it entirely, nor that they do it permanently.</p>
<p>One other premise: we are deliberately attempting to erase old agile team management role and responsibility labels, like Scrum Master and Project Manager, which we increasingly believe to be fundamentally broken. We find the controversy around this topic to be perfectly matched to the stakes involved for the enterprise: our current patchwork of agile team management and project management and product ownership and process improvement management consists of more holes than cheese. Too many team-level concerns go unmet; too many stakeholder concerns go unmet; too many user and market concerns go unmet. We have been in denial about this shortfall. Let&#8217;s give up that denial.</p>
<p>Love it or hate it, we need a paradigm shift around agile team leadership. We need that leadership to be better consolidated, better focused, better defined, and better matched to the dialectic between internal team needs and external stakeholder needs. We need one person who is held accountable the extent to which an agile team&#8217;s authority and responsibility are, in fact, congruent.</p>
<p>And we need none of that to violate the principles of self-organizing teams, leadership arising within the team, and teams owning the team&#8217;s concerns. The team owns all of these things, but the team lead is accountable for the team actually delivering it. Like I said, thorny.</p>
<h3>Summary: What we Want in Our Agile Team Lead</h3>
<p>Most of the following is in summary, bullet-point form, with a bit of explanatory text. We&#8217;re still mainly starting this conversation; much is left to be done to think this through from the perspective of the team itself, from the perspective of &#8220;continuous improvement,&#8221; from the perspective of individual Releases/Projects being executed well, from the perspective of Product Owners and Portfolio Owners, from the perspective of all of the different natural roles, responsibilities, skills, learning styles, and personality types that the team needs. These is just another draft sketch of the responsibility categories of this specific leadership role.</p>
<p>I suspect there are still several holes in our thinking, several bits of overlap, and perhaps some false premises. No matter. It&#8217;s out here now for us all to discuss. Better in front of your eyes here in public, than lurking, not yet &#8220;perfect,&#8221; on someone&#8217;s laptop.</p>
<p><strong>Continuous Leadership</strong></p>
<ul>
<li><strong>Understand the goals of the organization</strong>, and the exact ways in which the team furthers them</li>
<li><strong>Provide a single point of leadership</strong> for the team; continuously wins the team&#8217;s implicit and explicit trust and admiration. Builds a &#8220;safe container&#8221; for the team within which work can be done creatively, collaboratively, honestly, accountably, and joyfully.</li>
<li><strong>Helps continuously build trust and respect between the team and its stakeholders</strong> (in a way that buys more and more freedom to speak up, freedom to experiment, freedom to &#8220;fail,&#8221; freedom to learn).</li>
<li><strong>Provide a single point of team accountability to the team&#8217;s stakeholders</strong> (in a way that ensures a single, coherent message to stakeholders about any team commitment about what went well, and what did not go well, how it happened, and why).</li>
<li><strong>Helps continuously improve internal team-cohesion</strong>: this includes mutual respect, mutual trust, morale, rapport, celebration, accountability, fun, and affection (yes, we have to like each other).</li>
</ul>
<h3>Continuous Planning</h3>
<ul>
<li>Ensures that the team is making more and more <strong>accurate and precise commitments</strong>.</li>
<li>Ensures that the team is <strong>delivering more and more predictably on its commitments</strong>.</li>
<li>&#8220;<strong>Gets the lights on</strong>,&#8221; in every area of process and practice, and ensures everything is &#8220;big and visible,&#8221; both tactically within the team, and for purposes of publishing to external stakeholders.</li>
<li>Identifies, gathers, and acts tactically on meaningful performance/progress metrics</li>
<li>&#8220;<strong>Makes the plan the bad guy</strong>&#8220;: ensures that Definitions of Done, short-term scope, long-term scope, deadlines, quality measures, and all other commitments are expressed in &#8220;plans&#8221; that remove moral judgment and blame from continuous improvement. Plans include code, tests, cards, and other artifacts. The goal is to create an environment in which mistakes are expected, any shortfall is cheap and easy to learn from, and everyone&#8217;s reflex is to refine the &#8220;plan,&#8221; not to point fingers of blame.</li>
<li>Drives Commitment-making for and with the team. This includes ensuring that the Definition of Done for any small or large commitment is precise enough and deterministic enough to reduce risk of misunderstanding, scope creep, and under-delivery as much as possible.</li>
<li>Ensures that the plan changes with demand/supply.</li>
</ul>
<h3>Continuous Execution</h3>
<ul>
<li>Monitors/manages <strong>team velocity/throughput</strong>. This includes work breakdown practices, estimation practices, tracking practices.</li>
<li><strong>Reports meaningful metrics/data within the team</strong>, tactically, and likely <strong>publishes different metrics/data outside the team</strong> to external stakeholders.</li>
<li><strong>Gets the team the resources it needs</strong> to deliver on its commitments; removes roadblocks</li>
<li><strong>Escalates blockages effectively. </strong>When the Agile Team Lead cannot unblock something, he or she escalates the issue to someone with the authority to remove that blockage, and makes clear to all stakeholders what the risks are of leaving that issue unblocked.</li>
<li>Keeps flow, momentum and focus in the team.</li>
</ul>
<h3>Continuous Risk Reduction</h3>
<ul>
<li><strong>Continuously identifies short-term risks</strong> (both Sprint-scope and long-term, Release-scope and Portfolio-scope) across the full spectrum of people, process, technology, structure, and culture.</li>
<li><strong>Makes risks and potential impacts big and visible</strong> to the right people. This is another example of &#8220;Making the Plan the Bad Guy.&#8221;</li>
<li>Ensures that risk reduction is integrated into planning and execution</li>
<li><strong>Measures the effectiveness</strong> of risk avoidance and the impact of unmitigated risk.</li>
</ul>
<h3>Continuous Improvement (Agile Coaching)</h3>
<ul>
<li><strong>Drives the improvement the overall Definition of Done</strong> (at each level of commitment scope, from the Story through the Release, and perhaps beyond). This has the effect of improving the quality of commitments, building a habit of overdelivering, building stakeholder trust, smoothing the flow of work (with fewer and fewer scope misunderstandings, production defects, and other &#8220;unplanned work phases&#8221;).</li>
<li><strong>Senses where performance breakdowns are occurring</strong></li>
<li><strong>Creates big and visible means for measuring breakdowns</strong></li>
<li>Interprets data to identify biggest opportunities for improvement.</li>
<li><strong>Works with team to identify and implement improvements</strong>. This obviously includes owning a retrospective practice, and also includes owning the effectiveness and accountability culture around a reliable pattern of Inspection and Adaptation. It includes things like helping the team learn the difference between ego-based whining and team-based servant leadership, and the difference between vague negative generalization and concrete improvement proposal.</li>
<li><strong>Investigates and learns emerging practices from other teams, organizations, and communities</strong>.</li>
</ul>
<p>OK, so once more, some disclaimer. This is work in progress. Expect more posts, other venues of conversation. Meanwhile, we welcome, indeed we desperately need, your input.</p>
]]></content:encoded>
			<wfw:commentRss>http://patrickwilsonwelsh.com/?feed=rss2&amp;p=258</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Agile Teams Challenge Corporate Assumptions: Part 1</title>
		<link>http://patrickwilsonwelsh.com/?p=236</link>
		<comments>http://patrickwilsonwelsh.com/?p=236#comments</comments>
		<pubDate>Tue, 27 Oct 2009 20:39:33 +0000</pubDate>
		<dc:creator>patrickwilsonwelsh</dc:creator>
				<category><![CDATA[Agility]]></category>
		<category><![CDATA[SW Mgmt]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://patrickwilsonwelsh.com/?p=236</guid>
		<description><![CDATA[The Old Atomic Unit of Production: the Project I came up in a software industry in which the atomic unit of production capacity was The Programmer. Programmers were largely assigned, as needed, to ephemeral entities called Projects. Yes, it had a Taylorist mechanistic undertone, and often still does. Cut to scene: The Project Manager whisks into [...]]]></description>
			<content:encoded><![CDATA[<h3>The Old Atomic Unit of Production: the Project</h3>
<p>I came up in a software industry in which the atomic unit of production capacity was The Programmer. Programmers were largely assigned, as needed, to ephemeral entities called Projects. Yes, it had a Taylorist mechanistic undertone, and often still does.</p>
<p><em>Cut to scene:</em> The Project Manager whisks into the Development Manager&#8217;s office and declaims, rather like a Hollywood casting director, &#8220;Well, you need to get us Joe and Terri for the <em>Melathobner Project</em>. We can&#8217;t do it without them. It just won&#8217;t work without them.&#8221;  (Lots of action films have the word &#8220;Project&#8221; right in the title!  Coincidence?  I think not.)</p>
<p>As a film crew comes together once, against tremendous odds fought by various producers and directors, to birth a film production, so have I seen most projects run. As if after this project, the world might end. As if after this project, we could all retire. As if deep down in their hearts, stakeholders and managers secretly believe this: &#8220;The idea that this project might actually make it out the door on-time, under-budget, with few defects?  That&#8217;s hilarious.&#8221;</p>
<p>Then, at miraculous Project conclusion, all cast and crew return to their structural silos (their true homes). Then off to the next Project. Emergency permeates the whole mechanism. Whoa!  This next Project might be the one that finally kills us all!</p>
<h3>Project: Wrong Atomic Unit of Production?</h3>
<p>Even if a <em><strong>product or system might persist for years</strong></em>, each of its major releases (sequels, in fact) is typically still a Project. Most software projects still have this one-time, heroic, desperate, fire-and-forget feel to it. This very narrow focus, this &#8220;goal obsession&#8221; on the part of project managers was <a href="http://leadinganswers.typepad.com/leading_answers/2009/10/zombieland-project-management.html" target="_blank">recently described well here</a>. Certainly there are Project Managers who are better than that, and focused more broadly on notions of business value flow, portfolio, market differentiation, team productivity, context switching costs. They are the exception, partly for reasons I cover below.</p>
<p>One or the root cause issues here is this: <em><strong>as an atomic unit of production, Projects can be inherently bad</strong></em>. And, as I&#8217;ll discuss later, fundamentally different than an alternative granule: the <em>Release</em>. First, let&#8217;s go to a military metaphor, which is always galvanizing.</p>
<h3>Corporate Silos: 14th Century Italian Civil War Between City States</h3>
<p>Meanwhile, what, in the context of software Projects, is the corporate atomic unit of budget authority, responsibility, and power? The structural silo. Ouch. We have somehow evolved default software development structure and process that seem to quietly mimic 14th Century Italian feudal warfare.</p>
<p>Our structural silos, under their various VPs and Directors, are capable of behaving like city states. People who report up through Architecture, Development, Production Deployjment/Support, DBAs, QA, Facilities, etc &#8212; are typically most loyal to their role and responsibility silos. How could they not be? That is how they have been incentivized and empowered. They represent abstract notions of &#8220;quality&#8221; and &#8220;architecture&#8221; and &#8220;programming,&#8221; divorced from the very real, complex, organic, end-to-end needs of the enterprise (or worse; more below).</p>
<p><em><strong>None of these silos owns the proper flow of business value through the organization</strong></em>. You could say that our corporate Italy has insufficient representation and incentive for its larger, nation-sized concerns. It&#8217;s OK with our corporate Firenza if Italia perishes, as nonsensical as that seems at first blush.</p>
<p>None of the city states owns whether we are reducing costs and increasing revenues for the entire enterprise. Indeed, I have frequently seen these city states incentivized to combat cost reduction and revenue increase, in order to gather more resources and power to themselves. QA is incentivized to find bugs, and find them they do; their weapon of choice: the bug report system. Architecture is incentivized to represent the bigger picture, the technology future; their weapons of choice: Visio and PowerPoint. And so on. It&#8217;s a fabulous buck-passing machine at best and, (segue alert! New metaphor) at worst, as if some corporate departments are like parasites feeding on the enterprise as host organism.</p>
<p>Note that I am not saying that the enterprise does not need to address the <em><strong>concerns</strong></em> and <em><strong>skills</strong></em> and <em><strong>worldviews</strong></em> traditionally represented by architects, testers, production deployment and configuration experts, project managers, etc. I am not against all specialization.</p>
<p>But meanwhile, again and again, the Project Managers assemble these temporary Waterfall initiatives, using the best go-to <em>condottieri</em> (think &#8220;Ronin&#8221;) they can find, and lead them through Waterfall-phase silo-gauntlets, one at a time. As the project winds down, the temporary allegiances dissolve. Back everyone goes to their little city-state.</p>
<p>So, as I&#8217;ll discuss, what I increasingly question is the idea of empowering structural silos that represent sets of skills, concerns, and worldviews, using budgets, hiring authority, etc. If that&#8217;s how the money flows, into these little city states, I think you should expect your own little replay of the 14th Century Italian civil wars.</p>
<h3>Voila, Disruptive Change:<br />
The Agile Team as New Atomic Unit of Production Capacity</h3>
<p>So we have this existing  corporate socio-economic fabric: Projects being pushed, against powerful odds, through this fractured system of city states. Real business value is not created as a direct result of this fabric, but despite it. People strike backroom deals. A barter economy of favors breaks out. Grudges arise, and are repaid. It is, to my mind, more ugly than pretty.</p>
<p>And then along comes this notion of a self-organizing, empowered, cross-functional, high-discipline, highly-skilled Agile Team, as the new fundamental unit of production capacity. We&#8217;re going to mow down all these cube walls, bring all of these people in from their various city states, several of whom quietly loathe each other, and ask them to form a cohesive team. We&#8217;re going to ask them to sit with each other, deliver measurable business value in a steady flow together. Form, Norm, and Storm. We&#8217;re going to ask them to treat this new team space, not like a brief Project-scope visit to a kind of summer camp, but as their permanent home. We&#8217;re asking them to break their powerful, traditional allegiance to their city state. Remove that tattoo; forget that secret handshake. Even though <em><strong>that&#8217;s how their performance gets evaluated. That&#8217;s how they get paid. </strong><span style="font-style: normal;">No wonder it so frequently looks like a bunch of Hippie Kumbaya. </span></em></p>
<p>No wonder the corporate anti-bodies swarm (oops, yes, another metaphor; should have warned you). No wonder the first several retrospectives feel like the teacher asking the class who put the thumbtack on her chair.</p>
<h3>Yes, I am Over-Simplifying</h3>
<p>To make a point, yes I am. The truth is, I have seen the above scenario more than once. The larger the organization I am working with, the worse it is, and the likelier it is to fight agility, and fight smooth business value flow.</p>
<p>But let&#8217;s at least find a common pattern language or metaphor set for this fundamental issue of &#8220;cultural change&#8221; in the enterprise. In future blog posts, which will be about how all the Hippy Kumbaya agile team culture can actually help the entire enterprise evolve in a way that results in true competitive advantage at the enterprise level, I&#8217;ll propose new terms and newish structure (not entirely my invention). </p>
<p>Meanwhile, though, here is my premise: </p>
<p>Your entire corporate socio-economic fabric might be fundamentally busted, seen through the lense of software development &#8220;Projects.&#8221; You might be recreating civil war in Italy in the 14th century. This might make a great film, but it could be a terrible context within which to try to optimize how the collaborative creation of software systems (be they products out in the market wild, or internal web services) increases your revenue, or decreases your expenses.</p>
]]></content:encoded>
			<wfw:commentRss>http://patrickwilsonwelsh.com/?feed=rss2&amp;p=236</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Coaching Birds, Bats, and Squirrels from the House</title>
		<link>http://patrickwilsonwelsh.com/?p=208</link>
		<comments>http://patrickwilsonwelsh.com/?p=208#comments</comments>
		<pubDate>Tue, 13 Oct 2009 07:59:41 +0000</pubDate>
		<dc:creator>patrickwilsonwelsh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://patrickwilsonwelsh.com/?p=208</guid>
		<description><![CDATA[Ever Had a Client Stuck in a Nasty Situation? Ever Had a Bird Trapped in Your House? I&#8217;ve had both. In both cases, I learned not to mess up in the following way: trying to grab the bird and toss it out of the house. Birds hate that, and are really skillful at resisting the [...]]]></description>
			<content:encoded><![CDATA[<h3>Ever Had a Client Stuck in a Nasty Situation?<br />
Ever Had a Bird Trapped in Your House?</h3>
<p>I&#8217;ve had both. In both cases, I learned not to mess up in the following way: trying to grab the bird and toss it out of the house. Birds hate that, and are really skillful at resisting the attempt. You or the bird can also get badly injured that way.</p>
<p>As a Shu-level, novice coach, I did the classic wrong-headed stuff, and still work hard to resist temptations to do the same stuff: pushing, pulling, badgering the client from a bad situation to a good one. It really is like chasing a bird around the house, brandishing a tennis racket. (Note to self: No!)</p>
<h3>Releasing Attachment to the Outcome</h3>
<p>We cannot truly <strong><em>control</em></strong> whether, indeed, the bird leaves the house, much less how fast or how well. There are no shortcuts for us or the bird. We can, however, strongly <strong><em>influence</em></strong> how the whole thing unfolds.</p>
<p>It really does have to be the bird&#8217;s idea to leave the house, if it will ever in fact happen. This may take a few seconds, a few minutes, a few hours (a few weeks! a few months!  a few years!). Take your time.</p>
<p>Those of us who have (as I have) released birds, bats, and squirrels from the house have learned (A) how to open and close doors, and leave seed trails, in a way that invites the unhappy bird or squirrel out of the house; and (B) patience. With one bat, who flew along walls at 2&#8243; from the wall, straight to each corner, then turned an abrupt 90-degree turn at the next corner, over and over, in perfect silence, it really took awhile. That bat took 30 minutes to notice that there was a door open <em><strong>along</strong></em> one of those walls (if the door had opened in, instead of out, it might have taken 1 minute).</p>
<p>When he finally flew through it, I pounced up and shut that door, preventing regression. I had been sitting there, drinking a beer, and tracking him as he flew these perfectly rectangular room circuits (not easy: bats indoors are flying about as fast as your neck muscles will allow your head to pivot).</p>
<p>Once he had found that first door, he seemed to sense that other open doors were good things, and flew straight through the remaining rooms out to freedom, bugs, and no doubt a well-earned nap. In classic coaching fashion, I had reached that tipping point where I had won enough trust to say goodbye.</p>
<h3>Close Some Doors, Open Others</h3>
<p>If you close doors to the inner part of the house (example: removing folks from their cubes and placing them in open workspaces, or not engaging in thermonuclear email exchanges about the New Agile Initiative),  you can invite clients to <strong><em>not</em></strong> <strong><em>worsen</em></strong> their situation.</p>
<p>If you open other doors and windows to the great agile outdoors, you invite clients to try inviting, healthy, addictively fun, cool new things (example: tweaking the card wall to reveal blockages or gaps in value flow; helping clients write their first few storytests).</p>
<h3>Asking Gently Provocative Questions: Opening Windows in the Mind</h3>
<p>By this, I don&#8217;t mean &#8220;Where the hell are all of your unit tests&#8221;?  (BTW, you know the question I <em><strong>REALLY</strong></em> don&#8217;t mean?  It&#8217;s this one:  &#8221;Don&#8217;t you realize testability is vastly more crucial than encapsulation, you dolt?&#8221;)</p>
<p>I mean, instead, questions like &#8220;Has Rob paired with Lily recently?&#8221;  or &#8220;How did method-level cyclomatic complexity change this past iteration?&#8221;  or &#8220;How do you think that business verification went?&#8221; or &#8220;What do you think about the size of that test?&#8221; or &#8220;What do you think of that class name?&#8221; or &#8220;Did we see this retrospective improvement item in the last retrospective?&#8221; or &#8220;What do you really enjoy doing most on the team?&#8221;</p>
<h3>If the Bird Blogs About How Cleverly I Let Him Out of the House,<br />
I Probably Messed Up</h3>
<p>The best of my personal coaches model for me, and counsel to me, the art of the client never discovering that the great idea was not originally theirs. Smart subordinates have been leading their managers from below in this fashion since the dawn of command and control, no doubt.</p>
<p>Not only is it OK, in a coaching position, to be a peer-to-peer influencer, as opposed to a top-down manager, it is typically preferable. People who I coach end up taking leaps of faith and trying scary new things, in good faith, not because anyone, including me, commands them to do them, or to try them. They do so because they trust me, like me, respect me, and happen to have had this cool idea pop spontaneously into their heads, unbidden.</p>
<p>The coaches I most respect, and most seek to work with, are those who help me as I refine my Ha and Ri in this coaching by question, coaching by seed trail, coaching by patient, engaged, gently provocative observation.</p>
<p>If you see me badgering someone to just shut up and do this Super Advanced Best Agile Practice Thing, please bust me on it. I will likely thank you (eventually, anyway).</p>
]]></content:encoded>
			<wfw:commentRss>http://patrickwilsonwelsh.com/?feed=rss2&amp;p=208</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Agile Team Lead : Useful New Role?</title>
		<link>http://patrickwilsonwelsh.com/?p=170</link>
		<comments>http://patrickwilsonwelsh.com/?p=170#comments</comments>
		<pubDate>Wed, 30 Sep 2009 02:09:31 +0000</pubDate>
		<dc:creator>patrickwilsonwelsh</dc:creator>
				<category><![CDATA[Agility]]></category>
		<category><![CDATA[SW Mgmt]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://patrickwilsonwelsh.com/?p=170</guid>
		<description><![CDATA[My pal Abby Fichtner, the HackerChick, blogged today about emerging agile team leadership patterns and practices, as had been reinforced for her by a recent presentation by David Spann. She lists beliefs and behaviors that, according to Spann, when held by whomever actually manages an agile team, tend to help or tend to hurt. These resonated [...]]]></description>
			<content:encoded><![CDATA[<p>My pal Abby Fichtner, the HackerChick, <a href="http://www.thehackerchickblog.com/2009/09/agile-leadership-methodology-ain-enough.html" target="_blank">blogged today</a> about emerging agile team leadership patterns and practices, as had been reinforced for her by a recent presentation by <a href="http://www.cutter.com/meet-our-experts/spannd.html" target="_blank">David Spann</a>. She lists beliefs and behaviors that, <a href="http://www.aamngt.com/" target="_blank">according to Spann</a>, when held by whomever actually manages an agile team, tend to help or tend to hurt. These resonated with me strongly.</p>
<h3 style="font-size: 1.17em;">Premise: It Ain&#8217;t Project Management</h3>
<p>Meanwhile, coincidentally, I had been in conversations for the last week with stakeholders about how, in an agile transition, old patterns of Project Management are not a good fit. Traditional Project Managers are typically insufficiently team-focused and insufficiently portfolio-focused, while too top-down and imperative. Agile teams and systems have long lifecycles and broadening authority and responsibility that traditional Project Managers cannot typically see. With all due respect to Spann (with whom I think I agree nearly entirely), I would claim that, adaptive or not, neither the adjective &#8220;Project&#8221; nor the noun &#8220;Manager&#8221; helps the person trying to lead an agile team. The old culture and terminology are equally misplaced in an emerging agile world.</p>
<p>So, true, the agile community has not had great answers to questions about who leads and manages agile teams, much less how. So, last week, when I was asked by my best Pillar pal and mentor what the main responsibility, the main tools, and the guiding principle of agile team leadership might be, I realized, after some reflection, that I have been baking these in my head for awhile, semi-consciously. David Spann and Abby Fichtner helped me bake them a bit further.</p>
<h3>Premise: It Ain&#8217;t Tech Leadership</h3>
<p>The Agile Team Lead (for lack of a better role term) is not the tech lead. Many teams need formal technical leadership; many teams may grow out of this, into a pattern of entirely emergent tech leadership and architecture. In any case, the tech lead role is not the right role (nor is it typically, as Abby implies, the right skills match or personality-type match) for team leadership overall.</p>
<h3>Premise: It Ain&#8217;t Scrum Master</h3>
<p>As Abby claims at the start of her post, focus on methodology alone, even while there is frequently a temporary place for a certain style of such coaching, is again not the right focus for an Agile Team Lead. This is another focus that is too narrow, and too short. The team should outlive its Scrum Master by years; that may be a measure of a Scrum Master&#8217;s skill: the ability to leave the team in a cohesive and self-improving state. No, process coaching is not exactly agile team leadership either.</p>
<h3>Look!  A Man with Nine Legs! Oh Bloody Hell, He Ran Away</h3>
<p>We need something &#8220;completely different,&#8221; however rare, in our Agile Team Lead. Here are the things I now want:</p>
<h4>Overarching Responsibility: Optimizing Flow of Business Value</h4>
<p>In whatever ways a team improves: technical, interpersonal, process, practice, attitude, morale &#8212; we can measure and express them in how business value is delivered more and more efficiently, easily, steadily, skillfully, and (I&#8217;ve seen it) joyfully. The Agile Team Lead can trace all improvements back to how well the team delivers ROI and reduces code asset TCO, and back to how delighted the customer and team both are. The Agile Team Lead is in the business of knocking the customer&#8217;s socks off, over and over again.</p>
<h4>Four Main Tools</h4>
<p>The Agile Team Lead optimizes business value flow mainly with four varieties of tactic:</p>
<ol>
<li><strong><em>Continuous Team Building &#8212; <span style="font-weight: normal;"><span style="font-style: normal;">this includes all of the soft, fuzzy means Spann lists, whose ends are team cohesion, high ambient trust, high ambient respect, high morale, good humor, equanimity, close interpersonal connection. In Jazz, musicians talk about a band having so much groove that everyone can read everyone else&#8217;s mind. Reinforcing that is the Agile Team Lead&#8217;s link inward toward the team (bear with my link metaphor here for a few more paragraphs). </span></span></em></strong></li>
<li><strong><em>Continuous Planning</em></strong> &#8212; for current purposes, I mean by this all of the agile practices and patterns around eliciting, analyzing, scoping, dividing, prioritizing, iterating, planning, testing, tracking, publishing, and delivering. The Agile Team Lead does not perform all of these practices solo, but leads their performance. This is how the Agile Team Lead is held to account by all managers and stakeholders outside the team. This is the outward link from the team to the world.</li>
<li><strong><em>Continuous Unblocking</em></strong> &#8212; teams continuously need outside help, resources, more team members, fewer team members, and other emergent support that they, as a team, lack the authority to achieve. The Agile Team Lead does the heavy corporate lifting to get these deals swung, to keep the team in steady flow. This is the link from the outside world back to the team.</li>
<li><strong><em>Continuous Improvement</em></strong> &#8212; The Agile Team Lead guides, without pushing, the zillion varieties of retrospective improvements that the team does own the authority to make. This does include holding the team accountable for owning the ever-changing lists of things to be improved, and concrete improvement proposals and plans. Note that this is not the same as coaching, which may need to happen separately. Teams had better outgrow coaching, while they are never likely to outgrow a need for leadership. These are the links from the team back to itself.</li>
</ol>
<h4>Guiding Principle: <a href="http://en.wikipedia.org/wiki/Servant_leadership" target="_blank">Servant Leadership</a></h4>
<p>The leaders most admired in the agile community and software community, as in the world at large, are those who lead by giving and supporting. This is classically the root cause of a <a href="http://www.amazon.com/Good-Great-Companies-Leap-Others/dp/0066620996" target="_blank">graduation from &#8220;good&#8221; to &#8220;great.&#8221;</a></p>
<p>And we are learning that it is simply the most effective variety of leadership and management: collaborative, listening, deeply present, deeply respectful, enthusiastic, inspiring, supportive, celebratory. And certainly trusted and adaptive, as Spann claims.</p>
<p>The Servant Leader attaches identity to the team&#8217;s abilities and accomplishments, not just to his or her own. Spann has captured several of the beliefs and concrete behaviors that we can only get from these leaders who lead to serve, not to rule. Indeed, an agile team&#8217;s Agile Team Lead must earn the team&#8217;s consent to be lead. Mature self-organizing teams eventually outgrow structural, imperative command and control, imposed by fiat.</p>
<p>Doesn&#8217;t it seem sometimes that the whole technical world is trying to go collaborative, trust-community, peer-to-peer? Aren&#8217;t these same patterns emerging everywhere, in different bits and bobs? Certainly it feels that way to me. Flat is the new hierarchy; village is the new city; conversation is the new document; trust is the new currency; small is the new big.</p>
<h3>Thoughts?</h3>
<p>That&#8217;s my sketch so far: the Agile Team Lead, through the lense of Servant Leadership, uses Continuous Team Building, Continuous Planning, Continuous Unblocking, and Continuous Improvement to optimize how business value flows through the team.</p>
<p>I am still baking this one; your feedback is appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://patrickwilsonwelsh.com/?feed=rss2&amp;p=170</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>
