<?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>onemoretake &#187; Testing</title>
	<atom:link href="http://www.onemoretake.com/category/testing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.onemoretake.com</link>
	<description></description>
	<lastBuildDate>Fri, 28 Oct 2011 11:39:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Cross Browser Testing &#8211; Its All Wrong</title>
		<link>http://www.onemoretake.com/2009/03/25/cross-browser-testing-its-all-wrong/</link>
		<comments>http://www.onemoretake.com/2009/03/25/cross-browser-testing-its-all-wrong/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 09:37:49 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Testing]]></category>
		<category><![CDATA[Cross browser]]></category>

		<guid isPermaLink="false">http://www.onemoretake.com/?p=191</guid>
		<description><![CDATA[It was not long ago that I got all excited when I came across the XenoCode virtualized browsers. This seemed a neat idea. At the time one could download an executable (they seem to only be available in-browser now) and run one of the major browsers without interfering with the operating system or confguration you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.onemoretake.com/2009/02/25/easier-cross-browser-testing/">It was not long ago</a> that I got all excited when I came across the  <a href="http://www.xenocode.com/browsers/">XenoCode virtualized browsers</a>. This seemed a neat idea. At the time one could download an executable (they seem to only be available in-browser now) and run one of the major browsers without interfering with the operating system or confguration you had.</p>
<p>I was all for throwing away my virtual machines there and then. However, I soon realised that they were as lacking as all the other cross browser testing systems out there. The most recent of which is a product from Microsoft themselves. Called <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=8e6ac106-525d-45d0-84db-dccff3fae677&#038;displaylang=en">SuperPreview</a>, it is actually closely linked with the Expression product and it allows you to display the same page in different version of Internet Explorer. This is a similar approach to <a href="http://www.my-debugbar.com/wiki/IETester/HomePage">IETester</a>, which allows you to open tabs containing the different rendering engines. This is fine if you just want to see that IE6 renders things in a completely different manner to everything else out there but it does not help you one bit if you are actually trying to solve those rendering problems.</p>
<p>Why do none of the IE cross browser rendering tools contain the <a href="http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038">Developers Toolbar</a>? I mean, it is not a fraction as useful as the wonderful <a href="http://www.getfirebug.com/">Firebug</a> but it is the nearest we have to an IE tool that actually assists the developer in ironing out those css problems. I have even resorted to the <a href="http://finalbuilds.edskes.net/iecollection.htm">IECollection</a> which claims to contain all the versions of Internet Explorer that have ever existed and to contain the developers toolbar but only manages to throw up error messages and still no sign of a working developer&#8217;s toolbar.</p>
<p>So here it is, a request to the producers of the current cross-browser products or to anyone who fancies the challenge. Create a tool that is actually useful. Make it contain all current browsers and some developers tools that allow real-time changing of CSS and whilst your there, make it highlight the padding and margins in that oh-so useful way that Firebug does. That way we can actually see what is causing the problem and try a few fixes without having to change the css file and refresh the page every time. Also, do a favour for the Mac users out there and make it cross-platform. </p>
<p>If it really was a useful tool, developers would buy it and most be willing to pay a substantial license fee. I spend an awful lot of the time waiting for virtual machines to boot and suffering the performance consequences of running them whilst developing, so I would be happy to fork out some cash to solve this problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onemoretake.com/2009/03/25/cross-browser-testing-its-all-wrong/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Importance of a Good jQuery Selector</title>
		<link>http://www.onemoretake.com/2009/03/18/the-importance-of-a-good-jquery-selector/</link>
		<comments>http://www.onemoretake.com/2009/03/18/the-importance-of-a-good-jquery-selector/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 06:36:13 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[javacript]]></category>

		<guid isPermaLink="false">http://www.onemoretake.com/?p=168</guid>
		<description><![CDATA[As a technical lead and working in a company that has had rapid expansion in the last six months or so, I have had the job of being a mentor to some of the new employees. I don&#8217;t think any of them had used jQuery before and so for every person that arrived, I needed [...]]]></description>
			<content:encoded><![CDATA[<p>As a technical lead and working in a company that has had rapid expansion in the last six months or so, I have had the job of being a mentor to some of the new employees. I don&#8217;t think any of them had used jQuery before and so for every person that arrived, I needed to give a crash course on the subject. The jQuery selector is always one of the first things I describe and it is usually met with nods of understanding, as it is not a difficult concept to grasp when most developers are familiar with css and the DOM.</p>
<p>There have been two incidents recently however, that have made me realise that my crash course on jQuery selectors has been missing something vital. The first was when I found some time to explore the options of profiling some of our javascript code. When I first started this, the only option I could see was <a href="http://ejohn.org/blog/deep-profiling-jquery-apps/">John Resig&#8217;s deep profiling script</a> that injected the statistics at the bottom of the page. This had some limitations however, and I was very happy to open my news feeds soon after and find that he had added a couple of extra methods to <a href="http://fireunit.org/">FireUnit</a> that enabled you to <a href="http://ejohn.org/blog/function-call-profiling/">profile javascript function calls</a>.</p>
<p>What I noticed straight away was that there were a lot of seemingly simple calls in our code that took a long time to execute. The reason for this was that the selectors were vague:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.myclass'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">somefunction</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>In order to find all the matches, even if there is only one, jQuery needs to traverse the entire DOM looking for any element that might have the matching class, and that takes time. By narrowing down the selector using, for instance, the type, jQuery can very quickly eliminate all other types. This speeds things up a lot.</p>
<p>The second incident was due to another &#8216;benefit&#8217; of being a tech lead. I tend to get passed the most peculiar and hard to diagnose bugs. The bug in question was on a page that contained two autocomplete text boxes, one of which was part of a compound control. The bug manifested itself by not being able to select an item from the second autocomplete text box properly. I was handed the bug with the information that it seemed to happen only when you selected from the first autocomplete control first. Needless to say, there was a lot of poking around in the code of both the autocomplete and the compound control, which is particularly complex given the nature of the control.</p>
<p>Thanks to <a href="http://www.getfirebug.com/">firebug</a>&#8216;s great console logging, I discovered that the variable that contained all the autocomplete list items seemed to be a combination of both controls. It was not too long before i discovered the code that caused the problem:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">    listitems <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.auto'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>There was nothing mysterious going on at all, jQuery was asked to select all of list items in both controls, so it did.</p>
<p>What had happened in both of these incidents is that I had failed to mention the importance of an accurate selector in jQuery during my crash course. The new developers were blissfully unaware of the consequences of not specifying <strong>exactly</strong> which elements you want jQuery to select. What I had also failed to emphasise was another way of narrowing down and speeding up the jQuery selection &#8211; by use of the elements that you already have. In the case of the autocomplete, we already had a reference to the list itself, so it was simple:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">   listitems <span style="color: #339933;">=</span> thelist.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This not only eliminated the cross-contamination of the two controls but seeded things up. So the rules to keep things fast and to save me headaches are simple:</p>
<ul>
<li>Use a selector that very accurately matches the elements you require</li>
<li>Utilise references to elements you already have</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.onemoretake.com/2009/03/18/the-importance-of-a-good-jquery-selector/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Easier Cross Browser Testing</title>
		<link>http://www.onemoretake.com/2009/02/25/easier-cross-browser-testing/</link>
		<comments>http://www.onemoretake.com/2009/02/25/easier-cross-browser-testing/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 06:29:40 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Testing]]></category>
		<category><![CDATA[Cross browser]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://www.onemoretake.com/?p=5</guid>
		<description><![CDATA[Every web developer will spend a sufficient chunk of their time testing and fixing webpages so that they work across as many browsers as possible. We all groan at the mention of IE6, which is here to stay for a little while yet, even with the various efforts to change that.]]></description>
			<content:encoded><![CDATA[<p>Every web developer will spend a sufficient chunk of their time testing and fixing webpages so that they work across as many browsers as possible. We all groan at the mention of IE6, which is here to stay for a little while yet, even with the <a href="http://www.stoplivinginthepast.com" target="_blank">various efforts</a> to change that.</p>
<p>I like to keep my computer as lean and mean as possible and installing all the browsers frustrates me. On top of that, one must keep an additional installation of XP as a virtual machine, just to test IE6. Don&#8217;t get me wrong, I cheered at the day that <a href="http://www.my-debugbar.com/wiki/IETester/HomePage">IE Tester</a> was released but unfortunately progress on that project is slow and bugs are large, so the virtual machine tends to win.</p>
<p>Today all that changed for me. I came across <a href="http://www.xenocode.com">Xenocode</a>, who are in the virtualization space. Instead of creating entire virtual machines, OS and all, Xenocode software allows you to create a virtual environment for a single piece of software. This means that everything that is required to run that piece of software is all neatly wrapped up in a bite-sized executable. So what does this mean? <a href="http://www.xenocode.com/browsers/">All the major browsers as single executables</a>. Awesome.</p>
<p>Just click on the browser you want, download the executable and run it. No more installing or virtual machines to clog up your machine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.onemoretake.com/2009/02/25/easier-cross-browser-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

