<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>WatirMelon &#187; Watir</title>
	<atom:link href="http://watirmelon.com/category/Watir/feed/" rel="self" type="application/rss+xml" />
	<link>http://watirmelon.com</link>
	<description>A 93% Watir Based Blog by Alister Scott</description>
	<lastBuildDate>Fri, 27 Aug 2010 09:53:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='watirmelon.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/c9de640b304257bb2361e16d95fec265?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>WatirMelon &#187; Watir</title>
		<link>http://watirmelon.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://watirmelon.com/osd.xml" title="WatirMelon" />
	<atom:link rel='hub' href='http://watirmelon.com/?pushpress=hub'/>
		<item>
		<title>Reflecting on this blog</title>
		<link>http://watirmelon.com/2010/07/12/reflecting-on-this-blog/</link>
		<comments>http://watirmelon.com/2010/07/12/reflecting-on-this-blog/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 12:23:29 +0000</pubDate>
		<dc:creator>Alister Scott</dc:creator>
				<category><![CDATA[Automated Testing]]></category>
		<category><![CDATA[Software Testing]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Watir]]></category>
		<category><![CDATA[Wiki]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[Threadless]]></category>
		<category><![CDATA[37Signals]]></category>
		<category><![CDATA[Shoshin]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Thoughtworks]]></category>
		<category><![CDATA[reflection]]></category>
		<category><![CDATA[blogging]]></category>

		<guid isPermaLink="false">http://watirmelon.com/?p=430</guid>
		<description><![CDATA[I fired up my netbook tonight to read and reflect on some of my old blog posts. Here&#8217;s a collection of my favourite blog posts and a comment about each from my current perspective. Five organisations I would love to work for (geography aside): Amazingly this two+ year old list is still very accurate. In [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=430&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I fired up my netbook tonight to read and reflect on some of my old blog posts. Here&#8217;s a collection of my favourite blog posts and a comment about each from my current perspective.</p>
<p><a href="http://watirmelon.com/2008/05/22/five-companies-i-would-love-to-work-for/"><strong>Five organisations I would love to work for (geography aside)</strong></a>: Amazingly this two+ year old list is still very accurate. In 2010 I&#8217;d possibly drop 37signals from number 5 and replace them with either Thoughtworks or Mozilla or Google. Proving how great Atlassian is, <strong>Jeffrey Walker</strong> commented on this post, but very sadly, he&#8217;s <a href="http://radiowalker.wordpress.com/2009/09/02/goodbye-jeffrey/">no longer with us</a>.</p>
<p><a href="http://watirmelon.com/2009/09/22/software-piracy/"><strong>Software Piracy</strong></a>: I still stand by my views on pirated software being unnecessary, and still love my &#8216;biting the hand that feeds you&#8217; analogy.</p>
<p><a href="http://watirmelon.com/2009/09/19/why-i-do-automated-testing/"><strong>Why I do automated testing</strong></a>: This question still comes up (a lot) when attending job interviews. My answer is, unsurprisingly, still the same.</p>
<p><a href="http://watirmelon.com/2009/08/06/version-control-your-automated-tests-quickly-easily-today-for-free/"><strong>Version control your tests, quickly, easily, today for free</strong></a>: There&#8217;s <em>still</em> no excuse not to have version control of your automated tests. Please do it.</p>
<p><a href="http://watirmelon.com/2008/08/17/create-fancy-wiki-home-pages-with-confluence-lozenge-and-nuvola-icons/"><strong>Create fancy wiki home pages with Confluence, Lozenge and Nuvola Icons</strong></a>: A dead simple way to create an attractive Confluence home page with free icons.</p>
<p><a href="http://watirmelon.com/2008/06/12/weird-ways-car-indicators-and-shoshin/"><strong>Weird ways of working, car indicators, and shoshin</strong></a>: The thing that amazes me today about my eight month year old son is his <em>shoshin</em>, and how he contributes to my own.</p>
<p><a href="http://watirmelon.com/2008/04/13/watir-tests-from-wiki-page/"><strong>Running Watir tests from a Confluence wiki page</strong></a>: Some cool stuff I wish I could use more in my day job. One day.</p>
<p><a href="http://watirmelon.com/2008/04/16/why-watir/"><strong>Five reasons starting with F on why I use Watir:</strong></a> Again, two+ years later and all the reasons are still relevant.</p>
<p>Let me know if you have any favourites or would like me to write about something in particular in the future.</p>
<p><strong>Update 20 July 2010:</strong></p>
<p>Somehow I forgot this post I am really proud of: <a href="http://watirmelon.com/2008/03/13/software-testing-career-development/">Software Testing Career Development</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/watirmelon.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/watirmelon.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/watirmelon.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/watirmelon.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/watirmelon.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/watirmelon.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/watirmelon.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/watirmelon.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/watirmelon.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/watirmelon.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/watirmelon.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/watirmelon.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/watirmelon.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/watirmelon.wordpress.com/430/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=430&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://watirmelon.com/2010/07/12/reflecting-on-this-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/344eed26ff913de38b45620d18eed695?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">eclectic</media:title>
		</media:content>
	</item>
		<item>
		<title>Watir, Selenium &amp; WebDriver</title>
		<link>http://watirmelon.com/2010/04/10/watir-selenium-webdriver/</link>
		<comments>http://watirmelon.com/2010/04/10/watir-selenium-webdriver/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 11:25:55 +0000</pubDate>
		<dc:creator>Alister Scott</dc:creator>
				<category><![CDATA[Automated Testing]]></category>
		<category><![CDATA[FireWatir]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Watir]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[web testing]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[webdriver]]></category>
		<category><![CDATA[htmlunit]]></category>
		<category><![CDATA[automated web testing]]></category>
		<category><![CDATA[yuml]]></category>

		<guid isPermaLink="false">http://watirmelon.com/?p=386</guid>
		<description><![CDATA[Background Of all the open source automated web testing tools available, Watir and Selenium have been the two most popular ones. Traditionally there has been advantages and disadvantages of each. Selenium&#8217;s most useful features have been its support for multiple programming languages, and is support for testing a wide variety of browsers. This is because [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=386&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Background</strong></p>
<p>Of all the open source automated web testing tools available, <a href="http://watir.com">Watir</a> and <a href="http://seleniumhq.org/">Selenium</a> have been the two most popular ones. Traditionally there has been advantages and disadvantages of each. Selenium&#8217;s most useful features have been its support for multiple programming languages, and is support for testing a wide variety of browsers. This is because Selenium uses JavaScript to interact with the browser, and all modern browsers support JavaScript.</p>
<p><strong>Watir</strong></p>
<p>Watir was originally designed to support Internet Explorer only, and was originally designed as a ruby library, meaning you had to use ruby. Watir&#8217;s most useful feature was, and is, its neat API, most likely that way because it was designed by <a href="http://watir.com/team/">testers</a>. Also Watir has been traditionally had more functionality than Selenium, because it was designed to interact directly with IE instead of using JavaScript, as there are limits to what you can do with JavaScript, ie. you can&#8217;t script uploading a file.</p>
<p>The limitations of Watir have been addressed over time, for example, by creating new versions that support other browsers (FireWatir, SafariWatir and ChromeWatir for example), but the task of porting Watir to a new browser isn&#8217;t an easy one, and the task of keeping every port of Watir in sync, with the same API, is difficult. Because of Watir&#8217;s power, there has been lots of interest in it as a tool, particularly from developers who use other languages. Understandably, they have wanted to use the language they are accustomed to, and use for production code, and hence numerous language ports of Watir have also been created: <a href="http://watij.com/">Watij</a> and <a href="http://watin.sourceforge.net/">WatiN</a> to name two.</p>
<p><strong>Selenium &amp; WebDriver<br />
</strong></p>
<p>Selenium has had its challenges also. Whilst it has traditionally been flexible in language choice, it has technical limitations because of its JavaScript architecture. It also hasn&#8217;t offered a way to control a headless browser. Late last year WebDriver was <a href="http://google-opensource.blogspot.com/2009/05/introducing-webdriver.html">announced</a>. WebDriver is a common browser automation tool that uses what ever is the most appropriate mechanism to control a browser, but with a common API. WebDriver supports not only real browsers (IE, Chrome &amp; Firefox) but also headless ones (using <a href="http://htmlunit.sourceforge.net/">HtmlUnit</a>). Watir uses have had access to a headless browser by using <a href="http://celerity.rubyforge.org/">Celerity</a>. WebDriver was quickly merged with Selenium, to become <a href="http://docs.google.com/present/view?id=dgpzbjs_33cxsxd9dd">Selenium 2.0</a>.</p>
<p><strong>Watir &amp; WebDriver<br />
</strong></p>
<p>So, what does WebDriver mean to Watir? Some people in the Watir project see an opportunity to leverage the effort put into WebDriver, but to continue to offer the clean neat API that Watir does. Jari Bakken has released an early version of <a href="http://github.com/jarib/watir-webdriver">Watir-WebDriver</a>, essentially Watir&#8217;s ruby API utilising the WebDriver engine. By using WebDriver, Watir can support any browser that WebDriver does, including a headless HtmlUnit browser, without using Celerity.</p>
<p><a href="http://yuml.me/diagram/scruffy/usecase/%5BTester%5D-(Watir%20API),%20(Watir%20API)%3C(FireWatir),%20(Watir%20API)%3C(Watir),%20(Watir%20API)%3C(SafariWatir),%20(Watir%20API)%3C(Webdriver),%20(Watir%20API)%3C(Celerity),%20(Celerity)-(note:%20Celerity%20requires%20JRuby),%20(Celerity)-(headless),%20(Webdriver)-(Firefox),%20(Webdriver)-(Chrome),%20(Webdriver)-(IE),%20(Webdriver)-(headless),%20(FireWatir)-(Firefox),%20(Watir)-(IE),%20(SafariWatir)-(Safari)."><img src="http://yuml.me/diagram/scruffy/usecase/[Tester]-(Watir API), (Watir API)&lt;(FireWatir), (Watir API)&lt;(Watir), (Watir API)&lt;(SafariWatir), (Watir API)&lt;(Webdriver), (Watir API)&lt;(Celerity), (Celerity)-(note: Celerity requires JRuby), (Celerity)-(headless), (Webdriver)-(Firefox), (Webdriver)-(Chrome), (Webdriver)-(IE), (Webdriver)-(headless), (FireWatir)-(Firefox), (Watir)-(IE), (SafariWatir)-(Safari)." alt="Watir WebDriver Diagram" width="450" /></a></p>
<p><strong>What does this mean for the future of Watir?</strong></p>
<p>If you&#8217;re a Watir user, it doesn&#8217;t really make that much difference. If you think of automated web testing as a car, Watir is the steering wheel and dashboard, which interact with the engine. Allowing Watir users to use WebDriver is like providing an additional engine choice, but keeping the steering wheel and dash the same.</p>
<p>Ultimately, I think that <strong>Watir will remain a very popular automated web testing tool</strong>, one that has been designed by testers for testers. I can see the usage of WatiN and Watij reducing as more developers move to Selenium 2.0/WebDriver which will offer the same functionality as Watir using a different API and multiple programming languages. If WebDriver can focus on the detail of controlling browsers, ultimately Watir will be a better tool as more effort can be spent on improving the Watir API, upgrading the steering wheel and dash, so to speak.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/watirmelon.wordpress.com/386/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/watirmelon.wordpress.com/386/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/watirmelon.wordpress.com/386/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/watirmelon.wordpress.com/386/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/watirmelon.wordpress.com/386/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/watirmelon.wordpress.com/386/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/watirmelon.wordpress.com/386/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/watirmelon.wordpress.com/386/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/watirmelon.wordpress.com/386/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/watirmelon.wordpress.com/386/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/watirmelon.wordpress.com/386/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/watirmelon.wordpress.com/386/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/watirmelon.wordpress.com/386/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/watirmelon.wordpress.com/386/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=386&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://watirmelon.com/2010/04/10/watir-selenium-webdriver/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/344eed26ff913de38b45620d18eed695?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">eclectic</media:title>
		</media:content>

		<media:content url="http://yuml.me/diagram/scruffy/usecase/[Tester]-(Watir API), (Watir API)&#60;(FireWatir), (Watir API)&#60;(Watir), (Watir API)&#60;(SafariWatir), (Watir API)&#60;(Webdriver), (Watir API)&#60;(Celerity), (Celerity)-(note: Celerity requires JRuby), (Celerity)-(headless), (Webdriver)-(Firefox), (Webdriver)-(Chrome), (Webdriver)-(IE), (Webdriver)-(headless), (FireWatir)-(Firefox), (Watir)-(IE), (SafariWatir)-(Safari)." medium="image">
			<media:title type="html">Watir WebDriver Diagram</media:title>
		</media:content>
	</item>
		<item>
		<title>HP acquires the Watir project, announces Wativ</title>
		<link>http://watirmelon.com/2010/04/01/hp-acquires-the-watir-project-announces-wativ/</link>
		<comments>http://watirmelon.com/2010/04/01/hp-acquires-the-watir-project-announces-wativ/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 22:41:34 +0000</pubDate>
		<dc:creator>Alister Scott</dc:creator>
				<category><![CDATA[Automated Testing]]></category>
		<category><![CDATA[Watir]]></category>
		<category><![CDATA[HP]]></category>
		<category><![CDATA[Wativ]]></category>
		<category><![CDATA[QTP]]></category>
		<category><![CDATA[TSL]]></category>
		<category><![CDATA[WinRunner]]></category>

		<guid isPermaLink="false">http://watirmelon.com/?p=375</guid>
		<description><![CDATA[In a surprise move today, HP, the vendor of numerous Mercury testing tools, has acquired the open source Watir testing product. Over the last few years, HP has been continually threatened by the Watir open source project, as it provides flexible and efficient automated web testing for zero cost. The only viable commercial option for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=375&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In a surprise move today, <strong><a href="http://en.wikipedia.org/wiki/HP">HP</a></strong>, the vendor of numerous Mercury testing tools, has acquired the open source <strong>Watir</strong> testing product.</p>
<p>Over the last few years, HP has been continually threatened by the Watir open source project, as it provides flexible and efficient automated web testing for zero cost. The only viable commercial option for HP was to acquire the product. The details of how it was acquired are still unclear, but many long term developers have had all rights to code removed overnight in a move that has shocked the once close knit Watir community.</p>
<p>To align the Watir product with the existing HP Mercury toolset, HP have immediately announced <strong>Wativ</strong>: Web Application Testing in Vendorscript. Whilst it was initially thought the <em>v</em> in Wativ would stand for VBScript, HP have again shocked its user base by forcing Wativ users to use <strong>TSL</strong> (Test Scripting Language), the C like proprietary vendorscript originally designed to be used in the legacy WinRunner product. It is thought that the <strong>Watit</strong> name (Web Application testing in TSL) could be misconstrued by its users. HP have announced its reason for using TSL, being they have opened the product up to the large existing WinRunner user base who are too ingrained in TSL to use anything else.</p>
<p>To align <strong>Wativ</strong> with other HP Mercury products, numerous additional add-ons will be offered, all individually priced, depending on what you wish to test.</p>
<p>Immediately available are the Wativ Web 2.0 web testing add-on, Wativ Flex testing add-on, Wativ Flash testing add-on, Wativ Firefox add-on and the Wativ web services add-on.</p>
<p>Other details are unclear at this stage, whilst the watir.com site has been updated to reflect the change, other details are still in progress so please stay tuned.</p>
<p><strong>2 April 2010</strong>: In case you didn&#8217;t realize, this is all a <a href="http://en.wikipedia.org/wiki/April_fools">joke</a>.</p>
<p style="text-align:center;"><a href="http://watirmelon.files.wordpress.com/2010/04/watir-com1.jpg"><img class="size-full wp-image-377 aligncenter" title="HP watir.com" src="http://watirmelon.files.wordpress.com/2010/04/watir-com1.jpg?w=450&#038;h=248" alt="" width="450" height="248" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/watirmelon.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/watirmelon.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/watirmelon.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/watirmelon.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/watirmelon.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/watirmelon.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/watirmelon.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/watirmelon.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/watirmelon.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/watirmelon.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/watirmelon.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/watirmelon.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/watirmelon.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/watirmelon.wordpress.com/375/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=375&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://watirmelon.com/2010/04/01/hp-acquires-the-watir-project-announces-wativ/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/344eed26ff913de38b45620d18eed695?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">eclectic</media:title>
		</media:content>

		<media:content url="http://watirmelon.files.wordpress.com/2010/04/watir-com1.jpg" medium="image">
			<media:title type="html">HP watir.com</media:title>
		</media:content>
	</item>
		<item>
		<title>Happy 5th Birthday to two great open source projects</title>
		<link>http://watirmelon.com/2009/11/20/happy-5th-birthday/</link>
		<comments>http://watirmelon.com/2009/11/20/happy-5th-birthday/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 10:15:59 +0000</pubDate>
		<dc:creator>Alister Scott</dc:creator>
				<category><![CDATA[FireWatir]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Watir]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Happy Birthday]]></category>

		<guid isPermaLink="false">http://watirmelon.com/?p=342</guid>
		<description><![CDATA[November 2009 marks the fifth birthday of two great open source projects, both of which I couldn&#8217;t live without. Firefox was first released on November 9th, 2004. I remember first installing it in 2004, loving it and I still use it to this day. I&#8217;m actually using it right now to write this post. Watir [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=342&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>November 2009 marks the fifth birthday of two great open source projects, both of which I couldn&#8217;t live without.</p>
<ol>
<li><a href="http://en.wikipedia.org/wiki/Firefox">Firefox</a> was first released on November 9th, 2004. I remember first installing it in 2004, loving it and I still use it to this day. I&#8217;m actually using it right now to write this post.</li>
<li><a href="http://watir.com/">Watir</a> made its first public appearance on November 15th, 2004, in a tutorial by <a href="http://www.pettichord.com/">Bret</a> and <a href="http://members.shaw.ca/paul_rogers/index.html">Paul</a> at <a href="http://www.sqe.com/Events/Archive/sw2004/tutorials.html">StarWest 2004</a>.</li>
</ol>
<p>The two projects became connected in late 2006 when FireWatir was developed by <a href="http://angrez.blogspot.com/2006/12/firewatir-how-to.html">Angrez Singh</a>. Since then Watir has incorporated native Firefox support.</p>
<p>So here&#8217;s cheers to these two great open source projects! Hope there are many more great birthdays to come!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/watirmelon.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/watirmelon.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/watirmelon.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/watirmelon.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/watirmelon.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/watirmelon.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/watirmelon.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/watirmelon.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/watirmelon.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/watirmelon.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/watirmelon.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/watirmelon.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/watirmelon.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/watirmelon.wordpress.com/342/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=342&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://watirmelon.com/2009/11/20/happy-5th-birthday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/344eed26ff913de38b45620d18eed695?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">eclectic</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamically calling ruby methods in modules</title>
		<link>http://watirmelon.com/2009/09/17/dynamically-calling-ruby-methods-in-modules/</link>
		<comments>http://watirmelon.com/2009/09/17/dynamically-calling-ruby-methods-in-modules/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 12:50:21 +0000</pubDate>
		<dc:creator>Alister Scott</dc:creator>
				<category><![CDATA[Watir]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[dynamically calling]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[methods]]></category>
		<category><![CDATA[modules]]></category>

		<guid isPermaLink="false">http://watirmelon.com/?p=324</guid>
		<description><![CDATA[When I am creating Watir tests, I write ruby methods to define user tasks, for example, adding a book to a cart becomes def add_book. I then group these ruby methods into ruby modules divided logically by the area of the application I am writing tests for. For example, I would have a &#8216;Customer&#8217; module [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=324&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When I am creating Watir tests, I write ruby methods to define user tasks, for example, adding a book to a cart becomes <code>def add_book</code>. I then group these ruby methods into ruby modules divided logically by the area of the application I am writing tests for. For example, I would have a &#8216;Customer&#8217; module and an &#8216;Admin&#8217; module for the Depot app. The benefit of using modules is you can avoid namespace conflicts as essentially each method is defined by its module&#8217;s prefix. This means that you can happily have <code>def Customer.log_on</code> and <code>def Admin.log_on</code> without any conflict or confusion.</p>
<p>As I have mentioned before, I like defining tests outside my code. These tests ultimately need to execute an associatted ruby method (stored in a module) by passing some data in (and getting an outcome and some output back). One way of calling these tests defined external to our code is to have a massive case statement that determines what calls what. This isn&#8217;t ideal as it is a maintenance burden, and really it isn&#8217;t needed.</p>
<p>In ruby it&#8217;s straightforward to dynamically load ruby modules, and then dynamically call individual methods.</p>
<pre class="brush: ruby;">
require 'temp'

module_name = &quot;Temp&quot;
method_name = &quot;hello_world&quot;

required_module = Kernel.const_get(module_name)
required_method = required_module.method(method_name)
required_method.call('Alister')
</pre>
<p>This is all well and good if Temp.helloworld() exists, but if it doesn&#8217;t, our code throws exceptions:</p>
<p><code><br />
`const_get': uninitialized constant Kernel::Temp (NameError)<br />
</code><br />
or<br />
<code><br />
`method': undefined method `hello_world' for class `Module' (NameError)<br />
</code></p>
<p>One way to avoid these exceptions is to wrap the code with a rescue clause, but I realised there are some easy ways to check if both modules and methods exist before loading them.</p>
<pre class="brush: ruby;">
require 'temp'

module_name = &quot;Temp&quot;
method_name = &quot;hello_world&quot;

if Object.const_defined?(module_name)
  required_module = Kernel.const_get(module_name)
  if required_module.respond_to?(method_name) then
    required_method = required_module.method(method_name)
    required_method.call('Alister')
  else
    puts &quot;Invalid method '#{method_name}' for module '#{module_name}'&quot;
  end
else
 puts &quot;Invalid module '#{module_name}'&quot;
end
</pre>
<p>This ensures that the code continues to execute if the module or method name is specified incorrectly, which is sometimes the case if its specified in a spreadsheet, and especially if someone else has designed the spreadsheet.</p>
<p>Once we are happy about dynamically finding methods in modules, the next step is to make sure that each method is called with the correct number of parameters. This property of a method is called the <strong>arity</strong>.</p>
<p>The great thing about ruby and arity is that you simply determine the number of parameters and then pass in a correct sized array, using a *, and the receiving method will automatically unpack the array into the parameters specified.</p>
<pre class="brush: ruby;">
puts required_method.arity()
required_method.call(*parameters)
</pre>
<p>The flexibility that ruby offers is amazing. I have tried to accomplish this same concept in VBScript but I couldn&#8217;t work out how. That&#8217;s why I am glad Watir uses ruby, it ultimately means my automated test framework is more efficient and maintainable.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/watirmelon.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/watirmelon.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/watirmelon.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/watirmelon.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/watirmelon.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/watirmelon.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/watirmelon.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/watirmelon.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/watirmelon.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/watirmelon.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/watirmelon.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/watirmelon.wordpress.com/324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/watirmelon.wordpress.com/324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/watirmelon.wordpress.com/324/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=324&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://watirmelon.com/2009/09/17/dynamically-calling-ruby-methods-in-modules/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/344eed26ff913de38b45620d18eed695?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">eclectic</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a Watir framework using Test::Unit &amp; Roo</title>
		<link>http://watirmelon.com/2009/09/08/creating-a-watir-framework-using-test-unit-and-roo/</link>
		<comments>http://watirmelon.com/2009/09/08/creating-a-watir-framework-using-test-unit-and-roo/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 11:08:29 +0000</pubDate>
		<dc:creator>Alister Scott</dc:creator>
				<category><![CDATA[Automated Testing]]></category>
		<category><![CDATA[Business Driven]]></category>
		<category><![CDATA[FireWatir]]></category>
		<category><![CDATA[Roo]]></category>
		<category><![CDATA[Software Testing]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Watir]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[test unit]]></category>

		<guid isPermaLink="false">http://watirmelon.com/?p=316</guid>
		<description><![CDATA[One common challenge I see over and over again is people figuring out how to design a logical and maintainable automated testing framework. I have designed quite a few frameworks for various projects, but one thing that has consistently been a win for me is purposely separating test case and test execution design. It&#8217;s therefore [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=316&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One common challenge I see over and over again is people figuring out how to design a logical and maintainable automated testing framework. I have designed quite a few frameworks for various projects, but one thing that has consistently been a win for me is purposely separating  test <strong>case</strong> and test <strong>execution</strong> design.</p>
<p>It&#8217;s therefore logical that the design of my Watir framework deliberately separates test case design and test execution design so that:</p>
<ul>
<li>test case design is done visually in spreadsheets; and</li>
<li>test execution design is done in ruby methods, because code is the most efficient and maintainable way.</li>
</ul>
<p>Since I last published details about my framework on this blog, I have started doing assertions using the <a href="http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html">Test::Unit</a> ruby library. The reasons I chose Test::Unit are:</p>
<ul>
<li>it is easy to &#8216;mix-in&#8217; Test::Unit assertions into modules of ruby code using <code>include Test::Unit::Assertions</code>;</li>
<li>it is included with ruby;</li>
<li>ruby scripts with <code>Test::Unit::TestCase</code> are instantly executable, in my case, from SciTE;</li>
<li>its assertions are easy to understand and use.</li>
</ul>
<p>I have also made some other improvements to my framework code, including:</p>
<ul>
<li>the ability to specify browser types, and spreadsheet sources, as command line arguments (with defaults);</li>
<li>logging test output to a file;</li>
<li>no longer attaching to an open browser, the same browser instance is used completely for all tests (and elegantly closed at the end).</li>
</ul>
<p>The main design has been kept the same, in that a spreadsheet (either excel, openoffice or Google Docs) contains tests grouped by functional area, which call a method in a particular module.</p>
<p>The great thing about my framework is that adding a new test is a matter of designing the test case, and then writing the ruby method: as <em>the methods are called dynamically from the spreadsheet</em>,  no extra glue is needed!</p>
<p>Enough talk, here&#8217;s the code. The Google spreadsheet is <a href="http://spreadsheets.google.com/ccc?key=0AtL3mPY2rEqmdEY3XzRqUlZKSmM5Z3EtM21UdFdqb1E&amp;hl=en">here</a>. You can find a .zip file of <em>all</em> the required files to run it <a href="http://docs.google.com/leaf?id=0B9L3mPY2rEqmM2ZhYTI0ZmItMDAxNC00YmRkLTk4MmMtNjUwZmQ1MzU5NmI1&amp;hl=en">here</a>. It runs on the <em>depot</em> app, which you get <a href="http://docs.google.com/leaf?id=0B9L3mPY2rEqmMTg5YTRlYTEtNzJhYi00NDI3LTk3NTEtMTk3NzI2MGEzZWY5&amp;hl=en">here</a>. You will need two gems: Watir (oh duh), and <a href="http://roo.rubyforge.org/">Roo</a>.</p>
<p><strong>Test Driver tc_main.rb</strong></p>
<pre class="brush: ruby;">

$:.unshift File.join(File.dirname(__FILE__), &quot;.&quot;, &quot;lib&quot;)
require 'watir'
require 'roo'
require 'test/unit'
require 'customer'
require 'admin'
$stdout = File.new('log.txt',File::WRONLY|File::APPEND|File::CREAT)
$stderr = File.new('log.txt',File::WRONLY|File::APPEND|File::CREAT)

class TC_WatirMelon &lt; Test::Unit::TestCase
  @@colmap = {:module_name=&gt;0, :method_name=&gt;1, :comments=&gt;2, :exp_outcome=&gt;3, :exp_error=&gt;4, :first_param=&gt;5}
  @@ss_format = ARGV[0]
  @@specified_browser = ARGV[1]

  def setup
    puts &quot;[Starting at #{Time.now}]\n&quot;
    case @@ss_format
      when &quot;excel&quot;
        @ss = Excel.new(&quot;watirmelon.xls&quot;)
      when &quot;wiki&quot;
        @ss = Excel.new(&quot;http://localhost:8080/download/attachments/2097153/watirmelon.xls&quot;)
      when &quot;gdocs&quot;
        @ss = Google.new(&quot;0AtL3mPY2rEqmdEY3XzRqUlZKSmM5Z3EtM21UdFdqb1E&quot;)
      else
        @ss = Openoffice.new(&quot;watirmelon.ods&quot;)
      end
    @ss.default_sheet = @ss.sheets.first
    case @@specified_browser
      when &quot;firefox&quot;
        Watir::Browser.default = 'firefox'
        @browser = Watir::Browser.new
      else
        Watir::Browser.default = 'ie'
        @browser = Watir::Browser.new
        @browser.speed = :zippy
        @browser.visible = true
      end
  end

  def test_run_sheet()
    @ss.first_row.upto(@ss.last_row) do |row|
      #Read row into array
      line = Array.new
      @ss.first_column.upto(@ss.last_column) do |column|
        line &lt;&lt; @ss.cell(row, column).to_s.strip
      end

      module_name = line[@@colmap[:module_name]]
      if module_name != &quot;Function&quot; then #if not a header
        method_name = line[@@colmap[:method_name]].downcase.gsub(' ','_') #automatically determine ruby method name based upon data sheet
        exp_outcome = line[@@colmap[:exp_outcome]]
        exp_error = line[@@colmap[:exp_error]]
        first_param = @@colmap[:first_param]
        required_module = Kernel.const_get(module_name)
        required_method = required_module.method(method_name)
        arity = required_method.arity() # this is how many arguments the method requires, it is negative if a 'catch all' is supplied.
        arity = ((arity * -1) - 1) if arity &lt; 0 # arity is negative when there is a 'catch all'
        arity = arity-1 # Ignore the first browser parameter
        unless arity == 0
          parameters = line[first_param..first_param+(arity-1)]
        else
          parameters = []
        end
        begin
          act_outcome, act_output = required_method.call(@browser, *parameters)
        rescue Test::Unit::AssertionFailedError =&gt; e
          self.send(:add_failure, e.message, e.backtrace)
          act_outcome = false
          act_output = e.message
        end
        if (exp_outcome == 'Success') and act_outcome then
          assert(true, &quot;Expected outcome and actual outcome are the same&quot;)
          result = 'PASS'
        elsif (exp_outcome == 'Error') and (not act_outcome) and (exp_error.strip! == act_output.strip!)
          assert(true, &quot;Expected outcome and actual outcome are the same, and error messages match&quot;)
          result = 'PASS'
        else
          result = 'FAIL'
          begin
            assert(false,&quot;Row: #{row}: Expected outcome and actual outcome for #{method_name} for #{module_name} do not match, or error messages do not match.&quot;)
          rescue Test::Unit::AssertionFailedError =&gt; e
            self.send(:add_failure, e.message, e.backtrace)
          end
        end
        puts &quot;###########################################&quot;
        puts &quot;[Running: #{module_name}.#{method_name}]&quot;
        puts &quot;[Expected Outcome: #{exp_outcome}]&quot;
        puts &quot;[Expected Error: #{exp_error}]&quot;
        puts &quot;[Actual Outcome: Success]&quot; if act_outcome
        puts &quot;[Actual Outcome: Error]&quot; if not act_outcome
        puts &quot;[Actual Output: #{act_output}]&quot;
        puts &quot;[RESULT: #{result}]&quot;
        puts &quot;###########################################&quot;
        end
      end
  end

  def teardown
    @browser.close
    puts &quot;[Finishing at #{Time.now}]\n\n&quot;
  end

end
</pre>
<p><strong>Customer Module customer.rb</strong></p>
<pre class="brush: ruby;">
require 'test/unit'
include Test::Unit::Assertions

module Customer

  TITLE = 'Pragprog Books Online Store'
  URL = 'http://localhost:3000/store/'

  # Description:: Adds a book named 'book_title' to cart
  def Customer.add_book(browser, book_title)
    browser.goto(URL)
    # Check if title is already in cart - so we can check it was added correctly
    browser.link(:text,'Show my cart').click
    prev_cart_count = 0
    prev_cart_total = 0.00
    if not browser.div(:text,'Your cart is currently empty').exist? then
     # We have a non-empty cart
      for row in browser.table(:index,1)
        if row[2].text == book_title then
          prev_cart_count = row[1].text.to_i
          break
        end
      end
      prev_cart_total = browser.cell(:id, 'totalcell').text[1..-1].to_f #remove $ sign
      browser.link(:text, 'Continue shopping').click
    end

    found = false
    book_price = 0.00
    1.upto(browser.divs.length) do |index|
      if (browser.div(:index,index).attribute_value('className') == 'catalogentry') and (browser.div(:index,index).h3(:text,book_title).exists?) then
        book_price = browser.div(:index,index).span(:class, 'catalogprice').text[1..-1].to_f #remove $ sign
        browser.div(:index,index).link(:class,'addtocart').click
        found = true
        break
      end
    end
    if not found then
      return false,'Could not locate title in store'
    end

    new_cart_count = 0
    for row in browser.table(:index,1)
      if row[2].text == book_title then
        new_cart_count = row[1].text.to_i
        break
      end
    end
    new_cart_total = browser.cell(:id, 'totalcell').text[1..-1].to_f # remove $ sign
    assert_equal(new_cart_count,(prev_cart_count+1), &quot;Ensure that new quantity is now one greater than previously&quot;)
    assert_equal(new_cart_total,(prev_cart_total + book_price), &quot;Ensure that new cart total is old cart total plus book price&quot;)
    browser.link(:text, 'Continue shopping').click
    return true,new_cart_total
  end

  def Customer.check_out(browser, customerName, customerEmail, customerAddress, customerPaymentMethod)
    browser.goto(URL)
    browser.link(:text,'Show my cart').click
    if browser.div(:text,'Your cart is currently empty').exist? then
      return false,'Your cart is currently empty'
    end
    browser.link(:text,&quot;Checkout&quot;).click
    browser.text_field(:id, 'order_name').set(customerName)
    browser.text_field(:id, 'order_email').set(customerEmail)
    browser.text_field(:id, 'order_address').set(customerAddress)
    begin
      browser.select_list(:id, 'order_pay_type').select(customerPaymentMethod)
    rescue Watir::Exception::NoValueFoundException
      flunk('Could not locate customer payment method in drop down list: '+customerPaymentMethod)
    end
    browser.button(:name, 'commit').click
    if browser.div(:id,'errorExplanation').exist? then
      error = ''
      1.upto(browser.div(:id,'errorExplanation').lis.length) do |index|
        error &lt;&lt; (browser.div(:id,'errorExplanation').li(:index,index).text + &quot;,&quot;)
      end
      browser.link(:text,'Continue shopping').click
      return false, error
    end
    assert_equal(browser.div(:id,'notice').text, 'Thank you for your order.',&quot;Thank you for your order should appear.&quot;)
    return true,''
  end

  def Customer.empty_cart(browser)
    browser.goto(URL)
    browser.link(:text,&quot;Show my cart&quot;).click
    if browser.div(:text,&quot;Your cart is currently empty&quot;).exist? then
      assert('Cart was never empty')
    else
      browser.link(:text,'Empty cart').click
      assert_equal(browser.div(:id, 'notice').text,'Your cart is now empty')
    end
    return true,''
  end

  def Customer.check_cart_total(browser, exp_total)
    browser.goto(URL)
    browser.link(:text,'Show my cart').click
    if browser.div(:text,'Your cart is currently empty').exist? then
      return false,'Your cart is currently empty'
    end
    act_total = browser.cell(:id, 'totalcell').text[1..-1].to_f
    assert_equal(act_total,exp_total.to_f,&quot;Check that cart total is as expected.&quot;)
    return true,act_total
  end
end
</pre>
<p><strong>Admin Module admin.rb</strong></p>
<pre class="brush: ruby;">

require 'test/unit'
include Test::Unit::Assertions

module Admin
  TITLE = 'ADMINISTER Pragprog Books Online Store'
  URL = 'http://localhost:3000/admin/'

  def Admin.log_on(browser, username, password)
    browser.goto(URL)
    if browser.link(:text,'Log out').exist? then #if already logged in
      browser.link(:text,'Log out').click
    end
    browser.text_field(:id, 'user_name').set username
    browser.text_field(:id, 'user_password').set password
    browser.button(:value, ' LOGIN ').click
    if browser.div(:id, 'notice').exist? then
      return false,browser.div(:id, 'notice').text
    else
      return true,''
    end
  end

  def Admin.ship_items(browser, name)
    browser.goto(URL)
    browser.link(:text, 'Shipping').click
    num_orders = 0
    index = 0
    browser.form(:action,'/admin/ship').divs.each do |div|
      if div.class_name == &quot;olname&quot;
        index+=1
        if div.text == name then
          browser.form(:action,'/admin/ship').checkbox(:index, index).set
          num_orders+=1
        end
      end
    end

    browser.button(:value, ' SHIP CHECKED ITEMS ').click

    if num_orders == 1 then
      assert_equal(browser.div(:id,&quot;notice&quot;).text, &quot;One order marked as shipped&quot;,&quot;Correct notice&quot;)
    elsif num_orders &gt; 1 then
      assert_equal(browser.div(:id,&quot;notice&quot;).text, &quot;#{num_orders} orders marked as shipped&quot;,&quot;Correct notice&quot;)
    end
    return true, num_orders.to_s
  end

end
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/watirmelon.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/watirmelon.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/watirmelon.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/watirmelon.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/watirmelon.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/watirmelon.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/watirmelon.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/watirmelon.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/watirmelon.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/watirmelon.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/watirmelon.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/watirmelon.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/watirmelon.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/watirmelon.wordpress.com/316/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=316&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://watirmelon.com/2009/09/08/creating-a-watir-framework-using-test-unit-and-roo/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/344eed26ff913de38b45620d18eed695?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">eclectic</media:title>
		</media:content>
	</item>
		<item>
		<title>Celerity: first impressions</title>
		<link>http://watirmelon.com/2009/08/31/celerity-first-impressions/</link>
		<comments>http://watirmelon.com/2009/08/31/celerity-first-impressions/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 11:17:09 +0000</pubDate>
		<dc:creator>Alister Scott</dc:creator>
				<category><![CDATA[Automated Testing]]></category>
		<category><![CDATA[Roo]]></category>
		<category><![CDATA[Software Testing]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Watir]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[celerity]]></category>
		<category><![CDATA[headless]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[load testing]]></category>
		<category><![CDATA[performance testing]]></category>

		<guid isPermaLink="false">http://watirmelon.com/?p=310</guid>
		<description><![CDATA[Last week at the Test Automation Workshop (TAW) here in Australia, the topic of being able to run automated tests &#8216;headless&#8217; came up, and I mentioned the Celerity project: a headless Watir port. I decided to have a play with Celerity tonight to see how easy it is to get up and running, and also [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=310&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Last week at the Test Automation Workshop (<a href="http://watirmelon.com/2009/08/28/australian-test-automation-workshop-slides/">TAW</a>) here in Australia, the topic of being able to run automated tests &#8216;headless&#8217; came up, and I mentioned the <a href="http://celerity.rubyforge.org/">Celerity</a> project: a headless Watir port. I decided to have a play with Celerity tonight to see how easy it is to get up and running, and also look at it as a way to <em>quickly</em> run Watir scripts.</p>
<p><strong>Installation</strong></p>
<p>The installation was fairly straightforward. You need a Java 6 JDK, as well as the JRuby binaries. You&#8217;ll need to update two environment variables, namely add JRuby to your path, and update your JAVA_HOME variable. Installing Celerity involves a JRuby gem: <code>"jruby -S gem install celerity"</code>. You can also install it from github, but I don&#8217;t know the difference between the two.</p>
<p><strong>Availability of Gems</strong></p>
<p>Ruby gems are supported in JRuby, but only if they don&#8217;t use C libraries. This means that Watir won&#8217;t work, nor will <a href="http://roo.rubyforge.org/">Roo</a>. I use Roo to define test cases in spreadsheets, so it means I can&#8217;t do a comparison of execution times at the moment, at least until I get these test cases out of spreadsheets.</p>
<p><strong>Using Celerity as a simple load testing tool instead<br />
</strong></p>
<p>At TAW, <a href="http://kelvinross.blogspot.com/">Kelvin Ross</a> thought Celerity sounded promising as a load testing tool, considering it was headless and lightweight. I thought I would give a simple google search script a try, running in both Celerity, and Watir, with 30 concurrent users.</p>
<p><strong>Running under Watir</strong></p>
<p>CPU peaked at 100% for the entire run, and each page varied considerable but took on average 10 seconds to load.</p>
<p><strong>Running under Celerity</strong></p>
<p>CPU use was normal, and each page took just over 1 second to load (minimal variance).</p>
<p><strong>Conclusion</strong></p>
<p>Celerity seems a promising way to execute basic load tests using a headless browser. The benefit of Celerity is support for javascript execution in the browser, the downside at the moment is lack of support for some ruby gems. If you could run Watir under JRuby, I could have used a single script.</p>
<p><strong>Scripts Used</strong><br />
<strong>Celerity Script</strong></p>
<pre class="brush: ruby;">
require 'thread'
require &quot;rubygems&quot;
require &quot;celerity&quot;

def test_google
  browser = Celerity::Browser.new
  browser.goto('http://www.google.com')
  browser.text_field(:name, 'q').value = 'Celerity'
  start_time = Time.now
  browser.button(:name, 'btnG').click
  end_time = Time.now
  puts end_time - start_time
  browser.close
end

threads = []
30.times do
  threads &lt;&lt; Thread.new {test_google}
end
threads.each {|x| x.join}
</pre>
<p><strong>Watir Script</strong></p>
<pre class="brush: ruby;">
require 'thread'
require 'watir'
require 'watir/ie'

def test_google
  browser = Watir::IE.start('http://www.google.com')
  browser.text_field(:name, 'q').value = 'Celerity'
  start_time = Time.now
  browser.button(:name, 'btnG').click
  end_time = Time.now
  puts end_time - start_time
  browser.close
end

threads = []
30.times do
  threads &lt;&lt; Thread.new {test_google}
end
threads.each {|x| x.join}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/watirmelon.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/watirmelon.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/watirmelon.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/watirmelon.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/watirmelon.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/watirmelon.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/watirmelon.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/watirmelon.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/watirmelon.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/watirmelon.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/watirmelon.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/watirmelon.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/watirmelon.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/watirmelon.wordpress.com/310/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=310&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://watirmelon.com/2009/08/31/celerity-first-impressions/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/344eed26ff913de38b45620d18eed695?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">eclectic</media:title>
		</media:content>
	</item>
		<item>
		<title>What IDE do you use for Watir?</title>
		<link>http://watirmelon.com/2009/08/20/what-ide-do-you-use-for-watir/</link>
		<comments>http://watirmelon.com/2009/08/20/what-ide-do-you-use-for-watir/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 07:46:33 +0000</pubDate>
		<dc:creator>Alister Scott</dc:creator>
				<category><![CDATA[Watir]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://watirmelon.com/?p=297</guid>
		<description><![CDATA[Curiosity got the better of me yesterday when writing about using SciTE, so I did a quick twitter survey to see what other people actually use. I got 13 responses within hours, and they show that there really is no common IDE for Watir. The complete list of 13 responses: Aptana: 1 Arachno: 1 eclipse-galileo: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=297&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Curiosity got the better of me yesterday when writing about <a href="http://watirmelon.com/2009/08/19/restoring-check-syntax-for-ruby-files-in-scite/">using SciTE</a>, so I did a quick <a href="http://twitter.com/alisterscott/status/3401245550">twitter survey</a> to see what other people actually use. I got 13 responses within hours, and they show that there really is no common IDE for Watir.</p>
<p><a href="http://watirmelon.files.wordpress.com/2009/08/watir-ides.png"><img class="aligncenter size-full wp-image-298" title="watir ides" src="http://watirmelon.files.wordpress.com/2009/08/watir-ides.png?w=450&#038;h=363" alt="watir ides" width="450" height="363" /></a>The complete list of 13 responses:</p>
<ul>
<li>Aptana:	1</li>
<li>Arachno:	1</li>
<li>eclipse-galileo:	1</li>
<li>NetBeans:	1</li>
<li>notepad++:	2</li>
<li>SCiTE:	4</li>
<li>TextMate:	1</li>
<li>vim: 	2</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/watirmelon.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/watirmelon.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/watirmelon.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/watirmelon.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/watirmelon.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/watirmelon.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/watirmelon.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/watirmelon.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/watirmelon.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/watirmelon.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/watirmelon.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/watirmelon.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/watirmelon.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/watirmelon.wordpress.com/297/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=297&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://watirmelon.com/2009/08/20/what-ide-do-you-use-for-watir/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/344eed26ff913de38b45620d18eed695?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">eclectic</media:title>
		</media:content>

		<media:content url="http://watirmelon.files.wordpress.com/2009/08/watir-ides.png" medium="image">
			<media:title type="html">watir ides</media:title>
		</media:content>
	</item>
		<item>
		<title>Restoring &#8216;check syntax&#8217; for ruby files in SciTE</title>
		<link>http://watirmelon.com/2009/08/19/restoring-check-syntax-for-ruby-files-in-scite/</link>
		<comments>http://watirmelon.com/2009/08/19/restoring-check-syntax-for-ruby-files-in-scite/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 07:31:23 +0000</pubDate>
		<dc:creator>Alister Scott</dc:creator>
				<category><![CDATA[Watir]]></category>

		<guid isPermaLink="false">http://watirmelon.com/?p=291</guid>
		<description><![CDATA[I am somewhat embarrassed to admit that I still use SciTE to edit my ruby files for Watir, considering there are a lot more sophisticated IDEs out there that you can use (Netbeans is one). When I am using a new version of SciTE I notice it seems to get rid of the options to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=291&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am somewhat embarrassed to admit that I still use SciTE to edit my ruby files for Watir, considering there are a lot more sophisticated IDEs out there that you can use (<a href="http://www.netbeans.org/kb/60/ruby/getting-started.html">Netbeans</a> is one).</p>
<p>When I am using a new version of SciTE I notice it seems to get rid of the options to check ruby syntax (often triggered by Control-1). This can be quickly fixed in the ruby.properties file (under &#8216;Options&#8217;) by ensuring the following properties appear after &#8216;if PLAT_WIN&#8217;:</p>
<pre class="brush: bash;">
if PLAT_WIN
command.go.*.rb=ruby $(FileNameExt)
command.go.subsystem.*.rb=1
command.go.*.rbw=rubyw $(FileNameExt)
command.go.subsystem.*.rbw=1
command.help.*.rb=$(CurrentWord)!c:\ruby\doc\ProgrammingRuby.chm
command.help.subsystem.*.rb=4
command.help.*.rbw=$(CurrentWord)!c:\ruby\doc\ProgrammingRuby.chm
command.help.subsystem.*.rbw=4

command.name.1.*.rb=Check Syntax
command.1.*.rb=ruby -cw $(FileNameExt)
command.name.1.*.rbw=Check Syntax
command.1.*.rbw=rubyw -cw $(FileNameExt)

command.name.2.*.rb=Code Profiler
command.2.*.rb=ruby -r profile $(FileNameExt)
command.name.2.*.rbw=Code Profiler
command.2.*.rbw=rubyw -r profile $(FileNameExt)

command.name.3.*.rb=Run irb
command.3.*.rb=irb.bat
command.subsystem.3.*.rb=2
command.name.3.*.rbw=Run irb
command.3.*.rbw=irb.bat
command.subsystem.3.*.rbw=2

command.name.4.*.rb=Debug
command.4.*.rb=ruby -d -r debug $(FileNameExt)
command.subsystem.4.*.rb=2
command.name.4.*.rbw=Debug
command.4.*.rbw= ruby -d -r debug $(FileNameExt)
command.subsystem.4.*.rbw=2
</pre>
<p>Make sure the help command points to your ruby install. That way you also get nice F1 help on any highlighted ruby syntax.</p>
<p>Important update: 22 August 2009:</p>
<p>Make sure the line 3 above reads</p>
<pre class="brush: bash;">
command.go.subsystem.*.rb=1
</pre>
<p>not <strong>&#8216;=2&#8242;</strong>, otherwise <em>stdout</em> won&#8217;t be shown back in SciTE.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/watirmelon.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/watirmelon.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/watirmelon.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/watirmelon.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/watirmelon.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/watirmelon.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/watirmelon.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/watirmelon.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/watirmelon.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/watirmelon.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/watirmelon.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/watirmelon.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/watirmelon.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/watirmelon.wordpress.com/291/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=291&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://watirmelon.com/2009/08/19/restoring-check-syntax-for-ruby-files-in-scite/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/344eed26ff913de38b45620d18eed695?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">eclectic</media:title>
		</media:content>
	</item>
		<item>
		<title>Version control your automated tests, quickly, easily, today for free</title>
		<link>http://watirmelon.com/2009/08/06/version-control-your-automated-tests-quickly-easily-today-for-free/</link>
		<comments>http://watirmelon.com/2009/08/06/version-control-your-automated-tests-quickly-easily-today-for-free/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 10:55:57 +0000</pubDate>
		<dc:creator>Alister Scott</dc:creator>
				<category><![CDATA[Automated Testing]]></category>
		<category><![CDATA[Test Automation]]></category>
		<category><![CDATA[Watir]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[tortoiseSVN]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://watirmelon.com/?p=276</guid>
		<description><![CDATA[Why don&#8217;t testers version control their tests? I am still surprised at how many organizations don&#8217;t version control their automated test scripts. I put it down to the following reasons: Developers may use expensive version control tools, but sometimes there aren&#8217;t enough licenses for testers; People don&#8217;t realize there are free version control tools available; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=276&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Why don&#8217;t testers version control their tests?<br />
</strong></p>
<p>I am still surprised at how many organizations don&#8217;t version control their automated test scripts. I put it down to the following reasons:</p>
<ul>
<li>Developers may use expensive version control tools, but sometimes there aren&#8217;t enough licenses for testers;</li>
<li>People don&#8217;t realize there are free version control tools available;</li>
<li>Setting up version control might be considered too difficult for the test team;</li>
<li>Some people believe you need to own a version control server to version your test scripts; or</li>
<li>Any combination of the above.</li>
</ul>
<p>In reality:</p>
<ul>
<li>If the software developers&#8217; version control system is available for testers great, but if not, test scripts can be versioned separately;</li>
<li>There are many different free version control tools available. <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a>, which uses the Subversion (SVN) protocol, is very popular and very easy to use;</li>
<li>Setting up a new SVN repository using TortoiseSVN only takes a few minutes; and</li>
<li>You can set up a SVN repository on a shared network drive, so you don&#8217;t need a server (but a server is cool).</li>
</ul>
<p><strong>How to quickly set up a new SVN respository on a shared network drive (using Windows)</strong></p>
<p>If you haven&#8217;t version controlled your test scripts yet, here&#8217;s how to do so.</p>
<ol>
<li>Download and install TortoiseSVN from <a href="http://tortoisesvn.tigris.org/">http://tortoisesvn.tigris.org/</a> (it&#8217;s about 19MB, and requires a reboot: bummer <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  )</li>
<li>Find a location on a shared network drive where you can store your SVN repository. For example, it could be <code> Q:\SVN  Repositories </code>, create a new directory for your repository (eg. <code>Q:\SVN  Repositories\WatirMelon\</code> and right click within this new directory in Windows Explorer, and choose TortoiseSVN, and then &#8216;create repository here&#8217;. The path to your new directory will be your SVN repository path. <a href="http://watirmelon.files.wordpress.com/2009/08/create-svn-repository-here1.jpg"><img class="aligncenter size-full wp-image-281" title="Create SVN Repository Here" src="http://watirmelon.files.wordpress.com/2009/08/create-svn-repository-here1.jpg?w=360&#038;h=256" alt="Create SVN Repository Here" width="360" height="256" /></a></li>
<li>The repository should be created in a matter of seconds, and filled with some directories and files. These files/directories should<strong> never be touched, under any circumstances</strong>. <a href="http://watirmelon.files.wordpress.com/2009/08/repository-created-successfully.png"><img class="aligncenter size-full wp-image-279" title="Repository created successfully" src="http://watirmelon.files.wordpress.com/2009/08/repository-created-successfully.png?w=294&#038;h=104" alt="Repository created successfully" width="294" height="104" /></a></li>
<li>Now you need to create a local repository and check out the new repository (which will be blank initially). Create a directory on your local drive for your repository, for example <code>C:\watirmelon</code>, and right click within this directory and choose &#8216;SVN Checkout&#8217;. <a href="http://watirmelon.files.wordpress.com/2009/08/svn-checkout.png"><img class="aligncenter size-full wp-image-280" title="SVN Checkout" src="http://watirmelon.files.wordpress.com/2009/08/svn-checkout.png?w=360&#038;h=310" alt="SVN Checkout" width="360" height="310" /></a></li>
<li>You will need to specify the location of your repository you created in Step 2, but importantly <strong>you will need to add file:/// to the front, and change the backslashes into forward slashes. </strong><a href="http://watirmelon.files.wordpress.com/2009/08/checkout-dialog.jpg"><img class="aligncenter size-full wp-image-282" title="Checkout Dialog" src="http://watirmelon.files.wordpress.com/2009/08/checkout-dialog.jpg?w=360&#038;h=278" alt="Checkout Dialog" width="360" height="278" /></a></li>
<li>Once you click OK you have a repository (albeit blank) checked out. You would then simply add all your automated test scripts, then do an &#8216;SVN Add&#8217;, and &#8216;SVN commit&#8217;. If you want to use your automated tests on another machine, you simply checkout the repository following steps 4 &amp; 5 above.</li>
</ol>
<p><strong>Conclusion</strong></p>
<p>So there it is. Now there&#8217;s really no excuse not to version control your automated tests, considering it&#8217;s free, quick, easy and doesn&#8217;t require a server. So go and do it now (if you haven&#8217;t already).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/watirmelon.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/watirmelon.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/watirmelon.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/watirmelon.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/watirmelon.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/watirmelon.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/watirmelon.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/watirmelon.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/watirmelon.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/watirmelon.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/watirmelon.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/watirmelon.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/watirmelon.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/watirmelon.wordpress.com/276/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=watirmelon.com&amp;blog=2177915&amp;post=276&amp;subd=watirmelon&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://watirmelon.com/2009/08/06/version-control-your-automated-tests-quickly-easily-today-for-free/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/344eed26ff913de38b45620d18eed695?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">eclectic</media:title>
		</media:content>

		<media:content url="http://watirmelon.files.wordpress.com/2009/08/create-svn-repository-here1.jpg" medium="image">
			<media:title type="html">Create SVN Repository Here</media:title>
		</media:content>

		<media:content url="http://watirmelon.files.wordpress.com/2009/08/repository-created-successfully.png" medium="image">
			<media:title type="html">Repository created successfully</media:title>
		</media:content>

		<media:content url="http://watirmelon.files.wordpress.com/2009/08/svn-checkout.png" medium="image">
			<media:title type="html">SVN Checkout</media:title>
		</media:content>

		<media:content url="http://watirmelon.files.wordpress.com/2009/08/checkout-dialog.jpg" medium="image">
			<media:title type="html">Checkout Dialog</media:title>
		</media:content>
	</item>
	</channel>
</rss>