<?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>Gojko Adzic &#187; citcon</title>
	<atom:link href="http://gojko.net/tag/citcon/feed/" rel="self" type="application/rss+xml" />
	<link>http://gojko.net</link>
	<description>Building software that matters</description>
	<lastBuildDate>Thu, 29 Jul 2010 22:37:42 +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>Putting Selenium in the right place</title>
		<link>http://gojko.net/2009/10/06/putting-selenium-in-the-right-place/</link>
		<comments>http://gojko.net/2009/10/06/putting-selenium-in-the-right-place/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 08:15:18 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[citcon]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=1253</guid>
		<description><![CDATA[Although Selenium is an essential trace element, it is toxic if taken in excess. That is what Wikipedia has to say on the chemical element Selenium, but pretty much sums up my feelings about the web testing tool of the same name as well. I like very much how easy it is to implement web [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/organic_selenium.jpg" style="width:200px" align="left" />Although Selenium is an essential trace element, it is toxic if taken in excess. That is what Wikipedia has to say on the chemical element Selenium, but pretty much sums up my feelings about the web testing tool of the same name as well. I like very much how easy it is to implement web tests with Selenium, but I&#8217;ve seen so many teams shoot themselves in the foot by misusing it and wasting a ton of time on writing and executing tests that simply got thrown away on the end. The <a href="http://code.google.com/p/webdriver/wiki/PageObjects">Page Object</a> pattern, popularised by Simon Stewart with WebDriver, seems to be the universally accepted best practice to manage UI tests efficiently and the preferred way to implement Selenium tests. However, at the recent <a href="/tag/citcon">CITCON Europe</a> conference in Paris, <a href="http://am.testingreflections.com">Antony Marcano</a> spoke against this and offered an alternative.<span id="more-1253"></span></p>
<p>One of the biggest issues with UI tests described at the task level (such as click there, type this etc) is that they <a href="http://gojko.net/2007/09/25/effective-user-interface-testing/">are very brittle and hard to understand</a>. Too many details in technical steps make it hard to see the big picture, so tests work nicely as a regression check but once something fails it is hard to figure out what exactly went wrong. They are also bound to a particular UI design, so when the design changes, lots of tests break. Selenium works on the technical task level and tests written for Selenium frequently fall into this black whole. Once the design is changed, you might as well do everything again from scratch. </p>
<p>Instead of writing tests at the technical task level, the Page Object pattern suggests creating one more level of indirection and describing business functionality of pages with objects (eg search for customers, submit registration form) and then implementing individual methods of these objects with Selenium. Tests are then written with the page object methods, which make them much more understandable and easier to maintain. Once the UI changes, we can reimplement only the relevant methods of Page Objects making the effects of changes relatively contained. Tests themselves don&#8217;t need to change. Similar ideas are implemented by <a href="http://texttest.carmen.se/index.php?page=concepts&#038;n=xusecase">xUseCase recorders</a> and Domain-Specific Testing Languages in Selenium (see <a href="http://www.solutionsiq.com/agile2008/agile-2008-domain.php">Mickey Phoenix&#8217;s Agile 2008 presentation</a>).</p>
<p>Marcano said that page objects focus on the wrong thing. Taking ideas from interaction design, he suggested that it is natural to think about functionality on three levels &mdash; goals, activities and tasks:</p>
<ol>
<li>Goal: Buy a book</li>
<li>Activities: Add the following items to the cart,&#8230;</li>
<li>Tasks: click search, type in book name, click book image, click Add to cart&#8230;</li>
</ol>
<p><br clear="all" /><br />
When thinking about web site functionality, people don&#8217;t think about pages but about activities that span multiple pages. Focusing on goal oriented cross-page activities instead of page oriented functionality makes tests more natural, easier to understand and maintain. Instead of Page Objects, Marcano suggested implementing activities with Selenium and then composing tests from activities. One more significant benefit of this approach is that activities aren&#8217;t baked into the user interface, unlike objects representing web pages, so the same test definitions can be kept for testing below the UI with different task implementations.</p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2009/10/06/putting-selenium-in-the-right-place/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Saving the game in enterprise software</title>
		<link>http://gojko.net/2009/09/28/saving-the-game-in-enterprise-software/</link>
		<comments>http://gojko.net/2009/09/28/saving-the-game-in-enterprise-software/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 11:17:01 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[citcon]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=1165</guid>
		<description><![CDATA[The most important take-away idea from CITCON Europe this year for me was probably building &#8216;save game&#8217; functionality as an integral feature in software systems. Antony Marcano talked about this, not as part of the official programme but over beers which is another example of how informal chatting at conferences is often more valuable than [...]]]></description>
			<content:encoded><![CDATA[<p>The most important take-away idea from <a href="/tag/citcon">CITCON Europe</a> this year for me was probably building &#8216;save game&#8217; functionality as an integral feature in software systems.</p>
<p><a href="http://am.testingreflections.com">Antony Marcano</a> talked about this, not as part of the official programme but over beers which is another example of how informal chatting at conferences is often more valuable than the schedule. He mentioned how it is common for games to automatically save the complete state at checkpoints. This allows us to easily go back to the last saved position and continue playing if our character gets killed for whatever reason. So if something really bad happens after 10 hours of playing, you don&#8217;t have to do it all over again. </p>
<p>Functionality similar to that could help immensely with exploratory testing in software. When we find an issue, we could easily go back to the last checkpoint and reproduce it and also use that same saved game later to check if the problem was fixed. This could also be used if a customer encounters a problem in production to make bug reports a lot more complete and reliable.</p>
<p>Implementing this feature is by no means a trivial task and might be nearly impossible to retrofit into existing systems. The reason why gaming companies can do it is that they consider saving as an integral feature of their systems from start. I have yet to try this but my gut feel is that if a system is built with this in mind, the actual overhead of doing it is minimal. Modern games have states as complicated as lots of enterprise systems, with tons of actors, their states and event information at any time.  Yet they manage to load it up in a few seconds and continue from the saved state. By designing for that up front, ensuring that all actors can be persisted and loaded and that all state is easily extractable, we should be able to do the same in enterprise software as well. </p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2009/09/28/saving-the-game-in-enterprise-software/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Top 10 reasons why teams fail with Acceptance Testing</title>
		<link>http://gojko.net/2009/09/24/top-10-reasons-why-teams-fail-with-acceptance-testing/</link>
		<comments>http://gojko.net/2009/09/24/top-10-reasons-why-teams-fail-with-acceptance-testing/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 12:19:37 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[acceptance testing]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[citcon]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=1148</guid>
		<description><![CDATA[I facilitated an openspace session on acceptance testing and collaboration between business people, developers and testers at CITCON Europe last week. We started with a list of five common reasons why I&#8217;ve seen teams fail with acceptance testing but added five more during the discussion, so here&#8217;s an expanded top 10 list: No collaboration &#8212; [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/citcon_aat.jpg" style="border:1px solid black; width:400px; margin:5px 5px 5px 5px" align="left" />I facilitated an openspace session on acceptance testing and collaboration between business people, developers and testers at <a href="/tag/citcon">CITCON Europe last week</a>. We started with a list of five common reasons why I&#8217;ve seen teams fail with acceptance testing but added five more during the discussion, so here&#8217;s an expanded top 10 list:<br />
<br clear="all" /><span id="more-1148"></span></p>
<ol>
<li><b>No collaboration</b> &mdash; as a specification of a system that acts as the shared definition of done, acceptance tests need to be collaboratively produced and agreed upon. Business people, developers and testers should all provide input, each from their own area of expertise. The discussion that happens around the specification is actually more valuable than the tests themselves, as people build a shared understanding of the domain and the problem at hand. If this discussion doesn&#8217;t happen, then teams still feel the effects of <a href="http://www.acceptancetesting.info/key-ideas/telephone-game/">the telephone game</a>. Symptoms of this problem are developers writing acceptance tests themselves, testers being expected to handle everything about acceptance testing and business dictating tests without any feedback from developers or testers. The solution for this are <a href="http://www.acceptancetesting.info/key-ideas/collaborative-specifications/">collaborative specifications</a> and <a href="http://www.acceptancetesting.info/key-ideas/specification-workshop">specification workshops</a>.</li>
<li><b>Focusing on how, not on what</b> &mdash; business specifications should be clear and understandable and allow the team to implement the best possible solution without prescribing the design or the implementation. Too often tests describe how something should be implemented rather than what should be implemented. Tests such as these are too low level, hard to understand and always turn out to be a pain to maintain long-term. Instead of facilitating system change they inhibit it as people will be reluctant to introduce changes that break a lot of tests. Symptoms of this problem are action-oriented acceptance tests, lots of workflows or duplication in tests and tests that are very technical. The solutions for this are <a href="http://www.acceptancetesting.info/key-ideas/communicating-intent">communicating intent</a> and <a href="http://www.acceptancetesting.info/key-ideas/distilling-the-specification/">distilling the specification</a>.</li>
<li><b>Tests unusable as live documentation</b>  &mdash; one of the greatest benefits of agile acceptance testing is that we are gradually building a human readable specification of the system. This specification is ideally automated to a great degree so that we can be confident that it is in sync with the code. This solves the problem of the running code being the only thing you can really trust about what the system does. Correct, easily understandable and accessible documentation is crucial for future change. If tests don&#8217;t serve as a live documentation that those benefits are lost. Symptoms of this problem are very technical tests, long tests, hard to understand tests, tests that are poorly organised so that you can&#8217;t quickly find relevant tests for a particular piece of functionality. Solutions for this is to ensure that tests can be used as a <a href="http://www.acceptancetesting.info/key-ideas/live-documentation/">live documentation</a>, reorganising them and updating when the ubiquitous language changes.</li>
<li><b>Expecting acceptance tests to be a full regression suite</b> &mdash; acceptance tests are primarily a specification of what the system should do and should deal with exemplars that represents whole sets of cases. Specifying too much and covering all possible edge cases will make them hard to understand and might introduce an effect similar to paralysis by analysis. So acceptance tests cannot provide a full regression test suite and additional tests are required (including exploratory testing). Symptoms of this problem are tests that are very long and verify a large number of similar cases. Note that this doesn&#8217;t mean that regression tests can&#8217;t be written and automated using the same tools as acceptance tests.</li>
<li><b>Focusing on tools</b> &mdash; some teams focus too much on tools and features of particular  tools, disregarding things that do not naturally fit into their chosen toolset. This makes the specification vague in parts that aren&#8217;t covered by a particular tool. Instead of that, teams should be focusing on the business specifications and then choosing the right tool for the job. In particular, tools should not play an important part in the specification workshop. Symptoms of this problem are ignoring the UI (as UI tests are hard to automate) and wasting time on converting specifications in a format suitable for a particular tool during the <a href="http://www.acceptancetesting.info/key-ideas/specification-workshop">specification workshops</a> (which breaks the flow of the discussion and wastes valuable time).</li>
<li><b>Not considering acceptance testing as value added activity</b> &mdash; agile acceptance testing is not about QA, but more about specifying and agreeing on what needs to be done. Teams that consider it part of QA often delegate the responsibility to it to junior programmers and testers, which effectively means that junior team members will be writing the specification (which is wrong on so many levels that I don&#8217;t know where to start). The solutions for this are <a href="http://www.acceptancetesting.info/key-ideas/specification-workshop">specification workshops</a>.</li>
<li><b>&#8220;Test code&#8221; not maintained with love</b> &mdash; tests and code to automate them are often considered as less important than production code, so given to less capable developers and testers to implement and maintain. This leads to huge maintenance problems later and can cause teams to completely abandon full suites of tests. Acceptance tests are the specification of a system so they are crucial to the success of a project. They also need to be maintained and kept in sync with the live project language and design in order to serve as a <a href="http://www.acceptancetesting.info/key-ideas/live-documentation/">live documentation</a>. </li>
<li><b>Objectives of team members not aligned</b> &mdash; if the job of business analysts is only to deliver the specifications, the job of developers only to ship the system and the job of testers to ensure quality, then people won&#8217;t pull in the same direction or invest time in producing good acceptance tests. This is a management issue but failures with acceptance testing might make it more visible.</li>
<li><b>No management buy-in</b> &mdash; successful acceptance testing requires an active participation of the business and with no management buy-in the benefits will simply not be there (also related to #1).</li>
<li><b>Underestimating the skill required to do this well</b> &mdash; introducing acceptance testing is a tall order and often means changing the way teams are organised and approach specifications. This requires a lot of time and investment in skill-up, mastering tools, facilitating workshops and dealing with resistance to change. Underestimating the effort required to do this properly might cause teams to think that they failed and get disappointed too early.</li>
</ol>
<p><a href="http://warzee.fr/entry/opening_session_citcon_09_europe">Xavier Warzee filmed the session so watch the videos</a> if you are interested to see more of this discussion (scroll down on the page, it&#8217;s the last batch of videos). You can also check out two more write-ups by <a href="http://www.touilleur-express.fr/2009/09/20/citcon-2009-user-acceptance-test/">Nicolas Martignole</a> and <a href="http://social.hortis.ch/2009/09/24/citcon-paris-2009-le-compte-rendu/">Xavier Bourguignon</a> (both in French) and <a href="http://citconf.com/wiki/index.php?title=AcceptanceTesting">session notes</a> from the CITCON wiki. </p>
<p>If applying acceptance testing and BDD effectively is something that you want to learn more about, you might want to register for the <a href="http://skillsmatter.com/course/agile-testing/writing-software-that-matters-bdd-and-specification-by-example/wd248">Writing Software that Matters</a> workshop (Dec 4th, central London). I also run <a href="http://neuri.co.uk/training/agile-acceptance-testing/">on-site workshops</a> that help teams get started and implement agile acceptance testing. </p>
<p>Image credits: <a href="http://www.flickr.com/photos/iamroot/3947908104/in/set-72157622284781301/">Cirilo Wortel</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2009/09/24/top-10-reasons-why-teams-fail-with-acceptance-testing/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Mocks are not about isolation, but about responsibilities</title>
		<link>http://gojko.net/2009/09/21/mocks-are-not-about-isolation-but-about-responsibilities/</link>
		<comments>http://gojko.net/2009/09/21/mocks-are-not-about-isolation-but-about-responsibilities/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 10:08:43 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[citcon]]></category>
		<category><![CDATA[mock]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=1149</guid>
		<description><![CDATA[Last week at CITCON Europe Steve Freeman organised a session on mock objects focusing on the original ideas and what mock objects should be used for. Freeman started by disagreeing with the established view of mock objects as isolators for unit testing, advising developers to use mocks for object design and specifying responsibilities. According to [...]]]></description>
			<content:encoded><![CDATA[<p>Last week at CITCON Europe <a href="http://www.m3p.co.uk/blog">Steve Freeman</a> organised a session on mock objects focusing on the original ideas and what mock objects should be used for. Freeman started by disagreeing with the established view of mock objects as isolators for unit testing, advising developers to use mocks for object design and specifying responsibilities.<span id="more-1149"></span></p>
<p>According to Freeman, the original Mock object idea came out of the <a href="http://www.amazon.com/Object-Design-Roles-Responsibilities-Collaborations/dp/0201379430">Roles, Responsibilities and Collaborations object design school</a> (Rebecca Wirfs-Brock). When applying TDD to design and develop such objects, we need to specify and test responsibilities of objects, and externally visible object state isn&#8217;t part of that. Verifying that an object matches its responsibilities requires that we &#8220;fire an event and see that the appropriate messages have been sent to its collaborators&#8221;. According to Freeman, interfaces aren&#8217;t enough to specify objects because &#8220;an interface tells you what methods you can call, not when and how to call them. it doesn&#8217;t specify the contract &#8211; this is where mocks come in.&#8221; </p>
<p>Freeman advises using mocks as a design tool, not primarily to isolate dependencies: &#8220;To prove that this works we need a thingy but we don&#8217;t have that thingy yet, so we define it with a mock.Work your way through the slice of a system until you get to something external&#8221;. Instead of mocking out external dependencies, Freeman suggests that &#8220;you should only mock what you own&#8221;. Answering a question about the practice of mocking out database access, he said that once the system boundary is reached, developers should define the external interface in terms of their domain, providing a concrete implementation of that interface that speaks to the external system. This way the code inside a system is isolated from external dependencies and the concrete implementation should be covered by integration tests. This idea comes from Alistair Cockburn&#8217;s <a href="http://alistair.cockburn.us/Hexagonal+architecture">Ports and Adapters architecture</a> (also called Hexagonal Architecture), where the domain we work on is in the middle and ports help it communicate with the external world. Adapters for individual ports implement the responsibility for a particular external system integration. &#8220;Test adapters with the real thing&#8221;, suggested Freeman. In domain-driven-design this corresponds to specifying a repository for objects in the context in which we work, and then providing an implementation for that repository interface that talks to a specific database or a queueing system.</p>
<p>Speaking about different guidelines on when to use mocks, Freeman suggested a rule of thumb &#8220;we mock when the service changes the external world; we stub when it doesn&#8217;t change the external world &#8211; stub queries and mock actions&#8221;. However he said that teams should not be enforcing rigid rules. </p>
<p>As some of particularly bad ideas he&#8217;s seen and experienced with mocks, Freeman said that one of the biggest mistakes was to try to mock out standard java libraries. On a controversial topic of mocking concrete classes, Freeman said that it is generally a bad idea because that means that &#8220;you care about a dependency between objects enough to mock it but you haven&#8217;t made that relationship explicit in code&#8221;. If there is no interface defining the relationship between two classes then people won&#8217;t know which of the methods of the concrete class actually participate in the relationship. An interface suggests a role, and a class might have lots of other methods there. If the interface isn&#8217;t there then the relationship is just implicit, which will make it hard to understand and maintain these objects later. &#8220;Creating an interface also forces you to find a name for it so you might discover other things that weren&#8217;t obvious&#8221;, said Freeman. Freeman also suggested locking down all dependencies in unit tests (eg making them final), which forces developers to clear up where the dependencies are and how they are used.</p>
<p>Freeman&#8217;s upcoming book <a href="http://www.growing-object-oriented-software.com/">Growing Object Oriented Software, Guided by Tests</a> covers this topic in more detail.</p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2009/09/21/mocks-are-not-about-isolation-but-about-responsibilities/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>CITCON Europe 09</title>
		<link>http://gojko.net/2009/09/19/citcon-europe-09/</link>
		<comments>http://gojko.net/2009/09/19/citcon-europe-09/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 21:59:21 +0000</pubDate>
		<dc:creator>gojko</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[citcon]]></category>

		<guid isPermaLink="false">http://gojko.net/?p=1145</guid>
		<description><![CDATA[I just came back from CITCON Europe 09. It was a great experience and I thoroughly enjoyed it. I liked very much the fact that it was relatively small and very informal, with around 120 participants and openspace planning. This allowed me to put faces on a lot of blog authors and twitter users I [...]]]></description>
			<content:encoded><![CDATA[<p>I just came back from <a href="http://citconf.com/">CITCON Europe 09</a>. It was a great experience and I thoroughly enjoyed it. I liked very much the fact that it was relatively small and very informal, with around 120 participants and openspace planning. This allowed me to put faces on a lot of blog authors and twitter users I follow and catch up with some great folks from the community. </p>
<p>It was very encouraging to see the rising interest in agile acceptance testing, and we ended up almost running a full track on the topic with 4 presentations on lots of different aspects. I learned about Thoughtworks Twist from <a href="http://twitter.com/yrnclndymn">Andy Yates</a> and narrative testing ideas from <a href="http://www.testingreflections.com/blog/2">Antony Marcano</a> and <a href="http://andypalmer.com/">Andy Palmer</a>. A key take-away from the conference for me was probably Marcano&#8217;s idea of &#8220;saving the game&#8221;, building systems so that you can easily store a snapshot of the current state and go back to that later. I can see how this can significantly aid in all kinds of testing, including acceptance and exploratory, so I have to look for ways to implement that in my future projects. Exchanging experiences of how people do acceptance testing was also very valuable and, judging by the comments at the closing session, it looks as if quite a few people went away with some new ideas around it. </p>
<p>A special treat for me was being able to pick <a href="http://www.m3p.co.uk/blog/">Steve Freeman&#8217;s</a> brains on mock objects, learn what the original idea behind that was and what he thought were his biggest mistakes in using mock objects.</p>
<p>I also got to speak with JetBrains developers on optimising build dependencies in TeamCity, and from that I went away with the idea to convert dependencies from build triggers to snapshots to avoid diamond build issues and optimise the cycle. I&#8217;m a bit unconvinced about that solving my problem but I&#8217;ll sure give it a try.</p>
<p>In retrospect, it was time well spent. The only negative remark is that classrooms didn&#8217;t really work for me as a way to organise openspace discussion. Lucky that we usurped the big room with chairs set in a circle for two acceptance testing sessions. Thanks very much to everyone who participated in organising the conference and I hope to see you next time.</p>
<p>I took lots of notes at the conference and will be cleaning that up and posting articles here next week, so <a href="/feed">subscribe to my RSS feed</a> to get notified about that. </p>
]]></content:encoded>
			<wfw:commentRss>http://gojko.net/2009/09/19/citcon-europe-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
