<?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>20percent</title>
	<atom:link href="http://20percent.perceptionz.net/feed" rel="self" type="application/rss+xml" />
	<link>http://20percent.perceptionz.net</link>
	<description>Innovation and Ideas meets Serendipidy</description>
	<lastBuildDate>Thu, 04 Mar 2010 04:23:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Using different datasets for testing CoreData</title>
		<link>http://20percent.perceptionz.net/items/90</link>
		<comments>http://20percent.perceptionz.net/items/90#comments</comments>
		<pubDate>Thu, 04 Mar 2010 04:23:01 +0000</pubDate>
		<dc:creator>20percent</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[QA]]></category>

		<guid isPermaLink="false">http://20percent.perceptionz.net/?p=90</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/90';
var dzone_title = 'Using different datasets for testing CoreData';
var dzone_blurb = 'I found that making use of compiler pre-process directives and bundling some test databases into your application (and using NSFileManager to copy the...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
I found that making use of compiler pre-process directives and bundling some test databases into your application (and using NSFileManager to copy the files across) makes testing with real data a breeze. What I&#8217;ve done first is I have taken a copy of the iPhone database (Do a find . -name &#8220;ApplicationName&#8221; in the backup [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/90';
var dzone_title = 'Using different datasets for testing CoreData';
var dzone_blurb = 'I found that making use of compiler pre-process directives and bundling some test databases into your application (and using NSFileManager to copy the...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>I found that making use of compiler pre-process directives and bundling some test databases into your application (and using NSFileManager to copy the files across) makes testing with real data a breeze.</p>
<p>What I&#8217;ve done first is I have taken a copy of the iPhone database (Do a find . -name &#8220;ApplicationName&#8221; in the backup directory for your application OR if jailbroken do it in /var/mobile/Applications). Then you look for any sqlite files generated and now you can use this as a baseline test.</p>
<p>Next, create a folder in the xcode project (better organization!) called &#8220;QA&#8221; and then set up a target called &#8220;Test&#8221;, under the pre-processor directives add _TEST to this.</p>
<p>And finally the code</p>
<pre class="brush: objc;">
#if _TEST
	NSLog(@&quot;Application in Test Mode %@&quot;, [[NSBundle mainBundle] pathForResource:@&quot;AppDB&quot; ofType:@&quot;sqlite&quot; inDirectory:@&quot;&quot;]);
	NSLog(@&quot;DEST: %@&quot;, [[self applicationDocumentsDirectory] stringByAppendingPathComponent:@&quot;AppDB_Test.sqlite&quot;]);
	if ([[NSFileManager defaultManager] copyItemAtPath:[[NSBundle mainBundle] pathForResource:@&quot;AppDB&quot; ofType:@&quot;sqlite&quot; inDirectory:@&quot;&quot;] toPath:[[self applicationDocumentsDirectory] stringByAppendingPathComponent:@&quot;AppDB_Test.sqlite&quot;] error:nil]) {
		NSLog(@&quot;Copied DATABASE&quot;);
	} else {
		NSLog(@&quot;Could not copy database&quot;);
	}
    NSURL *storeUrl = [NSURL fileURLWithPath: [[self applicationDocumentsDirectory] stringByAppendingPathComponent: @&quot;AppDB_Test.sqlite&quot;]];
#else
    NSURL *storeUrl = [NSURL fileURLWithPath: [[self applicationDocumentsDirectory] stringByAppendingPathComponent: @&quot;AppDB.sqlite&quot;]];
#endif
</pre>
]]></content:encoded>
			<wfw:commentRss>http://20percent.perceptionz.net/items/90/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WebDriver Framework in Ruby</title>
		<link>http://20percent.perceptionz.net/items/81</link>
		<comments>http://20percent.perceptionz.net/items/81#comments</comments>
		<pubDate>Thu, 04 Feb 2010 11:50:44 +0000</pubDate>
		<dc:creator>20percent</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[Automated Functional Tests]]></category>
		<category><![CDATA[QA]]></category>

		<guid isPermaLink="false">http://20percent.perceptionz.net/?p=81</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/81';
var dzone_title = 'WebDriver Framework in Ruby';
var dzone_blurb = 'Well as a little experiment, I decided to write a simple navigational automated test that takes the JAVA WebDriver libraries but manipulates the objects...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
Well as a little experiment, I decided to write a simple navigational automated test that takes the JAVA WebDriver libraries but manipulates the objects in Ruby (which goes through all the links on my mobile site @ http://barryteoh.com/). This uses the iPhone Driver as well, so yes I actually wrote an automated test which drives [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/81';
var dzone_title = 'WebDriver Framework in Ruby';
var dzone_blurb = 'Well as a little experiment, I decided to write a simple navigational automated test that takes the JAVA WebDriver libraries but manipulates the objects...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Well as a little experiment, I decided to write a simple navigational automated test that takes the JAVA WebDriver libraries but manipulates the objects in Ruby (which goes through all the links on my mobile site @ <a href="http://barryteoh.com">http://barryteoh.com/</a>). This uses the iPhone Driver as well, so yes I actually wrote an automated test which drives the iPhone (it is actually pretty cool to watch!). </p>
<p>If I can somehow get it posted to YouTube I will do this. (Edit: Youtube video is <a href="http://www.youtube.com/watch?v=JKgjveSCSY8">here</a>)</p>
<p>Anyway, the code is up on <a href="http://gist.github.com/294392">GitHub</a> which you can also clone using the GIT repo git://gist.github.com/294392.git </p>
<p>Oh and hey&#8230;. I even noticed it runs while the iPhone is locked (something which most commercial tools fails to do!)</p>
]]></content:encoded>
			<wfw:commentRss>http://20percent.perceptionz.net/items/81/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Benefits of Multithreaded QA Automation</title>
		<link>http://20percent.perceptionz.net/items/78</link>
		<comments>http://20percent.perceptionz.net/items/78#comments</comments>
		<pubDate>Wed, 27 Jan 2010 04:06:17 +0000</pubDate>
		<dc:creator>20percent</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[Automated Functional Tests]]></category>
		<category><![CDATA[QA]]></category>

		<guid isPermaLink="false">http://20percent.perceptionz.net/?p=78</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/78';
var dzone_title = 'The Benefits of Multithreaded QA Automation';
var dzone_blurb = 'Just noted that writing an automated test that is multi-threaded is a good and very cost effective way of picking up race condition type bugs in an application...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
Just noted that writing an automated test that is multi-threaded is a good and very cost effective way of picking up race condition type bugs in an application &#8211; especially when there is dependancies between 2 system states. Of course this will be picked up when doing performance testing, but the earlier a bug is [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/78';
var dzone_title = 'The Benefits of Multithreaded QA Automation';
var dzone_blurb = 'Just noted that writing an automated test that is multi-threaded is a good and very cost effective way of picking up race condition type bugs in an application...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Just noted that writing an automated test that is multi-threaded is a good and very cost effective way of picking up race condition type bugs in an application &#8211; especially when there is dependancies between 2 system states.</p>
<p>Of course this will be picked up when doing performance testing, but the earlier a bug is found the better (and cheaper) right?</p>
]]></content:encoded>
			<wfw:commentRss>http://20percent.perceptionz.net/items/78/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Distributing apps between other iPhone developers</title>
		<link>http://20percent.perceptionz.net/items/71</link>
		<comments>http://20percent.perceptionz.net/items/71#comments</comments>
		<pubDate>Thu, 21 Jan 2010 05:20:56 +0000</pubDate>
		<dc:creator>20percent</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[app-distribution]]></category>
		<category><![CDATA[iPhone Development]]></category>

		<guid isPermaLink="false">http://20percent.perceptionz.net/?p=71</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/71';
var dzone_title = 'Distributing apps between other iPhone developers';
var dzone_blurb = 'It has been around for a while, but I found a pretty easy to explain tutorial on how you can give an iPhone app to another registered iPhone developer...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
It has been around for a while, but I found a pretty easy to explain tutorial on how you can give an iPhone app to another registered iPhone developer (without giving them the source) AND not using an adhoc distribution profile (which personally I think is a huge brainf$@k and very limiting). To sum it [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/71';
var dzone_title = 'Distributing apps between other iPhone developers';
var dzone_blurb = 'It has been around for a while, but I found a pretty easy to explain tutorial on how you can give an iPhone app to another registered iPhone developer...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>It has been around for a while, but I found a pretty <strong>easy to explain</strong> tutorial on how you can give an iPhone app to another registered iPhone developer (without giving them the source) AND not using an adhoc distribution profile (which personally I think is a huge brainf$@k and very limiting).</p>
<p>To sum it up all it involves is resigning the binary with your own certificate. Hopefully this will not work on apps on the AppStore (not that it matters anyway as most of the apps get cracked within minutes/seconds anyway).</p>
<p>Anyway the link is <a href="http://www.mobileorchard.com/developer-to-developer-iphone-app-distribution-without-ad-hoc-provisioning/">here</a>. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://20percent.perceptionz.net/items/71/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Selenium/Webdriver + iPhone webdriver in action</title>
		<link>http://20percent.perceptionz.net/items/56</link>
		<comments>http://20percent.perceptionz.net/items/56#comments</comments>
		<pubDate>Wed, 23 Dec 2009 00:07:02 +0000</pubDate>
		<dc:creator>20percent</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[Automated Functional Tests]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[JAVA]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://20percent.perceptionz.net/?p=56</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/56';
var dzone_title = 'Selenium/Webdriver + iPhone webdriver in action';
var dzone_blurb = 'Well I&#8217;ve gotten the webdriver+iPhone webdriver working. It&#8217;s fairly straight forward (and drives the same way as driving a browser). The only...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
Well I&#8217;ve gotten the webdriver+iPhone webdriver working. It&#8217;s fairly straight forward (and drives the same way as driving a browser). The only caveat is that you need to pay $99 a year for the iPhone Developers Program. But $99 is chump change compared to any other test tool licensing. Here&#8217;s what I&#8217;ve done (JAVA Only). [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/56';
var dzone_title = 'Selenium/Webdriver + iPhone webdriver in action';
var dzone_blurb = 'Well I&#8217;ve gotten the webdriver+iPhone webdriver working. It&#8217;s fairly straight forward (and drives the same way as driving a browser). The only...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Well I&#8217;ve gotten the webdriver+iPhone webdriver working. It&#8217;s fairly straight forward (and drives the same way as driving a browser). </p>
<p>The only caveat is that you need to pay $99 a year for the iPhone Developers Program. But $99 is chump change compared to any other test tool licensing.</p>
<p>Here&#8217;s what I&#8217;ve done (JAVA Only).</p>
<p>First of all I&#8217;ve added all the selenium + the compiled iphone webdriver jar files to a directory.</p>
<p>Next, I have compiled the following code which basically does a simple google search (for demonstration purposes).</p>
<pre class="brush: java;">
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
import org.openqa.selenium.iphone.IPhoneDriver;
import java.util.Properties;

public class Test {
    public static void main(String[] args) throws Exception {
        Properties p = new java.util.Properties();
        p.load(new java.io.FileInputStream(&quot;url.properties&quot;));
        String url = p.getProperty(&quot;com.bt.url&quot;);
        System.out.println(&quot;Connecting to iWebDriver on: &quot; + url);
        WebDriver driver = new IPhoneDriver(url);
        driver.get(p.getProperty(&quot;com.bt.auturl&quot;));
        WebElement element = driver.findElement(By.name(&quot;q&quot;));
        element.sendKeys(&quot;Selenium&quot;);
        element.submit();
        // Simple output
        System.out.println(&quot;Page title is: &quot; + driver.getTitle() + &quot;\n&quot;);
        System.out.println(&quot;Page URL is: &quot; + driver.getCurrentUrl() + &quot;\n&quot;);
    }
}
</pre>
<p>Next, create a file called &#8220;url.properties&#8221; and add the following values.<br />
com.bt.url<br />
com.bt.auturl</p>
<p>The first key defines where iWebDriver sits. The second key defines the google URL. </p>
<p>Finally run the following commands (UNIX Only. I guess you can use cygwin32)</p>
<pre class="brush: bash;">
# UNIX based systems is a hell of a lot nicer for java because you don't need to type
# in all the jar files or update classpaths. But then again its my preference.

# Compiling it
javac -cp `find . -name &quot;*.jar&quot; | xargs | sed 's/ /:/g;s/.\///g;'`:. ClassSource.java
# Running it
java -cp `find . -name &quot;*.jar&quot; | xargs | sed 's/ /:/g;s/.\///g;'`:. ClassName
</pre>
<p>It will then run and produce some output telling you about the page. You will also see it navigate through the page on the iWebDriver application (It&#8217;s open source so you can even hack away at the code there to customize it to your liking).</p>
]]></content:encoded>
			<wfw:commentRss>http://20percent.perceptionz.net/items/56/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Automated Testing on the iPhone for web apps</title>
		<link>http://20percent.perceptionz.net/items/54</link>
		<comments>http://20percent.perceptionz.net/items/54#comments</comments>
		<pubDate>Tue, 22 Dec 2009 07:28:45 +0000</pubDate>
		<dc:creator>20percent</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[Automated Functional Tests]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[QA]]></category>

		<guid isPermaLink="false">http://20percent.perceptionz.net/?p=54</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/54';
var dzone_title = 'Automated Testing on the iPhone for web apps';
var dzone_blurb = 'Have been taking a look at the iPhoneDriver component for WebDriver/Selenium 2.0 (which connects to a UIWebView instance on the iPhone).Some of the observations...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
Have been taking a look at the iPhoneDriver component for WebDriver/Selenium 2.0 (which connects to a UIWebView instance on the iPhone). Some of the observations I&#8217;ve noted if you wish to go down that path: The framework is pretty easy to set up You will need the iPhone SDK and to be a registered iPhone [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/54';
var dzone_title = 'Automated Testing on the iPhone for web apps';
var dzone_blurb = 'Have been taking a look at the iPhoneDriver component for WebDriver/Selenium 2.0 (which connects to a UIWebView instance on the iPhone).Some of the observations...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Have been taking a look at the iPhoneDriver component for WebDriver/Selenium 2.0 (which connects to a UIWebView instance on the iPhone).</p>
<p>Some of the observations I&#8217;ve noted if you wish to go down that path:</p>
<ul>
<li>The framework is pretty easy to set up</li>
<li>You will need the iPhone SDK and to be a registered iPhone developer (so you can create provisioning profiles for on device testing)</li>
<li>You need an iPhone for on device testing (duh). Haven&#8217;t tried on the simulator but the documentation says it works.</li>
<li>The framework is Java based so you can data drive your tests (i.e. Using JDBC to connect to a database)</li>
<li>You could use JUnit and probably cruise control and set up some sort of continuous build integration</li>
<li>WebDriver is loosely based on selenium by the looks of the API. The script appears not to need too much modification in order for it to work</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://20percent.perceptionz.net/items/54/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Wave Tips</title>
		<link>http://20percent.perceptionz.net/items/51</link>
		<comments>http://20percent.perceptionz.net/items/51#comments</comments>
		<pubDate>Wed, 25 Nov 2009 10:20:45 +0000</pubDate>
		<dc:creator>20percent</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[Google Wave]]></category>

		<guid isPermaLink="false">http://20percent.perceptionz.net/?p=51</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/51';
var dzone_title = 'Google Wave Tips';
var dzone_blurb = 'Ever find that google wave is very intimidating? Well there is a wave where you can find out how to use it.Simply enter in: id:&#8221;googlewave.com!w+Hdq5vmpeF&#8221;...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
Ever find that google wave is very intimidating? Well there is a wave where you can find out how to use it. Simply enter in: id:&#8221;googlewave.com!w+Hdq5vmpeF&#8221; into the search bar and follow the wave which has a very comprehensive guide. Easy peasy!]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/51';
var dzone_title = 'Google Wave Tips';
var dzone_blurb = 'Ever find that google wave is very intimidating? Well there is a wave where you can find out how to use it.Simply enter in: id:&#8221;googlewave.com!w+Hdq5vmpeF&#8221;...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Ever find that google wave is very intimidating? Well there is a wave where you can find out how to use it.</p>
<p>Simply enter in: </p>
<p><strong>id:&#8221;googlewave.com!w+Hdq5vmpeF&#8221;</strong> </p>
<p>into the search bar and follow the wave which has a very comprehensive guide.</p>
<p>Easy peasy!</p>
]]></content:encoded>
			<wfw:commentRss>http://20percent.perceptionz.net/items/51/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grand Central Dispatch &#8211; Threading done easily</title>
		<link>http://20percent.perceptionz.net/items/39</link>
		<comments>http://20percent.perceptionz.net/items/39#comments</comments>
		<pubDate>Mon, 12 Oct 2009 04:29:45 +0000</pubDate>
		<dc:creator>20percent</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[GCD]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Threading]]></category>

		<guid isPermaLink="false">http://20percent.perceptionz.net/?p=39</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/39';
var dzone_title = 'Grand Central Dispatch &#8211; Threading done easily';
var dzone_blurb = 'Been doing a lot of mucking around with multi-threading lately (especially the new feature in Snow Leopard).Using Grand Central dispatch is actually pretty...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
Been doing a lot of mucking around with multi-threading lately (especially the new feature in Snow Leopard). Using Grand Central dispatch is actually pretty easy. First of all one needs to #import the header file. Next they should put the processor intensive code within a block. For example: dispatch_async(dispatch_get_global_queue(0,0), ^{ // Code goes here });]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/39';
var dzone_title = 'Grand Central Dispatch &#8211; Threading done easily';
var dzone_blurb = 'Been doing a lot of mucking around with multi-threading lately (especially the new feature in Snow Leopard).Using Grand Central dispatch is actually pretty...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Been doing a lot of mucking around with multi-threading lately (especially the new feature in Snow Leopard).</p>
<p>Using Grand Central dispatch is actually pretty easy.</p>
<p>First of all one needs to #import the  header file.</p>
<p>Next they should put the  processor intensive code within a block.</p>
<p>For example:</p>
<pre class="brush: cpp;">
dispatch_async(dispatch_get_global_queue(0,0), ^{
// Code goes here
});
</pre>
]]></content:encoded>
			<wfw:commentRss>http://20percent.perceptionz.net/items/39/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multithreaded Automated UI Testing</title>
		<link>http://20percent.perceptionz.net/items/37</link>
		<comments>http://20percent.perceptionz.net/items/37#comments</comments>
		<pubDate>Sat, 26 Sep 2009 04:12:55 +0000</pubDate>
		<dc:creator>20percent</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[Automated Functional Tests]]></category>
		<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[QA]]></category>

		<guid isPermaLink="false">http://20percent.perceptionz.net/?p=37</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/37';
var dzone_title = 'Multithreaded Automated UI Testing';
var dzone_blurb = 'Well my latest bit of personal development in the IT world is multithreaded development using scripting languages (as I don&#8217;t like waiting for stuff...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
Well my latest bit of personal development in the IT world is multithreaded development using scripting languages (as I don&#8217;t like waiting for stuff to compile). Using multithreading as far as UI testing can goes means you can cover a lot in less time. Where I&#8217;m looking at is Python (due to it&#8217;s integration with [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/37';
var dzone_title = 'Multithreaded Automated UI Testing';
var dzone_blurb = 'Well my latest bit of personal development in the IT world is multithreaded development using scripting languages (as I don&#8217;t like waiting for stuff...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Well my latest bit of personal development in the IT world is multithreaded development using scripting languages (as I don&#8217;t like waiting for stuff to compile).</p>
<p>Using multithreading as far as UI testing can goes means you can cover a lot in less time. </p>
<p>Where I&#8217;m looking at is Python (due to it&#8217;s integration with Quality Center) as well as Ruby (because I like the syntax and it offers a language which interacts with the JVM).</p>
<p>An area of interest is probably Jython. If I can get that integrated with a Quality Center VAPI-XP test, then I almost got the best of both worlds.</p>
]]></content:encoded>
			<wfw:commentRss>http://20percent.perceptionz.net/items/37/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JDBC/log4j and JRuby</title>
		<link>http://20percent.perceptionz.net/items/29</link>
		<comments>http://20percent.perceptionz.net/items/29#comments</comments>
		<pubDate>Thu, 20 Aug 2009 13:08:31 +0000</pubDate>
		<dc:creator>20percent</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[Automated Functional Tests]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[JRuby]]></category>
		<category><![CDATA[log4j]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://20percent.perceptionz.net/?p=29</guid>
		<description><![CDATA[Have been experimental with various Java technologies (At this time, JDBC, reading from properties files and log4j) and tying it all together with JRuby - Which I might add runs also in compiled mode as well.]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 115px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://20percent.perceptionz.net/items/29';
var dzone_title = 'JDBC/log4j and JRuby';
var dzone_blurb = 'Have been experimental with various Java technologies (At this time, JDBC, reading from properties files and log4j) and tying it all together with JRuby...';
var dzone_style = '2';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Have been experimental with various Java technologies (At this time, JDBC, reading from properties files and log4j) and tying it all together with JRuby &#8211; Which I might add runs also in compiled mode as well.</p>
<p>Simple use of properties files in JRuby involves</p>
<pre class="brush: ruby;">
# Initialize the properties object from java.util
# Refer to http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html
# on how to use.
properties = java.util::Properties.new
# Make sure that propertyfile exists!
properties.load(java.io.FileInputStream.new(&quot;propertyfile.properties&quot;))
puts properties.getProperty(&quot;propertykey&quot;)
</pre>
<p>Now for some jdbc action! (The below code is well commented.. Enjoy!)</p>
<pre class="brush: ruby;">
require 'java' # So we can use the sexy java goodness!
# Make sure you download this from the mysql site! (Link: http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-3.1.10.zip/from/pick)
require 'mysql-connector-java-3.1.10-bin.jar'
import 'com.mysql.jdbc.Driver' # Load the JDBC Driver

# Replace 'conn_string' with the JDBC Connection string (e.g. jdbc:mysql://localhost:3306/DBNAME)
# Replace 'uid' with the database username
# Replace 'pwd' with the database password
conn = java.sql::DriverManager.getConnection(conn_string, uid, pwd);
# Prepared queries are teh win
stmt = conn.prepareStatement(&quot;select field from table where otherfield = ?&quot;)
stmt.setString(1, &quot;Whatwearesearchingfor&quot;) # First param
stmt.executeQuery
while rs.next do
puts rs.getString(&quot;field&quot;)
end
stmt.close # Because we should close what we open
conn.close # Same as above
</pre>
<p>And finally, some log4j thrown in!</p>
<pre class="brush: ruby;">
require 'log4j-1.2.15.jar' # Assume you have already done require java
# The below is how you use log4j controlled by XML
import org.apache.log4j.Logger
import org.apache.log4j.xml.DOMConfigurator
logger = Logger.getLogger(&quot;LoggerName&quot;) # LoggerName would be defined in the XML file
DOMConfigurator.configure(&quot;log4j.xml&quot;)
logger.info &quot;This would log an INFO entry if it were configured to be shown&quot;
# Additionally you can use debug, info, warn, error, fatal
</pre>
<p>The results have been to a good degree of success. All I will need now to create a kickass and open source web frontend testing framework is:</p>
<ul>
<li>Celerity</li>
<li>log4j</li>
<li>JDBC</li>
<li>properties files</li>
</ul>
<p>I&#8217;ve basically got 90% of the functionality of a commercial tool right here!  Schweet!</p>
]]></content:encoded>
			<wfw:commentRss>http://20percent.perceptionz.net/items/29/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
