<?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>Kai Ramuenke &#187; Agile Software Development</title>
	<atom:link href="http://www.ramuenke.de/archives/category/agile-software-development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ramuenke.de</link>
	<description>Just another agile software development blog</description>
	<lastBuildDate>Wed, 20 May 2009 13:28:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Http-only session cookie</title>
		<link>http://www.ramuenke.de/archives/42</link>
		<comments>http://www.ramuenke.de/archives/42#comments</comments>
		<pubDate>Wed, 20 May 2009 13:28:25 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Agile Software Development]]></category>
		<category><![CDATA[ThoughtBlog]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.ramuenke.de/?p=42</guid>
		<description><![CDATA[In my last post i explained, how to test session protected resources with selenium rc and ruby. While we were migrating to Rails 2.3 all such tests suddenly stopped working because the JavaScript didn&#8217;t return the session cookie anymore. After some research we found out that you can control accessibility to the session cookie through [...]]]></description>
			<content:encoded><![CDATA[<p>In my last <a href="http://www.ramuenke.de/archives/39">post</a> i explained, how to test session protected resources with selenium rc and ruby. While we were migrating to Rails 2.3 all such tests suddenly stopped working because the JavaScript didn&#8217;t return the session cookie anymore. After some research we found out that you can control accessibility to the session cookie through the browser by sending a little flag in the HTTP response header for Set-Cookie.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">response.<span style="color: #006633;">setHeader</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Set-Cookie&quot;</span>, <span style="color: #0000ff;">&quot;cookie_name=cookie_value; HTTPOnly=&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>By setting this flag you basically prevent any JavaScript from accessing the session cookie. Rails now sets this flag by default which makes it less vulnerably against cross scripting attacks.<br />
You can find all information you need including a list of supporting browsers <a href="http://www.owasp.org/index.php/HTTPOnly">here</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ramuenke.de/archives/42/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing session protected resources with Selenium RC</title>
		<link>http://www.ramuenke.de/archives/39</link>
		<comments>http://www.ramuenke.de/archives/39#comments</comments>
		<pubDate>Wed, 11 Mar 2009 09:34:38 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Agile Software Development]]></category>
		<category><![CDATA[ThoughtBlog]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.ramuenke.de/?p=39</guid>
		<description><![CDATA[Consider the following scenario: We book or buy some stuff through a web application and at the end of the process the application generates a receipt in form of a pdf for us. The pdf contains personal information so we make it only accessible to the current session.
We&#8217;d like to test the success scenario end-to-end, [...]]]></description>
			<content:encoded><![CDATA[<p>Consider the following scenario: We book or buy some stuff through a web application and at the end of the process the application generates a receipt in form of a pdf for us. The pdf contains personal information so we make it only accessible to the current session.<br />
We&#8217;d like to test the success scenario end-to-end, making sure that whatever we enter through the web application appears in the pdf. How to access the pdf from our Selenium RC test?</p>
<p>Grab the session cookie by calling:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">session_cookie = <span style="color:#0066ff; font-weight:bold;">@selenium_driver</span>.<span style="color:#9900CC;">get_eval</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'window.document.cookie'</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>Then grab the resource through a http request within the selenium rc test:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">resource = <span style="color:#6666ff; font-weight:bold;">Net::HTTP</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>host, port<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">start</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>http<span style="color:#006600; font-weight:bold;">|</span>
   get = <span style="color:#6666ff; font-weight:bold;">Net::HTTP::Get</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>path_to_resource<span style="color:#006600; font-weight:bold;">&#41;</span>
   get<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'Cookie'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = session_cookie
   response = http.<span style="color:#9900CC;">request</span><span style="color:#006600; font-weight:bold;">&#40;</span>get<span style="color:#006600; font-weight:bold;">&#41;</span>
   response.<span style="color:#9900CC;">body</span>
<span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<p>It works fine for a Rails app and i guess this principle should be applicable for any other server with cookie based session handling.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ramuenke.de/archives/39/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running a memory-only HSQLDB in server mode</title>
		<link>http://www.ramuenke.de/archives/34</link>
		<comments>http://www.ramuenke.de/archives/34#comments</comments>
		<pubDate>Mon, 09 Feb 2009 11:05:45 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Agile Software Development]]></category>
		<category><![CDATA[ThoughtBlog]]></category>
		<category><![CDATA[Build]]></category>

		<guid isPermaLink="false">http://www.ramuenke.de/?p=34</guid>
		<description><![CDATA[In most of the project i&#8217;ve been working in we used a light-weight database like HSQLDB or H2 in the local development environment. It&#8217;s easy to set up in the build and you make yourself independent from the setup of the dev machines. Just check out the trunk and off you go.
It&#8217;s usually fine to [...]]]></description>
			<content:encoded><![CDATA[<p>In most of the project i&#8217;ve been working in we used a light-weight database like HSQLDB or H2 in the local development environment. It&#8217;s easy to set up in the build and you make yourself independent from the setup of the dev machines. Just check out the trunk and off you go.<br />
It&#8217;s usually fine to run a file-based database but in case you have to do your development on a windows machine a file based database is really annoying. Once a process has a connection to the database it locks the file. Can&#8217;t run the app in the web server and inspect the database with squirrel at the same time.<br />
The good thing is that HSQLDB allows you to run a memory-only database in server mode (haven&#8217;t checked H2). Start your server like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">java -cp ./hsqldb.jar org.hsqldb.Server -database.0 mem:mydb -dbname.0 aliasdb</pre></div></div>

<p>Instead of passing the database setup as parameters you can put them into a <code>server.properties</code> file which has to be in the same directory where you execute the command.</p>
<p>Then use this url to connect to your database:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">jdbc:hsqldb:hsql://localhost/aliasdb</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.ramuenke.de/archives/34/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A wrong emphasis on task estimation</title>
		<link>http://www.ramuenke.de/archives/15</link>
		<comments>http://www.ramuenke.de/archives/15#comments</comments>
		<pubDate>Sun, 03 Aug 2008 13:01:30 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Agile Software Development]]></category>
		<category><![CDATA[ThoughtBlog]]></category>
		<category><![CDATA[Estimation]]></category>

		<guid isPermaLink="false">http://www.ramuenke.de/?p=15</guid>
		<description><![CDATA[From discussions over the last few months i realized that quite a lot of agile teams have a high emphasis on task estimation. So far i am very much in doubt of the benefits task estimations will give to a team. In fact i come to believe that a high emphasis on task estimation will [...]]]></description>
			<content:encoded><![CDATA[<p>From discussions over the last few months i realized that quite a lot of agile teams have a high emphasis on task estimation. So far i am very much in doubt of the benefits task estimations will give to a team. In fact i come to believe that a high emphasis on task estimation will do more harm than good and is the first step into micromanagement. Especially if your team does full blown task estimation including reporting on time spent on task and estimating the time remaining. That does not mean teams shouldn&#8217;t do task estimations but they should have a clear idea why they are doing it and what they want to get out of it. Teams usually try to get out two things from task estimation: capacity (velocity) of the team and tracking iterations (eg. iteration burn down charts). But both things can be achieved by other agile concepts which an agile team (should) apply anyways: velocity through story estimation and iteration tracking through a physical story wall. Hence it is questionable if task estimation is needed at all.<br />
Deriving team velocity out of task estimation is very dangerous and gives a wrong impression of real velocity over all iterations. The concept of velocity only works if the team sticks with the initial estimates and has a common base line and scale for all iterations. Estimating in time does not give the team a common base line regardless if the team uses hours, days or ideal days. What is an ideal day? Did i really spend the same amount of hours for the last four-hour-task? How do i take pairing or pair swapping into account? Estimating in time is flawed and is raising many questions as people interpret time quite differently.<br />
In addition there is a hidden effect when estimating with time. As the team progresses through the project it acquires more and more knowledge. This knowledge is reflected in better estimates which is of course positive. But it also means that velocity from iteration N is not comparable with iteration N-1 because there is no common base line. What is achievable in one ideal day/hour shifts with the increasing knowledge of the team. This effect does not happen if estimation is done relatively and the team sticks to the base line from the first estimation session of the project. Estimation still gets more accurate with gained knowledge but with a relative scale a task will be inserted more accurately within this scale.<br />
Would it help to estimate your tasks relatively by size like stories (and call it gummy bear points)?  It might work if you stick to the base line you created in your first iteration. A one gummy bear point task from iteration one is always the same size as a one gummy bear point task from any other iteration. I&#8217;ve never been on a team where tasks were estimated relatively so i can&#8217;t really tell if this approach would work.<br />
The other purpose of task estimation is tracking the progress of an iteration. Though it is important to track iteration progress it is much more important to track project progress. A completed story is the unit that delivers value to the product. Hence the focus should be to find out how much stories a team can finish in one iteration instead of tasks (the real velocity). Tracking completed stories on a project scale (via a story burn down chart) together with story velocity will give a team the ability to predict the projects end date. Task estimation simply fails to add visibility of progress on a project scale. Don&#8217;t get me wrong here. I still think that breaking down stories into tasks in iteration planning can still be valuable. But why putting in the extra effort to estimate tasks when the stories are already estimated? Especially if the team operates in short (and prefered) two week iterations.<br />
A key success factor for task estimation to become redundant is to follow the <a href="http://xp123.com/xplor/xp0308/index.shtml">INVEST</a> principle for all stories by heart. Teams can introduce N-1 analysis iterations to have stories as close as possible to INVEST before they are played in an iteration.<br />
For iteration tracking a physical story wall including all current tasks is absolutely sufficient. With a short look every team member can see if progress of the current iteration is healthy or not.<br />
One very bad thing i experienced when emphasizing to much on tasks is that the team loses sight of stories as a whole. Particularly if tasks are split into the horizontal architectural layers of the software. There is a high risk that integration problems will arise and tasks will bounce more often between &#8220;test ready&#8221; and &#8220;testing failed&#8221; then they need to. Every team member should understand the vertical slice of the system which the story represents and see it as a whole.</p>
<p>I strongly believe we can live very well without task estimation in agile projects. Most of the estimation effort should be put into story estimation to enable project tracking. Thus in alignment to the pattern of the agile manifesto:</p>
<p><strong>Project and story tracking</strong> over iteration and task tracking</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ramuenke.de/archives/15/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Direct field dependency injection</title>
		<link>http://www.ramuenke.de/archives/6</link>
		<comments>http://www.ramuenke.de/archives/6#comments</comments>
		<pubDate>Sat, 19 Jul 2008 12:30:02 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Agile Software Development]]></category>
		<category><![CDATA[Dependency Injection]]></category>
		<category><![CDATA[Mocks]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.ramuenke.de/?p=6</guid>
		<description><![CDATA[At almost any project i have been on there was a discussion whether to use constructor or setter injection. Sometimes it tends to be a religious war between developers and either side has good arguments for both approaches. With constructor injection you make sure that all dependencies are available on creation time of the object. [...]]]></description>
			<content:encoded><![CDATA[<p>At almost any project i have been on there was a discussion whether to use constructor or setter injection. Sometimes it tends to be a religious war between developers and either side has good arguments for both approaches. With constructor injection you make sure that all dependencies are available on creation time of the object. Setter injection on the other hand gives you a little bit more flexibility. Especially if a class has more than 3 constructor parameters it&#8217;s getting a bit clunky with constructor injection.<br />
I personally tend more to constructor injection but since the auto-wiring capabilities of the Spring frameworks there is a third way to do your dependency injection: inject a dependency directly into the field of a class. Of course this approach has a downside if the class is used outside the Spring container, but for most Spring-based projects this is quite unlikely. Let&#8217;s look at some code to see how field injection works.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">@Service
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> HelloService <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> sayHello<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> <span style="color: #0000ff;">&quot;Hello! I'm a service&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
@<span style="color: #003399;">Component</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SomeComponent <span style="color: #009900;">&#123;</span>
&nbsp;
    @Autowired
    <span style="color: #000000; font-weight: bold;">private</span> HelloService service<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> saySomething<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> service.<span style="color: #006633;">sayHello</span><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></pre></div></div>

<p>It&#8217;s as simple as that. The classes are annotated with <code>@Service</code> and <code>@Component</code> to be considered as candidates for auto-detection as i prefer to have as little XML configuration as possible. Thus the <code>applicationContext.xml</code> is quite simple:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;beans</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.springframework.org/schema/beans&quot;</span></span>
<span style="color: #009900;">       <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span>
<span style="color: #009900;">       <span style="color: #000066;">xmlns:context</span>=<span style="color: #ff0000;">&quot;http://www.springframework.org/schema/context&quot;</span></span>
<span style="color: #009900;">       <span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://www.springframework.org/schema/beans</span>
<span style="color: #009900;">           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd</span>
<span style="color: #009900;">           http://www.springframework.org/schema/context</span>
<span style="color: #009900;">           http://www.springframework.org/schema/context/spring-context-2.5.xsd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;context:annotation-config</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;context:component-scan</span> <span style="color: #000066;">base-package</span>=<span style="color: #ff0000;">&quot;org.playground.di&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/beans<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Of course we usually would start out by writing tests first. But how can we write unit tests for <code>SomeComponent</code> when we don&#8217;t have access to the field and inject a mock object? Luckily the developers of Spring thought of that and provide us with a class called <code>ReflectionTestUtils</code> which is available since Spring 2.5. For this unit test i&#8217;ll use <a href="http://code.google.com/p/mockito/">Mockito</a> to mock out <code>HelloService</code>.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SomeComponentUnitTest <span style="color: #009900;">&#123;</span>
&nbsp;
    @Mock
    <span style="color: #000000; font-weight: bold;">private</span> HelloService mockService<span style="color: #339933;">;</span>
&nbsp;
    @Before
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> initMocks<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        MockitoAnnotations.<span style="color: #006633;">initMocks</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    @Test
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> shouldUseMockService<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
        SomeComponent component <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SomeComponent<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        ReflectionTestUtils.<span style="color: #006633;">setField</span><span style="color: #009900;">&#40;</span>component, <span style="color: #0000ff;">&quot;service&quot;</span>, mockService<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003399;">String</span> expectedMessage <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;I'm from a mock&quot;</span><span style="color: #339933;">;</span>
        Mockito.<span style="color: #006633;">stub</span><span style="color: #009900;">&#40;</span>mockService.<span style="color: #006633;">sayHello</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">toReturn</span><span style="color: #009900;">&#40;</span>expectedMessage<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003399;">String</span> actualMessage <span style="color: #339933;">=</span> component.<span style="color: #006633;">saySomething</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        verify<span style="color: #009900;">&#40;</span>mockService<span style="color: #009900;">&#41;</span>.<span style="color: #006633;">sayHello</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">Assert</span>.<span style="color: #006633;">assertEquals</span><span style="color: #009900;">&#40;</span>actualMessage, expectedMessage<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>To complete our testing we also gonna write an integration test:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">@RunWith<span style="color: #009900;">&#40;</span>SpringJUnit4ClassRunner.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span>
@ContextConfiguration<span style="color: #009900;">&#40;</span>locations <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;classpath:applicationContext.xml&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SomeComponentIntegrationTest <span style="color: #009900;">&#123;</span>
&nbsp;
    @Autowired
    <span style="color: #000000; font-weight: bold;">private</span> SomeComponent consumer<span style="color: #339933;">;</span>
&nbsp;
    @Test
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> shouldSaySomething<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
        <span style="color: #003399;">String</span> expectedMessage <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Hello! I'm a service&quot;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003399;">String</span> actualMessage <span style="color: #339933;">=</span> consumer.<span style="color: #006633;">saySomething</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">Assert</span>.<span style="color: #006633;">assertEquals</span><span style="color: #009900;">&#40;</span>expectedMessage, actualMessage<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.ramuenke.de/archives/6/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Agile is about</title>
		<link>http://www.ramuenke.de/archives/4</link>
		<comments>http://www.ramuenke.de/archives/4#comments</comments>
		<pubDate>Mon, 30 Jun 2008 11:00:00 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Agile Software Development]]></category>
		<category><![CDATA[Basics]]></category>

		<guid isPermaLink="false">http://www.ramuenke.de/?p=4</guid>
		<description><![CDATA[If you ask ten people for what Agile is about, you will probably get ten different answers. In this post i don&#8217;t want to create my own definition but instead discuss two basic drivers for doing Agile.
A common response i get to this question is: Agile will make us deliver faster. Though possibly true if [...]]]></description>
			<content:encoded><![CDATA[<p>If you ask ten people for what Agile is about, you will probably get ten different answers. In this post i don&#8217;t want to create my own definition but instead discuss two basic drivers for doing Agile.</p>
<p>A common response i get to this question is: <em>Agile will make us deliver faster.</em> Though possibly true if you are a mature Agile organization i don&#8217;t think this is what Agile is about in the first place. Is going fast really what you&#8217;re after?</p>
<p>In my opinion the most basic driver is to generate business value as early as possible by delivering working software. This is different from just going fast as you can deliver quickly but not the right thing to produce value. Generating early business value is only possible if the team works on the most important things first. It requires high involvement from the business and continuous collaboration throughout the project to make sure the team generates value. Apparently this is often neglected by traditional organizations through their functional structure and thinking in silos.</p>
<p>Another basic driver for Agile is removing pain points and obstacles in the delivery process. This driver is highly influenced by Lean thinking. You look at your delivery process and ask the question: What is our biggest problem in delivering high quality, working software. You identify the biggest problem, look at the root cause, fix it and look for the next biggest problem. You do this continuously and you actually will go faster as you are removing your obstacles step by step. Typical examples for pain points and obstacles are functional teams rather than cross-functional teams, manual testing rather than automated testing or communication through documentation rather than face-to-face communication and finding placeholders for conversation.</p>
<p>Having these basic drivers is great but there is a tension between these two drivers. If you only go for business value you will end up with heaps of technical debt. Technical debt can be generated by a change of direction to tackle the most important things first. Or by the simple fact that the team gains more and more knowledge about the system and domain from iteration to iteration. Technical debt also tends to have a high interest rate and the longer you wait to remove technical debt the higher the interest rate will get. On the other hand if you concentrate your effort purely on removing technical debt you will lose focus on business value or won&#8217;t deliver business value at all.</p>
<p>Hence the trick is to find the right balance between the two drivers when you plan your iterations. Deliver business value but also allocate time to tackle your biggest problem. I can&#8217;t really tell you the right balance but if you are new to Agile i would recommend to favor removing your biggest problem over delivering business value as it will have a long term effect on your overall delivery.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ramuenke.de/archives/4/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>It&#8217;s done when it&#8217;s done!</title>
		<link>http://www.ramuenke.de/archives/3</link>
		<comments>http://www.ramuenke.de/archives/3#comments</comments>
		<pubDate>Sun, 15 Jun 2008 04:23:26 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Agile Software Development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[User stories]]></category>

		<guid isPermaLink="false">http://www.ramuenke.de/?p=3</guid>
		<description><![CDATA[To define a user story as done can be a tricky task. It&#8217;s about negotiating with the customer and setting the right expectations. A common tool we use in our projects is defining Acceptance Criteria for user stories. Using Acceptance Criteria is great because we set expectations on the application&#8217;s behavior right from the start [...]]]></description>
			<content:encoded><![CDATA[<p>To define a user story as done can be a tricky task. It&#8217;s about negotiating with the customer and setting the right expectations. A common tool we use in our projects is defining Acceptance Criteria for user stories. Using Acceptance Criteria is great because we set expectations on the application&#8217;s behavior right from the start before implementing the story. We can drive the expectations of the customer on what will be delivered at the end of an iteration. Furthermore we can translate those Acceptance Criteria into executable and automated tests (more on that later). Thus we make sure that we do not break any existing functionality as we move on in the project. If a story passes all Acceptance Criteria it can be considered as done.</p>
<p>So how does an Acceptance Criteria look like? Let&#8217;s say we have a simple user story called &#8220;Login&#8221;:</p>
<p><em>As a registered user i want to log in so that i can view my personalized report</em></p>
<p>Acceptance Criteria are then described as scenarios. As an expample let&#8217;s look at a typical main success scenario for the user story above:</p>
<p><em>Given a registered user u<br />
When entering username FooFoo and password BarBar<br />
And logging in<br />
Then the personalized report for user u is shown.<br />
</em></p>
<p>A story can have as many Acceptance Criteria as necessary to consider it as done. Don&#8217;t be fooled to believe you can define every Acceptance Criteria upfront. As the team gains more and more knowledge while proceeding in an iteration more Acceptance Criteria may be discovered. Your initial set of Acceptance Criteria should be enough to make everyone comfortable to deliver that story.</p>
<p>So why this format of &#8220;Given&#8221; &#8220;When&#8221; &#8220;Then&#8221;? On my current project we use RSpec, a Behavior Driven Development framework for Ruby. You start by writing your stories with the scenarios in plain text files:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Story: Login
  As a registered user
  I want to log in
  So that i can view my personalized report
&nbsp;
  Scenario: login successful
    Given a registered user u
    When entering username FooFoo and password BarBar
    And logging in
    Then the personalized report for user u is shown.</pre></div></div>

<p>Each Given, When, Then is a step and i can define these steps in Ruby:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">steps_for<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:login</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  Given<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;a registered user $user&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span> user <span style="color:#006600; font-weight:bold;">|</span>
    user.<span style="color:#9900CC;">should</span> exsist
  <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">When</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;entering username $username and password $password&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span> username, password <span style="color:#006600; font-weight:bold;">|</span>
    page.<span style="color:#9900CC;">type</span><span style="color:#006600; font-weight:bold;">&#40;</span>username, account<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">When</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;logging in&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    page.<span style="color:#9900CC;">login</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">Then</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;the personalized report for user $user is shown&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span> user <span style="color:#006600; font-weight:bold;">|</span>
    page.<span style="color:#9900CC;">should</span> be_personalized_for<span style="color:#006600; font-weight:bold;">&#40;</span>user<span style="color:#006600; font-weight:bold;">&#41;</span> 
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>The great thing about this is that you can reuse the steps for other scenarios and hook up the RSpec framework with functional testing tools like Selenium or Frankenstein to have real end-to-end testing. In addition you can integrate the tests into the Continuous Integration server to have automated regression testing. The effort the team puts into fledging out Acceptance Criteria is directly translated into automated test code producing minimal waste.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ramuenke.de/archives/3/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
