<?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>Electronic Ingenuity</title>
	<atom:link href="http://electronicingenuity.com/feed" rel="self" type="application/rss+xml" />
	<link>http://electronicingenuity.com</link>
	<description></description>
	<lastBuildDate>Tue, 24 Jul 2012 04:34:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Issues using ios-sim with Jenkins</title>
		<link>http://electronicingenuity.com/issues-using-ios-sim-with-jenkins</link>
		<comments>http://electronicingenuity.com/issues-using-ios-sim-with-jenkins#comments</comments>
		<pubDate>Sat, 21 Jan 2012 18:03:51 +0000</pubDate>
		<dc:creator>Dante</dc:creator>
				<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[automated acceptance testing]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[functional testing]]></category>
		<category><![CDATA[homebrew]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[jenkins]]></category>
		<category><![CDATA[native app automation]]></category>

		<guid isPermaLink="false">http://electronicingenuity.com/?p=330</guid>
		<description><![CDATA[Just a quick one: there seem to be two issues that prevent ios-sim from successfully launching an iOS app in the simulator as part of a Jenkins build: Specifying the wrong path for the built application Running Jenkins as a user other than the one currently logged into OS X I got tripped up by [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick one: there seem to be two issues that prevent <a href="https://github.com/phonegap/ios-sim">ios-sim</a> from successfully launching an iOS app in the simulator as part of a <a href="http://jenkins-ci.org">Jenkins</a> build:</p>
<ol>
<li>Specifying the wrong path for the built application</li>
<li>Running Jenkins as a user other than the one currently logged into OS X</li>
</ol>
<p>I got tripped up by the first problem because there was a bug in the code I wrote to figure out the current working directory of the build: it worked on my local machine but not in Jenkins&#8217; workspace (whoops).  ios-sim would be a better tool if it alerted the user that the specified application path doesn&#8217;t exist, so <a href="https://github.com/phonegap/ios-sim/pull/16">I&#8217;ve made it do just that</a>.</p>
<p>Fortunately, I didn&#8217;t bump into the second issue because I installed Jenkins using <a href="http://mxcl.github.com/homebrew">Homebrew</a> <a href="#1">*</a>, but I&#8217;m mentioning it because more than one of the ios-sim users commenting on <a href="https://github.com/phonegap/ios-sim/issues/5">this issue</a> seem to be running Jenkins as root.</p>
<p>I&#8217;m writing up a much more detailed post about CI for iOS… watch this space!</p>
<p><em>Update: 23 July 2012</em> New targets for ios-sim links &#8212; it&#8217;s now part of <a href="https://github.com/phonegap">phonegap</a></p>
<p><a name="1"> * </a> By default, all the <em>services installed by Homebrew</em> run as the user who installed <em>Homebrew itself</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://electronicingenuity.com/issues-using-ios-sim-with-jenkins/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Touch Gesture API in Selenium / WebDriver</title>
		<link>http://electronicingenuity.com/new-touch-gesture-api-in-selenium-webdriver</link>
		<comments>http://electronicingenuity.com/new-touch-gesture-api-in-selenium-webdriver#comments</comments>
		<pubDate>Thu, 27 Oct 2011 22:27:25 +0000</pubDate>
		<dc:creator>Dante</dc:creator>
				<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[functional testing]]></category>
		<category><![CDATA[gtac]]></category>
		<category><![CDATA[native app automation]]></category>
		<category><![CDATA[nativedriver]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://electronicingenuity.com/?p=310</guid>
		<description><![CDATA[A commenter on my earlier post about NativeDriver asked if ND provides a mechanism to simulate touch-specific gestures. At the moment, it doesn&#8217;t, but at GTAC2011 today, Google&#8217;s Dounia Berrada was kind enough to show me the new touch-specific gesture support in Selenium&#8217;s TouchActions class. Since NativeDriver is based on Selenium, I suspect it&#8217;s only [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://electronicingenuity.com/nativedriver-ios-first-impressions/comment-page-1#comment-38">A commenter</a> on <a href="http://electronicingenuity.com/nativedriver-ios-first-impressions">my earlier post about NativeDriver</a> asked if ND provides a mechanism to simulate touch-specific gestures.  At the moment, it doesn&#8217;t, but at <a href="http://www.gtac.biz/">GTAC2011</a> today, Google&#8217;s Dounia Berrada was kind enough to show me the new touch-specific gesture support in <a href="http://code.google.com/p/selenium/">Selenium&#8217;s</a> <a href="http://code.google.com/p/selenium/source/browse/trunk/java/client/src/org/openqa/selenium/interactions/touch/TouchActions.java">TouchActions class</a>.</p>
<p>Since NativeDriver is based on Selenium, I suspect it&#8217;s only a matter of time before NativeDriver includes support for this, too. Cool stuff!</p>
]]></content:encoded>
			<wfw:commentRss>http://electronicingenuity.com/new-touch-gesture-api-in-selenium-webdriver/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error running launchctl remotely as non-root</title>
		<link>http://electronicingenuity.com/error-running-launchctl-remotely-as-non-root</link>
		<comments>http://electronicingenuity.com/error-running-launchctl-remotely-as-non-root#comments</comments>
		<pubDate>Sat, 08 Oct 2011 21:08:34 +0000</pubDate>
		<dc:creator>Dante</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[homebrew]]></category>
		<category><![CDATA[jenkins]]></category>
		<category><![CDATA[launchd]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://electronicingenuity.com/?p=290</guid>
		<description><![CDATA[Today, I&#8217;m attempting to install Jenkins under Homebrew on my home server running OS X. I&#8217;m ssh-ing into that machine, and got the following error while attempting to launch the program after installation: Bug: launchctl.c:2325 (23930):13: (dbfd = open(g_job_overrides_db_path, O_RDONLY &#124; O_EXLOCK &#124; O_CREAT, S_IRUSR &#124; S_IWUSR)) != -1 launch_msg(): Socket is not connected A [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I&#8217;m attempting to install <a href="http://jenkins-ci.org/">Jenkins</a> under <a href="http://mxcl.github.com/homebrew/">Homebrew</a> on my home server running OS X.  I&#8217;m ssh-ing into that machine, and got the following error while attempting to launch the program after installation:</p>
<pre><code>Bug: launchctl.c:2325 (23930):13: (dbfd = open(g_job_overrides_db_path, O_RDONLY | O_EXLOCK | O_CREAT, S_IRUSR | S_IWUSR)) != -1

launch_msg(): Socket is not connected
</code></pre>
<p>A bit of Googling turned up <a href="https://github.com/mxcl/homebrew/wiki/Common-Issues">this page from the Homebrew wiki</a> which mentioned the error message but suggested that iTerm was the cause.  I&#8217;m not using iTerm, but on a hunch, I tried using Screen Sharing to run Terminal.app directly on the remote machine.  Success!</p>
]]></content:encoded>
			<wfw:commentRss>http://electronicingenuity.com/error-running-launchctl-remotely-as-non-root/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Page Object Pattern Resources</title>
		<link>http://electronicingenuity.com/page-object-pattern-resources</link>
		<comments>http://electronicingenuity.com/page-object-pattern-resources#comments</comments>
		<pubDate>Thu, 06 Oct 2011 06:52:47 +0000</pubDate>
		<dc:creator>Dante</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[automated acceptance testing]]></category>
		<category><![CDATA[browser automation]]></category>
		<category><![CDATA[page object pattern]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://electronicingenuity.com/?p=118</guid>
		<description><![CDATA[I&#8217;ve been asked on occasion for links to good references on the Page Object pattern. Here are a few that I&#8217;ve collected over the past few months: The Selenium project wiki has a great overview of Page Objects that covers the most important principles The Automated Tester has a simple example of how to implement [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been asked on occasion for links to good references on the Page Object pattern.  Here are a few that I&#8217;ve collected over the past few months:</p>
<ul>
<li><a href="http://code.google.com/p/selenium/">The Selenium project</a> wiki has a <a href="[http://code.google.com/p/selenium/wiki/PageObjects]">great overview of Page Objects</a> that covers the most important principles</li>
<li><a href="http://www.theautomatedtester.co.uk/">The Automated Tester</a> has <a href="http://www.theautomatedtester.co.uk/tutorials/selenium/page-object-pattern.htm">a simple example of how to implement page objects in C#</a></li>
<li>Patrick Wilson Welsh provides <a href="http://patrickwilsonwelsh.com/?p=343">a good example</a> of how applying a simple convention to your Page Objects can further improve readability of your tests</li>
<li><a href="http://element34.ca/">Adam Goucher</a> put together an <a href="http://www.pragprog.com/magazines/2010-08/page-objects-in-python">example of how to implement page objects in Python</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://electronicingenuity.com/page-object-pattern-resources/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>NativeDriver and iOS: First Impressions</title>
		<link>http://electronicingenuity.com/nativedriver-ios-first-impressions</link>
		<comments>http://electronicingenuity.com/nativedriver-ios-first-impressions#comments</comments>
		<pubDate>Sun, 02 Oct 2011 18:02:45 +0000</pubDate>
		<dc:creator>Dante</dc:creator>
				<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[automated acceptance testing]]></category>
		<category><![CDATA[functional testing]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[native app automation]]></category>
		<category><![CDATA[nativedriver]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://electronicingenuity.com/?p=174</guid>
		<description><![CDATA[I&#8217;ve just taken on a new client who wants help writing automated tests for their iOS and Android applications. It&#8217;s still early days in the native app automation space, but there are already quite a few open source and free-to-use tools available. One of my responsibilities for this project will be to evaluate them and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just taken on a new client who wants help writing automated tests for their iOS and Android applications.  It&#8217;s still early days in the native app automation space, but there are already quite a few open source and free-to-use tools available.  One of my responsibilities for this project will be to evaluate them and decide which to use.  I&#8217;m planning to take a look at the following options:</p>
<ul>
<li><a href="http://code.google.com/p/nativedriver/">NativeDriver</a> (Java, Android &amp; iOS)</li>
<li><a href="http://github.com/moredip/Frank">Frank</a> (Ruby/Gherkin, iOS only)</li>
<li><a href="http://alexvollmer.com/posts/2010/07/03/working-with-uiautomation/">UIAutomation</a> (JavaScript, iOS only)</li>
<li><a href="http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/ios_development_workflow/135-Unit_Testing_Applications/unit_testing_applications.html">Apple&#8217;s &#8220;Application Unit Tests&#8221;</a> (Objective-C, iOS only)</li>
</ul>
<p>Since 80% of my client&#8217;s current mobile app users are on iOS, that&#8217;s where we&#8217;re going to focus our efforts for the moment &#8212; and that&#8217;s what I&#8217;m going to focus on in this post.</p>
<h2>Introducing NativeDriver</h2>
<p>In recent weeks, I&#8217;ve started investigating <a href="http://code.google.com/p/nativedriver/">NativeDriver</a>.  NativeDriver attempts to capitalize on the popularity of the <a href="http://code.google.com/p/selenium/">Selenium</a> 2.0 (née WebDriver) API, while also (and more importantly, to my mind) using the same architecture as RemoteWebDriver.  NativeDriver is split into a &#8220;client&#8221; API (currently implemented in Java; although <a href="https://github.com/jarib/nativedriver-rb">a separate Ruby client</a> also exists) which issues HTTP requests to a &#8220;server&#8221; embedded into the application you want to automate.</p>
<p>I&#8217;ve spent a couple days playing with ND&#8230;  here are my thoughts, so far:</p>
<h2>It Works</h2>
<p>I wanted to be able to write that &#8220;It Just Works&#8221;, but&#8230;  I followed the instructions on <a href="http://code.google.com/p/nativedriver/wiki/IOSMakeAnAppTestable">the &#8220;Make Your iOS App Testable with NativeDriver&#8221; wiki page</a>, and I still had to fiddle with the XCode configuration as described <a href="https://groups.google.com/d/topic/nativedriver-users/O0KanpbkEi4/discussion">here</a> and <a href="http://isisredirect.blogspot.com/2011/08/nativedriver-for-ios-ui.html">here</a>.  (Yes, the post behind that second link is written in Japanese &#8212; but all you need to know is that your build settings should match the screenshots.) You&#8217;ll also have to make sure that your XCode project includes the correct preprocessor macros, as detailed <a href="https://groups.google.com/d/topic/nativedriver-users/4oasoLTcS00/discussion">here</a>.  That said, being that I have essentially zero iOS development experience, it didn&#8217;t take long at all to get up and running.</p>
<h2>Native Apps Are Not Web Browsers</h2>
<p>To be honest, while I really love the WebDriver API, the idea of using it to drive a native mobile application strikes me as a bit odd.  WebDriver doesn&#8217;t include concepts like device orientation or gestures, because&#8230; well, it&#8217;s designed to automate web browsers, not native mobile applications.  A few days playing with ND has confirmed my suspicions &#8212; there are a number of areas where the API is a bit more confusing or awkward than I&#8217;d like.  Given the youth of this project (and specifically the iOS support, which was released only 7 weeks ago), I&#8217;m not going to  nitpick on every little thing.  However, I will say that I think the ND API would would benefit if it were no longer coupled via inheritance to the WebDriver API.  A NativeDriver client API &#8220;inspired by&#8221; WebDriver would still provide the benefits of familiarity with the more established tool while also providing a development experience that makes more sense for mobile apps.  Looking at <a href="http://code.google.com/p/nativedriver/source/browse/trunk/iphone/Client/test/com/google/iphone/testing/nativedriver/client/NativeDriverTest.java">the example test provided with the ND source</a>, it&#8217;s not hard to imagine a newbie getting confused by the fact that a <em>native mobile application widget</em> is referred to as a <em>Web</em>Element.  Huh?</p>
<p>I think that copying that the WebDriver <em>architecture</em> makes a lot of sense, though.  That paves the way for client APIs in other languages, and maybe even a different client API that&#8217;s more specific to the domain of mobile apps.</p>
<h2>It Has a Killer Feature</h2>
<p>My client&#8217;s app is a hybrid: the UI is composed of both native widgets and HTML/JS contained in a UIWebView.  This are where NativeDriver really shines &#8212; you can find and act on HTML elements the same as if they were native elements.  This is because in addition to lifting the API and architecture from WebDriver, NativeDriver <em>also</em> includes iWebDriver (also known as the server side of the IPhoneDriver).  Because UIWebView and is a close (but <a href="http://www.examiner.com/technology-in-national/no-conspiracy-here-apple-admits-differences-between-safari-uiwebview-api">significantly slower</a>) relative of Mobile Safari, iWebDriver makes it possible for NativeDriver to automate these, as well.</p>
<p>This is pretty fantastic for those of us who want to automate hybrid apps &#8212; we don&#8217;t have to reinvent the wheel (that is, the WebDriver) when the UI transitions to HTML.  Very slick.</p>
<h2>You Still Have to Design For Testability</h2>
<p>No surprise here &#8212; as with web applications, you&#8217;ll still have to insert metadata into your app&#8217;s UI for the tests to be able to drive it in a robust way.  The good news is that you&#8217;re probably doing this already &#8212; NativeDriver makes use of the accessibility labels inserted into your app by Interface Builder.  So if you&#8217;ve got a button labeled &#8220;Cart&#8221;, chances are, you&#8217;ll be able to find it by calling:</p>
<pre><code>driver.findElement(By.id("Cart"));
</code></pre>
<p>Things get a bit more complicated if your app has regions of unmodifiable, data-driven text.  For example, in an e-commerce application, you could imagine a product detail page with a product name, description, etc.  By default, the accessibility label will be the the text itself, which is great if you&#8217;re using a screen reader to help you navigate the interface.  But it&#8217;s not so useful if you know the <em>meaning</em> of the field (for example, &#8220;Product Name&#8221;), and want to use <em>that</em> to get its value (for example, &#8220;Huggies Size 5 30 count&#8221;).  This is easy &#8212; you just have to add explicit some additional labels to these text fields.  Simply select the widget in XCode (which now incorporates Interface Builder directly) and entering the label in the appropriate field.</p>
<h2>A New Tool Means a Young Community</h2>
<p>The dev team have established separate mailing lists for the <a href="https://groups.google.com/forum/#!forum/nativedriver-devs">developer</a> and <a href="https://groups.google.com/forum/#!forum/nativedriver-users">user communities</a>, and so far, traffic has been pretty light on both.  Unfortunately, because very few people outside of the dev team have any significant understanding of how the tool works, there aren&#8217;t a lot of folks who can help with anything more complicated than &#8220;I can&#8217;t get the example test to run&#8221;.  This will undoubtedly change with time (and, of course, more posts like the one you&#8217;re reading now).  As of this writing, NativeDriver is a part-time project for the development team, and their participation on the lists and commits to the source repo have been infrequent since the release of iOS support last month.  <a href="https://groups.google.com/d/topic/nativedriver-devs/QNcaMwj7cHk/discussion">They&#8217;ve made it clear that this is not ideal</a>, so here&#8217;s hoping that <a href="http://www.google.com">their employer</a> will see fit to let them give this project the attention it deserves.</p>
<h2>This is the Bleeding Edge</h2>
<p>No surprises here &#8212; mobile applications themselves are at the forefront of technology, and the practice of using automated tools to verify them is even newer. As such, bugs in the tools are to be expected &#8212; I&#8217;ve found (<a href="https://groups.google.com/d/topic/nativedriver-devs/KQdPeZkHRFs/discussion">and fixed</a>) one or two myself.  Don&#8217;t let this put you off &#8212; but make sure expectations are set accordingly.</p>
<h2>All This and Android, Too</h2>
<p>I haven&#8217;t looked into this yet, but NativeDriver also provides an implementation of the <a href="http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/WebDriver.html">WebDriver interface</a> that can drive an Android app.  In Selenium-land, this architecture means that as long as your tests use that interface to drive the browser, you&#8217;re able to swap out the implementation at any time.  Typically, you&#8217;ll set up your build infrastructure so that you can configure this at runtime, meaning that you can set up a matrix of builds that run your test suite on all of the browser/browser version/OS combinations you care to support.</p>
<p>In theory, this means you could do the same thing with NativeDriver &#8212; however, my client has two completely separate codebases for their Android and iOS apps, and the user experiences are not guaranteed to be identical.  Call me skeptical that we&#8217;ll be able to use the exact same tests to verify both apps.  Even if that&#8217;s true, though, there&#8217;s still a huge benefit to <em>not</em> having to learn a different API (or even a different language) in order to write tests for both platforms.</p>
<h2>More to Come</h2>
<p>There are still a few questions I&#8217;m hoping to resolve in the coming weeks:</p>
<ul>
<li>Will the accessibility labels I&#8217;m adding to make the app <em>testable</em> make it less <em>usable</em>?  If so, can we do something clever to prevent that?</li>
<li>How can I make it trivially easy for the app development team to run the test suite on their local environment?</li>
<li>And, of course, I&#8217;ll be looking at Android support as well</li>
</ul>
<p>To be continued&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://electronicingenuity.com/nativedriver-ios-first-impressions/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>SeleniumConf 2011 Presentation: Slides and Video</title>
		<link>http://electronicingenuity.com/seleniumconf-2011-presentation-slides-and-video</link>
		<comments>http://electronicingenuity.com/seleniumconf-2011-presentation-slides-and-video#comments</comments>
		<pubDate>Wed, 13 Apr 2011 06:00:12 +0000</pubDate>
		<dc:creator>Dante</dc:creator>
				<category><![CDATA[Speaking]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[automated acceptance testing]]></category>
		<category><![CDATA[browser automation]]></category>
		<category><![CDATA[functional testing]]></category>
		<category><![CDATA[page object pattern]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://electronicingenuity.com/?p=305</guid>
		<description><![CDATA[If you couldn&#8217;t make it to San Francisco for SeleniumConf 2011, fear not &#8212; my slide deck and a video of my presentation are now available for your viewing pleasure. Huge thanks to the organizers and the attendees &#8212; it was a great event with a fantastic crowd.]]></description>
			<content:encoded><![CDATA[<p>If you couldn&#8217;t make it to San Francisco for <a href="http://www.seleniumconf.com/">SeleniumConf 2011</a>, fear not &#8212; <a href="http://www.slideshare.net/dantebriones/beyond-page-objects">my slide deck</a> and <a href="http://www.youtube.com/watch?v=Jg-FN_rcNRc">a video of my presentation</a> are now available for your viewing pleasure.</p>
<p>Huge thanks to the organizers and the attendees &#8212; it was a great event with a fantastic crowd.</p>
]]></content:encoded>
			<wfw:commentRss>http://electronicingenuity.com/seleniumconf-2011-presentation-slides-and-video/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash Completion for Ant on OS X with Homebrew</title>
		<link>http://electronicingenuity.com/bash-completion-for-ant-on-os-x-with-homebrew</link>
		<comments>http://electronicingenuity.com/bash-completion-for-ant-on-os-x-with-homebrew#comments</comments>
		<pubDate>Thu, 24 Mar 2011 02:46:32 +0000</pubDate>
		<dc:creator>Dante</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[homebrew]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://electronicingenuity.com/?p=154</guid>
		<description><![CDATA[Now that I&#8217;ve set this up, I can&#8217;t believe that it&#8217;s taken me so long to do it. A bit of googling turned up this blog post, which contained a link to this post in the comments. Since I&#8217;m using Homebrew instead of MacPorts, I had to tweak the instructions a bit: Install bash_completion: brew [...]]]></description>
			<content:encoded><![CDATA[<p>Now that I&#8217;ve set this up, I can&#8217;t believe that it&#8217;s taken me so long to do it.  A bit of googling turned up <a href="http://marius.scurtescu.com/2005/03/23/ant_bash_completion">this blog post</a>, which contained a link to <a href="http://matthew.mceachen.us/blog/ant-bash-completion-on-mac-os-x-43.html">this post</a> in the comments.  Since I&#8217;m using Homebrew instead of MacPorts, I had to tweak the instructions a bit:</p>
<ul>
<li>Install bash_completion:
<p><code> brew install bash_completion</code></p>
</li>
<li>Next, add the following to the bottom of your .bashrc or .profile:
<p><code>if [ -f `brew --prefix`/etc/bash_completion ]; then<br />
  . `brew --prefix`/etc/bash_completion<br />
fi<br />
complete -C /usr/share/ant/bin/complete-ant-cmd.pl ant<br />
</code></p>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://electronicingenuity.com/bash-completion-for-ant-on-os-x-with-homebrew/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sizzle: Inconsistency between nth() and nth-child() CSS selector</title>
		<link>http://electronicingenuity.com/sizzle-inconsistency-between-nth-and-nth-child-css-selector</link>
		<comments>http://electronicingenuity.com/sizzle-inconsistency-between-nth-and-nth-child-css-selector#comments</comments>
		<pubDate>Fri, 17 Dec 2010 06:15:32 +0000</pubDate>
		<dc:creator>Dante</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[sizzle]]></category>
		<category><![CDATA[wtf]]></category>

		<guid isPermaLink="false">http://electronicingenuity.com/?p=137</guid>
		<description><![CDATA[We&#8217;re using the Sizzle JavaScript library to help us select HTML elements in our suite of Selenium tests.  Sizzle provides all of the useful selectors from CSS3, like nth-child(), as well as some others not provided by CSS3, like nth().  Sounds great, right?  Well, yes&#8230; but take a look at the W3C recommendation for nth-child() [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re using the <a href="https://github.com/jeresig/sizzle">Sizzle</a> JavaScript library to help us select HTML elements in our suite of Selenium tests.  Sizzle provides all of the useful selectors from <a href="http://www.w3.org/TR/css3-selectors">CSS3</a>, like nth-child(), as well as some others not provided by CSS3, like nth().  Sounds great, right?  Well, yes&#8230; but take a look at the <a href="http://www.w3.org/TR/css3-selectors/#nth-child-pseudo">W3C recommendation for nth-child()</a> CSS3 pseudo-class:</p>
<blockquote><p>The index of the first child of an element is 1.</p></blockquote>
<p><a href="https://github.com/jeresig/sizzle/wiki">The Sizzle documentation</a>, on the other hand, states:</p>
<blockquote><p><code>:eq</code>/<code>:nth</code>: Finds the Nth element on the page (e.g. :eq(5) finds the 6th element on the page).</p></blockquote>
<p>W. T. F.?</p>
]]></content:encoded>
			<wfw:commentRss>http://electronicingenuity.com/sizzle-inconsistency-between-nth-and-nth-child-css-selector/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Page Object Presentation Video</title>
		<link>http://electronicingenuity.com/page-object-presentation-video</link>
		<comments>http://electronicingenuity.com/page-object-presentation-video#comments</comments>
		<pubDate>Sat, 11 Dec 2010 00:26:43 +0000</pubDate>
		<dc:creator>Dante</dc:creator>
				<category><![CDATA[Speaking]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[automated acceptance testing]]></category>
		<category><![CDATA[design patterns]]></category>
		<category><![CDATA[functional testing]]></category>
		<category><![CDATA[page object pattern]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://electronicingenuity.com/?p=124</guid>
		<description><![CDATA[I just realized that I never posted a link to the video of my page object presentation at Twitter HQ last year.  For convenience, here&#8217;s a link to the code download and the slide deck that I used. Very belated thanks to Sauce Labs for inviting me to present, to Twitter for hosting, and to [...]]]></description>
			<content:encoded><![CDATA[<p>I just realized that I never posted a link to the <a href="http://www.viddler.com/explore/saucelabs/videos/3/">video of my page object presentation</a> at Twitter HQ last year.  For convenience, <a href="http://electronicingenuity.com/page-object-presentation-downloads">here&#8217;s a link to the code download and the slide deck that I used</a>.</p>
<p>Very belated thanks to Sauce Labs for inviting me to present, to Twitter for hosting, and to the audience for just being awesome.</p>
]]></content:encoded>
			<wfw:commentRss>http://electronicingenuity.com/page-object-presentation-video/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prevent Selenium Test Timeouts By Hacking The /etc/hosts File</title>
		<link>http://electronicingenuity.com/prevent-selenium-test-timeouts-by-hacking-the-etchosts-file</link>
		<comments>http://electronicingenuity.com/prevent-selenium-test-timeouts-by-hacking-the-etchosts-file#comments</comments>
		<pubDate>Thu, 25 Nov 2010 23:08:59 +0000</pubDate>
		<dc:creator>Dante</dc:creator>
				<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[automated acceptance testing]]></category>
		<category><![CDATA[browser automation]]></category>
		<category><![CDATA[functional testing]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://electronicingenuity.com/?p=108</guid>
		<description><![CDATA[My current client runs a major consumer-facing web application, and I&#8217;m helping them build a suite of browser-automation tests using Selenium.  We&#8217;ve had a lot of problems with test failures caused by intermittent page load timeouts, though &#8212; the application includes a LOT of external resources (1&#215;1 pixel GIFs, javascript, etc.) used to enhance the [...]]]></description>
			<content:encoded><![CDATA[<p>My current client runs a major consumer-facing web application, and I&#8217;m helping them build a suite of browser-automation tests using <a href="http://seleniumhq.org/">Selenium</a>.  We&#8217;ve had a lot of problems with test failures caused by intermittent page load timeouts, though &#8212; the application includes a <strong>LOT</strong> of external resources (1&#215;1 pixel GIFs, javascript, etc.) used to enhance the application&#8217;s functionality and track its users&#8217; behavior.  These resources are hosted by other organizations, and unfortunately, they don&#8217;t always load quickly and reliably &#8212; any one of them can cause the page load time to exceed our default timeout of 30 seconds.  This&#8230;well, this pretty much sucks.</p>
<p>Ideally, we&#8217;d make the inclusion of the external resources a configuration property, so that they would only get included in environments where they matter &#8212; production, staging, and environments dedicated to manual QA testing.  We definitely DON&#8217;T want these resources included where we&#8217;re running automated tests, (that is, local developer and continuous integration environments).  In fact, this ability is a planned enhancement to the application&#8230; but it&#8217;s going to take a little while to get it implemented.  Meanwhile, we&#8217;d been unable to maintain a green CI build for more than two or three checkins.  We needed a more immediate fix.</p>
<p>Fortunately, we came up with one &#8212; we&#8217;d use the /etc/hosts file to fool the browser into thinking that the servers hosting those resources were unreachable, thereby preventing it from waiting for them to load (and potentially exceeding out test timeout while doing so).  Here&#8217;s how:</p>
<ol>
<li>We made a list of the remote hosts that the application refers to.  We dumped the HTML for the application&#8217;s home page into a file and extracted anything that looked like a URL (that is, started with http(s)?) on to a separate line.  We then stripped off the protocol, path, and query string parts.</li>
<li>We prepended each line with &#8220;0.0.0.0 &#8220;</li>
<li>We then fired up our favorite text editor and copy all of the lines into your /etc/hosts file.  On Unix-y operating systems, you&#8217;ll probably have to use &#8220;sudo&#8221;.  On Windows, you&#8217;ll have to dig deep into the bowels of the system installation directory to find the file &#8212; use <a href="http://en.wikipedia.org/wiki/Hosts_(file)">this page</a> as a guide.</li>
</ol>
<p>Result?  Not only have we significantly improved the reliability of the build, we also reduced the length of the build by more than 20%!  Not bad for a few minutes&#8217; work. Keep in mind that you&#8217;ll have to make this change on every machine where your Selenium server runs &#8212; on each of your local developer machines, and on any that you use for your continuous integration environments.  Also, even though we&#8217;re using Selenium, this technique will work with any other browser-automation framework, too.</p>
<p>But remember folks, this is a dirty hack &#8212; but if you can&#8217;t modify the application under test and you&#8217;re desperate to stabilize your build, it might be worth a shot.</p>
]]></content:encoded>
			<wfw:commentRss>http://electronicingenuity.com/prevent-selenium-test-timeouts-by-hacking-the-etchosts-file/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->