<?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>toniBlog &#187; functional tests</title>
	<atom:link href="http://www.the-arm.com/tag/functional-tests/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.the-arm.com</link>
	<description>A weblog about Methodologies for Development</description>
	<lastBuildDate>Tue, 22 Jun 2010 08:01:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>AOP, NUnit and Selenium: clever screenshots of failures</title>
		<link>http://www.the-arm.com/2010/02/aop-nunit-and-selenium-clever-screenshots-of-failures/</link>
		<comments>http://www.the-arm.com/2010/02/aop-nunit-and-selenium-clever-screenshots-of-failures/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 18:48:26 +0000</pubDate>
		<dc:creator>toni</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[aop]]></category>
		<category><![CDATA[c sharp]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[functional tests]]></category>
		<category><![CDATA[postsharp]]></category>
		<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://www.the-arm.com/?p=495</guid>
		<description><![CDATA[Last week I did struggle finding out why a test was failing only on our Cruise box, only in the Cruise build. I wanted to get a screenshot of each failing tests, and I think I found a clever solution: aop. We already use PostSharp on our code base for logging, transaction demarcation and hibernate [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I did struggle finding out why a test was failing only on our Cruise box, only in the Cruise build.</p>
<p>I wanted to get a screenshot of each failing tests, and I think I found a clever solution: aop.</p>
<p>We already use <a href="http://www.postsharp.org/">PostSharp</a> on our code base for logging, transaction demarcation and hibernate session support, so I wrote a simple annotation for our acceptance tests:</p>
<div class="geshi no csharp">
<ol>
<li class="li1">
<div class="de1"><span class="kw1">using</span> <span class="kw5">System</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">using</span> PostSharp.<span class="me1">Laos</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">namespace</span> Web.<span class="me1">UI</span>.<span class="me1">AcceptanceTests</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="br0">&#91;</span>Serializable<span class="br0">&#93;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="kw1">public</span> <span class="kw4">class</span> ScreenCaptureAttribute <span class="sy0">:</span> OnExceptionAspect</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">public</span> <span class="kw1">override</span> <span class="kw1">void</span> OnException<span class="br0">&#40;</span>MethodExecutionEventArgs eventArgs<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;SeleniumManager.<span class="me1">Selenium</span>.<span class="me1">CaptureScreenshot</span><span class="br0">&#40;</span><span class="kw4">string</span>.<span class="me1">Format</span><span class="br0">&#40;</span><span class="st0">&quot;C:<span class="es0">\\</span>{0}.jpg&quot;</span>, eventArgs.<span class="me1">Method</span>.<span class="me1">Name</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>Every time a test will throw an Exception Selenium will take a screenshot of the screen: pretty simple.</p>
<p>The only caveat is that it won&#8217;t work if Cruise is running as a service, and to get a decent result you&#8217;ll probably need to maximize the web browser windows.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.the-arm.com/2010/02/aop-nunit-and-selenium-clever-screenshots-of-failures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Suffering of Selenese Flu? Try webdriver</title>
		<link>http://www.the-arm.com/2010/02/suffering-of-selenese-flu-try-webdriver/</link>
		<comments>http://www.the-arm.com/2010/02/suffering-of-selenese-flu-try-webdriver/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 07:30:07 +0000</pubDate>
		<dc:creator>toni</dc:creator>
				<category><![CDATA[work]]></category>
		<category><![CDATA[acceptance tests]]></category>
		<category><![CDATA[functional tests]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[webdriver]]></category>

		<guid isPermaLink="false">http://www.the-arm.com/?p=493</guid>
		<description><![CDATA[I&#8217;ve been suffering of selenese flu for months, being on a .net project we were using selenium RC. The typical symptoms are flaky, slow tests and sometimes a lot of sleeps in your code to make it work. Selenium has its age and it struggles to cope with the current web 2.0 asynchronous calls &#38; rich [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been suffering of selenese flu for months, being on a .net project we were using selenium RC. The typical symptoms are flaky, slow tests and sometimes a lot of sleeps in your code to make it work.</p>
<p>Selenium has its age and it struggles to cope with the current web 2.0 asynchronous calls &amp; rich javascript.</p>
<p>Fortunately old good <a href="http://www.pubbitch.org/blog/">Simon</a> is working hard at Google on <a href="http://code.google.com/p/selenium/">webdriver</a>, and in December the official port has been released also <a href="http://code.google.com/p/selenium/downloads/list">for the .net platform</a>.</p>
<p>It works alright, there are some classes missing and you have to put the IE dll on your project as a content so that it gets copied on the bin folder to make it work.</p>
<p>A part from that, it&#8217;s faster, more reliable, more fun to write.</p>
<p>It&#8217;s time to cure your flu, webdriver is your medication.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.the-arm.com/2010/02/suffering-of-selenese-flu-try-webdriver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
