<?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>Test Automation Blog &#187; automation problems</title>
	<atom:link href="http://testautomationblog.com/tag/automation-problems/feed/" rel="self" type="application/rss+xml" />
	<link>http://testautomationblog.com</link>
	<description>On software test automation and quality assurance</description>
	<lastBuildDate>Sun, 16 May 2010 09:33:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Keyword-driven Automated Testing</title>
		<link>http://testautomationblog.com/2010/05/16/keyword-driven-automated-testing/</link>
		<comments>http://testautomationblog.com/2010/05/16/keyword-driven-automated-testing/#comments</comments>
		<pubDate>Sun, 16 May 2010 09:26:07 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[automation problems]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[jsystem]]></category>
		<category><![CDATA[keyword-driven]]></category>
		<category><![CDATA[QuickTest Professional]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[test management]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=225</guid>
		<description><![CDATA[Is it really possible for non-programmers to create automated tests?]]></description>
			<content:encoded><![CDATA[<p><em>Is it really possible for non-programmers to create automated tests?</em></p>
<p><img class="aligncenter size-full wp-image-228" title="Photo (c) Photo (c) Windell  Oskay" src="http://testautomationblog.com/wp-content/uploads/2010/05/keyword-driven1.jpg" alt="" width="395" height="342" /></p>
<p>Keyword-driven test design is a popular approach in testing teams in big corporations, where the skill levels of QA people are vastly different and most of them are not programmers. The problem of QA managers in such organizations who want to invest in test automation is how to best utilize their available resources. I think that now almost everyone realizes that <a href="http://testautomationblog.com/2009/03/16/record-playback-does-not-work/" target="_self">capture and replay tools fail</a> to create useful and reliable tests, so another approach is needed.</p>
<p>Keyword-driven frameworks rely on a library of small standalone reusable and parametrized building blocks, that represent simple and atomic actions of the application under test. Those are usually developed in a scripting language by the test automation developers. Then those building blocks (or keywords) can be used in some graphical or table-driven interface as reusable actions by testers to create automation without coding. In a way this is very similar to the action-word scripting approach that most automation tools provide (like QTP or the table view in the Selenium IDE).  The difference is that the keywords that the testing tools provide out of the box (usually things like '<em>click_button</em>' and '<em>type</em>' are both very generic (in the sense that they can be used in any application) and very narrow (in the sense that they do very small things like clicking a web button or typing text in a textbox). The successful keyword-driven approach requires keywords that are defined in the semantic level of the tested application (like for example '<em>login</em>' or '<em>register_user</em>').</p>
<p>Here is a quote from my favorite testing book<br />
<a href="http://www.amazon.com/gp/product/B000S1LVBS?ie=UTF8&amp;tag=testautoblog-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000S1LVBS">Lessons Learned in Software Testing: A Context-Driven Approach</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=testautoblog-20&amp;l=as2&amp;o=1&amp;a=B000S1LVBS" border="0" alt="" width="1" height="1" /></p>
<blockquote><p><em>“In contexts that require many nonprogrammers to create automated tests, we believe this is one of the better solutions One drawback of this approach is that you can't write a test unless supported keywords already exist for the tasks you require. Defining and implementing the task functions can become a major undertaking.”</em></p></blockquote>
<p>You can build such a framework in-house, using for example excel tables  to contain the test scripts with  the keywords and their parameters, or  try to use the keyword capabilities of some of the commercial tools on  the market (like the reusable actions in QTP). <a href="http://www.jsystemtest.org/" target="_blank">JSystem</a> is an  open source test automation framework oriented towards API testing that  can also interface with Selenium for creating  keyword-driven UI tests.</p>
<p>While keyword-driven sounds wonderful, it is not a magical methodology that will solve all automation problems and cure world hunger.  I worked on a keyword-driven project while I was an employee of a big corporation. We had an elaborate in-house tool, that could compose the keywords into larger blocks of actions, which were also reusable in tests. The project was a failure. The library of keywords became so huge that no one could figure out which keyword should be used in which context. The tool did not have control flow mechanisms. You could not do loops or if-then-else constructs, which  meant only very simple straightforward test scenarios were possible. The tests were breaking too often and the maintenance effort was higher in my opinion, compared with traditional scripting automation (if done well).</p>
<p>I would like to hear from you about your experiences with keyword-driven automation.</p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2010/05/16/keyword-driven-automated-testing/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The Hidden Firefox Profile in Selenium RC Server</title>
		<link>http://testautomationblog.com/2010/05/05/the-hidden-firefox-profile-in-selenium-rc-server/</link>
		<comments>http://testautomationblog.com/2010/05/05/the-hidden-firefox-profile-in-selenium-rc-server/#comments</comments>
		<pubDate>Wed, 05 May 2010 19:24:21 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[automation problems]]></category>
		<category><![CDATA[capture network traffic]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[firefox profile template]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=210</guid>
		<description><![CDATA[You might not know that Selenium provides a feature which allows you to capture the network traffic during a test. Another useful Selenium feature I use is the ability to start the RC server by providing a specific Firefox profile for running the tests. The problem is that those two features do not work together.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter size-full wp-image-222" title="Image (c) Arthur Caranta (Arthur40A)" src="http://testautomationblog.com/wp-content/uploads/2010/05/selenium_capture_network_traffic.jpg" alt="Image (c) Arthur Caranta (Arthur40A)" width="300" height="388" /></p>
<p>You might not know that Selenium provides a feature which allows you to capture the network traffic during a test. This might be handy in some cases - for example if you want to check the HTTP response headers returned by the server for some reason or to verify that a specific HTTP request is triggered during a test. I use it for example to verify that a web analytics request is properly triggered on a particular web page.<br />
To use this feature you must start your tests by providing a special option to the start method, i.e.  <strong>selenium.start("captureNetworkTraffic=true");</strong></p>
<p>Another useful Selenium feature I use is the ability to start the RC server by providing a specific Firefox profile for running the tests. Your normal Firefox settings are not used when running tests in <em>*chrome</em> mode. If you want to have a specific Firefox plugin active, or if for example you must use a proxy to access the tested pages, you have to use the <strong>-firefoxProfileTemplate</strong> setting when starting the Selenium server and provide the path to a custom Firefox profile folder that contains all the settings and plugins you want to use.</p>
<p>The problem is that those two features do not work together - when I use the captureNetworkTraffic=true option, I always get some generic Firefox profile and not the one I provide in the firefoxProfileTemplate parameter.</p>
<p>Here is my workaround for this problem. It turns out that inside the Selenium RC server jar there is a folder called <em>customProfileDirCUSTFFCHROME</em>, which contains the small generic firefox profile, used in this case and probably also in the case when you don't provide a custom Firefox profile.</p>
<p>If you want to capture the network traffic and still use a custom Firefox profile,  here  is how you can hack your selenium-server.jar to include a  custom profile.</p>
<ul>
<li>Extract the<em> customProfileDirCUSTFFCHROME</em> folder from selenium-server.jar</li>
<li>Close all Firefox processes. Start Firefox with the <em>-profilemanager</em> option.</li>
<li>Choose 'Create Profile' from the dialog that appears, click 'Choose Folder' and select the folder extracted  from the jar file.This way you will use the profile provided by selenium as a starting point. You can then make configuration changes, add plugins etc.</li>
<li>When you exit firefox, pack all the changed files from the extracted profile folder back into the jar file. Now selenium will always use your custom profile</li>
</ul>
<p>I tested this with Selenium 1.0.3. Works like a charm.</p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2010/05/05/the-hidden-firefox-profile-in-selenium-rc-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Selenium RC 1.0.3 &#8211; To Upgrade Or Not</title>
		<link>http://testautomationblog.com/2010/03/16/selenium-rc-1-0-3-to-upgrade-or-no/</link>
		<comments>http://testautomationblog.com/2010/03/16/selenium-rc-1-0-3-to-upgrade-or-no/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 18:27:09 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Test Tool Reviews]]></category>
		<category><![CDATA[automation problems]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=192</guid>
		<description><![CDATA[... my advise would be – If you have your tests running smoothly on 1.0.1 and you don't need Snow Leopard and/or FF 3.6 support yet, don't bother upgrading for now ...]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter size-full wp-image-197" title="selenium-automation" src="http://testautomationblog.com/wp-content/uploads/2010/03/selenium-automation.jpg" alt="Image (c) George Rex" width="308" height="410" /></p>
<p style="text-align: left;"><a href="http://testautomationblog.com/wp-content/uploads/2010/03/selenium-automation.jpg"><br />
</a>Having used the 1.0.3 version of Selenium RC for several weeks  I now have an overall impression of the new release. The thing that bugged me most was that the upgrade was not as smooth as I hoped  - several tests that previously worked fine with 1.0.1  started to fail with 1.0.3.  We were able to relatively quickly  find workarounds for what seem to be bugs introduced in the new release. Here are two links to the Selenium issue database  in case you run into the same or similar problems - <a href="http://code.google.com/p/selenium/issues/detail?id=400" target="_blank">400 </a>and <a href="http://code.google.com/p/selenium/issues/detail?id=408" target="_blank">408</a>; look for 'XHR ERROR' exceptions in your logs when opening URLs.</p>
<p style="text-align: left;">With the workarounds our tests became as stable as before – not better and not worse. The new version did not really bring any noticeable improvements for me – I have not yet moved to Firefox 3.6 and I am not a Mac user. So my advise would be – If you have your tests running smoothly on 1.0.1 and you don't need Snow Leopard and/or FF 3.6 support yet, don't bother upgrading for now.  There might be a new release on the horizon.</p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2010/03/16/selenium-rc-1-0-3-to-upgrade-or-no/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selecting Unnamed Pop-up Windows in Selenium</title>
		<link>http://testautomationblog.com/2009/10/08/selecting-unnamed-pop-up-windows-in-selenium/</link>
		<comments>http://testautomationblog.com/2009/10/08/selecting-unnamed-pop-up-windows-in-selenium/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 18:11:04 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[automation problems]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Pop-Up]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=133</guid>
		<description><![CDATA[If the application you are testing tends to open new browser windows using the target="_blank" technique, you might have some problems with Selenium.]]></description>
			<content:encoded><![CDATA[<p><em>If the application you are testing tends to open new browser windows using the target="_blank" technique, you might have some problems with Selenium.</em></p>
<p>One of the reasons I find <a href="http://seleniumhq.org/" target="_blank">Selenium</a> a great test automation tool for the web  is that it lets you easily run your test scripts on different browsers without too much effort. Most scripts will run smoothly on IE, Firefox and even on more exotic browsers like Safari, Opera and Chrome without needing browser-specific code or having to tweak the test for a particular browser.  One of the few areas where you are likely to face problems is the handling of pop-up windows.  If the application you are testing tends to open new browser windows using the <strong>target="_blank" </strong>technique, you might have some problems with Selenium. The standard <strong>.selectWindow()</strong> method provided by Selenium requires either a title of the pop-up window (which is often the same as the title of the main window) or a name or a variable name (which are both missing, when the window is opened using a target="_blank" link).</p>
<p>You will need a workaround to select such windows and unfortunately the workarounds do not always work the same for all browsers. The following code snippets might be useful if you run into the same problem. They are tested on the <strong>*chrome</strong> and <strong>*iehta</strong> Selenium modes (with Internet Explorer 7 and Firefox 3).</p>
<p>Here is how you can select the pop-up window which is opened after a target="_blank" link is clicked. This actually combines several hacks and workarounds, but works at the end (at least for me):</p>
<pre class="java">        <span style="color: #808080; font-style: italic;">//A hack to select unnamed pop-up windows</span>
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>browser.<span style="color: #006600;">equals</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;*iehta&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
            <span style="color: #808080; font-style: italic;">//Find out if Selenium substituted the blank target...</span>
            <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>selenium.<span style="color: #006600;">isElementPresent</span><span style="color: #66cc66;">&#40;</span>
                       <span style="color: #ff0000;">&quot;//a[starts-with(@target,'selenium_blank')]&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
                <span style="color: #808080; font-style: italic;">// ...and make it notice the new window on IE</span>
                selenium.<span style="color: #006600;">openWindow</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;&quot;</span>, selenium.<span style="color: #006600;">getAttribute</span><span style="color: #66cc66;">&#40;</span>
                      <span style="color: #ff0000;">&quot;//a[starts-with(@target,'selenium_blank')]@target&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> winNames = selenium.<span style="color: #006600;">getAllWindowNames</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #808080; font-style: italic;">//the last one is the pop-up window we want</span>
        selenium.<span style="color: #006600;">waitForPopUp</span><span style="color: #66cc66;">&#40;</span>winNames<span style="color: #66cc66;">&#91;</span>winNames.<span style="color: #006600;">length</span><span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#93;</span>, timeout<span style="color: #66cc66;">&#41;</span>;
        selenium.<span style="color: #006600;">selectWindow</span><span style="color: #66cc66;">&#40;</span>winNames<span style="color: #66cc66;">&#91;</span>winNames.<span style="color: #006600;">length</span><span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>And here is how you can go back to the main window after you finished working with the pop-up:</p>
<pre class="java">        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> winTitles = selenium.<span style="color: #006600;">getAllWindowTitles</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        selenium.<span style="color: #006600;">selectWindow</span><span style="color: #66cc66;">&#40;</span>winTitles<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</pre>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2009/10/08/selecting-unnamed-pop-up-windows-in-selenium/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Failed Automation Projects</title>
		<link>http://testautomationblog.com/2009/05/13/failed-automation-projects/</link>
		<comments>http://testautomationblog.com/2009/05/13/failed-automation-projects/#comments</comments>
		<pubDate>Wed, 13 May 2009 11:36:52 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[automation problems]]></category>
		<category><![CDATA[post-mortem]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=113</guid>
		<description><![CDATA["Do not automate buggy software."


I was thinking about the failed automation projects I’ve been involved in during the last few years and I seem to find a pattern. All those projects were very, very buggy. I realize now that you should only aim to automate functionality which is fairly stable, so that you do not [...]]]></description>
			<content:encoded><![CDATA[<p><em>"<span lang="EN">Do not automate buggy software."</span></em></p>
<div><span lang="EN"></span></div>
<p><span lang="EN"><span lang="EN"></p>
<p dir="ltr" align="left">I was thinking about the failed automation projects I’ve been involved in during the last few years and I seem to find a pattern. All those projects were very, very buggy. I realize now that you should only aim to automate functionality which is fairly stable, so that you do not expect to see a test failure in more than about 1 of 10 test runs. If you see that your tests are failing 50% of the time, then automation is not the cure for your problems. Try to find out why this is happening in the first place.</p>
<p> </p>
<p></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2009/05/13/failed-automation-projects/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Lesson 114 &#8211; Test tools are buggy</title>
		<link>http://testautomationblog.com/2009/04/09/lesson-114-test-tools-are-buggy/</link>
		<comments>http://testautomationblog.com/2009/04/09/lesson-114-test-tools-are-buggy/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 13:36:52 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[automation problems]]></category>
		<category><![CDATA[automation tools]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[TestPartner]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=69</guid>
		<description><![CDATA[I spend a lot of my time in test automation trying to find workarounds for issues with the tool. For me there are two kinds of bugs in the test tools - those you can find a workaround for and those you can not.
]]></description>
			<content:encoded><![CDATA[<p><em>"Testers</em> <em>get indignant when they realize that the quality tools purchased at a serious price are themselves full of bugs. Indeed, test tools are often buggier than comparable (but cheaper) development tools. Plan to test your tools and spend time finding workarounds for bugs."</em></p>
<p>The quote comes from one of the best books on software quality I have read - <a href="http://www.amazon.com/gp/product/0471081124?ie=UTF8&amp;tag=testautoblog-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0471081124">Lessons Learned in Software Testing</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=testautoblog-20&amp;l=as2&amp;o=1&amp;a=0471081124" border="0" alt="" width="1" height="1" />by <a href="http://www.satisfice.com/kaner/" target="_blank">Cem Kaner</a>, <a href="http://www.satisfice.com/blog/" target="_blank">James Bach</a> and  <a href="http://www.pettichord.com/" target="_blank">Bret Pettichord</a>.  Be sure to read it if you haven't already.<br />
I can not agree more with the authors. I spend a lot of my time in test automation trying to find workarounds for issues with the tool. Some of those issues can be considered 'functional idiosyncrasies', but most are just plain and simple bugs. During my work in the field of software quality I have noticed that users are normally quite tolerant of bugs, unless the bugs block them from doing their jobs. So for me there are two kinds of bugs in the test tools - those you can find a workaround for and those you can not.<br />
If the tool is flexible enough and you know how to use it, most of the time you can make it do what you want - like for example using keyboard shortcuts and the clipboard to read the text from an unsupported GUI control. This is one advantage of tools that offer the flexibility of a real programming language for scripting.<br />
There are also such things, for which you can not do much except waiting for the vendor to provide you a fix, and this can take long time. A few years ago I tried to upgrade to the latest TestPartner version (it was 5.2.3 back then). After the upgrade I found that all my automated scripts were causing random crashes in Internet Explorer. I just stayed with the old version until 5.6 came out, where this problem was fixed.</p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2009/04/09/lesson-114-test-tools-are-buggy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TestPartner 6 Review &#8211; Visual Tests Redux</title>
		<link>http://testautomationblog.com/2009/04/06/testpartner-review-visual-tests-redux/</link>
		<comments>http://testautomationblog.com/2009/04/06/testpartner-review-visual-tests-redux/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 11:24:51 +0000</pubDate>
		<dc:creator>TAB</dc:creator>
				<category><![CDATA[Test Tool Reviews]]></category>
		<category><![CDATA[automation problems]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[record and playback]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[TestPartner]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=60</guid>
		<description><![CDATA[I realized that I was not fair in my previous test,  as I used the last version of Firefox, which unfortunately is not officially supported by TestPartner. To give it a second chance I decided to repeat the test with Internet Explorer. ]]></description>
			<content:encoded><![CDATA[<p><em>Recording does not work, even with IE</em></p>
<p class="MsoNormal"> I realized that I was not fair in my <a href="http://testautomationblog.com/2009/04/03/testpartner-review-visual-tests/" target="_blank">previous test</a>,  as I used the last version of Firefox, which unfortunately is not officially supported by TestPartner. To give it a second chance, I decided to repeat the test with Internet Explorer.  I re-recorded the same scenario, but this time in IE and tried to replay it.</p>
<p class="MsoNormal"> I got a better result, but only slightly. The recorded script was able to log-in, but could not click the button to create a new mail:</p>
<div class="mceTemp mceIEcenter"><a href="http://testautomationblog.com/wp-content/uploads/2009/04/failed-in-ie.png"><img class="aligncenter size-full wp-image-62" title="failed-in-ie" src="http://testautomationblog.com/wp-content/uploads/2009/04/failed-in-ie.png" alt="failed-in-ie" width="506" height="76" /></a></div>
<p class="MsoNormal">The playback failed at step 12, where the tool tries to ‘Attach’ to an HTML frame, identified with ‘<em>Name=c36gxk9p2bo3a</em>’. Attaching to a UI control in TestPartner means simply declaring that the subsequent actions in the script will be executed within this control.  <em>c36gxk9p2bo3a</em> is a generated name which changes each time when you enter GMail.  This was the reason the script could not find the frame, when trying to replay.</p>
<p class="MsoNormal"> If I had to code this script by hand, I would omit this step altogether. Usually it is sufficient to only attach to the browser window and not to specific frames within it. Also, I would not locate the other controls by ID and screen coordinates as the recording did in steps 13 and 14. This will likely fail too, even if the problematic step 12 is fixed.</p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2009/04/06/testpartner-review-visual-tests-redux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Record/Playback Does Not Work&#8230;</title>
		<link>http://testautomationblog.com/2009/03/16/record-playback-does-not-work/</link>
		<comments>http://testautomationblog.com/2009/03/16/record-playback-does-not-work/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 21:59:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[automation problems]]></category>
		<category><![CDATA[automation tools]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[record and playback]]></category>
		<category><![CDATA[UI test automation]]></category>

		<guid isPermaLink="false">http://testautomationblog.com/?p=3</guid>
		<description><![CDATA[If you do not have any hands-on experience with test automation, you might miss a very important fact about the whole thing - it is not only about creating the  scripts. If you plan to do any serious automation, do not base the choice of your tool on how well it handles recording and playback. In my opinion writing test scripts using the scripting language (and doing it right) is the only way to make UI automation really work. ]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><em>Record/Playback does not work, but we all know this, don't we?</em></p>
<p><em><br />
</em></p>
<p><em><img class="aligncenter size-full wp-image-10" title="877158_old_tape" src="http://testautomationblog.com/wp-content/uploads/2009/03/877158_old_tape.jpg" alt="877158_old_tape" width="300" height="199" /></em></p>
<p>If you have ever had anything to do with UI test automation, you should know about recording.  It is an ability that most tools (commercial or open source) have - you start the recording session in the tool and then just happily click through the test scenario on the application you are testing.  Meanwhile the tool sits silently and records your actions, getting ready to replay them automatically when you want to. The ability to record the UI interactions is a marketing highlight for most automation tools. There are even some tools, where recording is the only way you can create test scripts.</p>
<p>On the surface it can really look like the best way to automate - you will be testing manually anyway,  so why don't just record your tests to replay them at a later stage? Unfortunately the view that test automation is something as simple as pressing the record button has spread widely, mostly fueled by the <a href="http://www.google.com/search?q=test+automation+without+programming" target="_blank">hype</a> of the tool vendors.</p>
<p>If you do not have any hands-on experience with test automation, you might miss a very important fact about the whole thing - it is not only about creating the  scripts.  In fact the actual script creation rarely takes more than 20-30% of the time you invest in automation. Here is a rough outline of all the things you have to do:</p>
<ul>
<li><strong>Prepare the test environment</strong><br />
With automation you want to have a very consistent environment, with known data and configuration, where you execute your tests. Sometimes this is not possible  - maybe  you have to test in a live system, or you don't control every part of the system landscape.  In such cases you can succeed only if you create smart automated tests that can anticipate and cope with all the expected changes in the environment. I will write more about this topic in the future, but for now let's just say that recording is not smart at all.</li>
<li><strong>Create the test scripts<br />
</strong> This is the actual thing that recording addresses. It might seem that it is a very efficient way of creating test scripts, however in reality it is not. You will make errors while recording (like misclicks or mistypings). Correcting those errors in recorded scripts is most often difficult or even impossible.  Also if you limit yourself to just repeating recorded sequences, you will not benefit from all the good things that automation can offer compared with manual testing (like data-driven tests for example).</li>
<li><strong>Execute the scripts</strong><br />
Or maybe I should say try to execute the scripts. My experience shows that unless you are testing something that has a very simple UI, recording tools often fail to create working scripts out of the box, even if you have managed to ensure absolutely consistent environment for the test execution. Recording lacks the intelligence to understand what you are doing and what your actual intentions are in a complex UI.</li>
<li><strong>Analyze the results</strong><br />
In case you are executing recorded scripts, you will be hoping desperately that they pass successfully. In case something goes wrong (which will be most of the time), you will have extremely hard time trying to understand if it was a bug in the product, an issue with the test script or maybe a change in the application UI.<br />
The time spent in analysis of test results is probably the greatest time-waster in test automation and you can optimize this only by having proper logging on a higher semantic level than UI interactions. Again this is something that I intend to write about.</li>
<li><strong>Update your scripts</strong><br />
Software changes and you will either have to adapt your tests or throw them away. With recording it is mostly about throwing away. It is true that most of the tools now provide some ways to cope with simple changes in the UI, but those are still very limited. For example if a caption of a button changes from 'New' to 'New...',  in most cases you will be able to adjust your scripts. With the good tools you will have to add the '...'  only in one place, no matter how many times you click the button in your test.  However,  imagine that this button is replaced by a context menu.  Most  tools will let you somehow change this in their recorded scripts, but you will have to do this change every single place where the button was clicked in your scenario. Most probably you will just want to re-record it from scratch.</li>
</ul>
<p>If you plan to do any serious automation, do not base the choice of your tool on how well it handles record and playback. In my opinion writing tests using the scripting language (and doing it right) is the only way to make UI automation really work.<br />
I find recording only useful when I am testing with a new UI technology or a new automation tool and I want to quickly find out how it recognizes  a particular UI control.  In such cases recording a few mouse clicks and then looking at the generated script can be useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://testautomationblog.com/2009/03/16/record-playback-does-not-work/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
