<?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>bemoko&#039;s blog on mobile &#187; mobile tester</title>
	<atom:link href="http://blog.bemoko.com/tag/mobile-tester/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bemoko.com</link>
	<description>mobile made simple</description>
	<lastBuildDate>Mon, 06 Feb 2012 10:19:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Automated Mobile Web Testing with Canoo Webtest &#8211; we&#8217;re impressed</title>
		<link>http://blog.bemoko.com/2009/07/01/automated-mobile-web-testing-with-canoo-webtest-were-impressed/</link>
		<comments>http://blog.bemoko.com/2009/07/01/automated-mobile-web-testing-with-canoo-webtest-were-impressed/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 15:38:04 +0000</pubDate>
		<dc:creator>Ian Homer</dc:creator>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[automated testing]]></category>
		<category><![CDATA[mobil test]]></category>
		<category><![CDATA[mobile device testing]]></category>
		<category><![CDATA[mobile phone test]]></category>
		<category><![CDATA[mobile tester]]></category>
		<category><![CDATA[mobile web]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://blog.bemoko.com/?p=496</guid>
		<description><![CDATA[Over the last couple of months we&#8217;ve started to use Canoo Webtest to functionally test our mobile web sites. We now use it for both product deployment cycles (we spin up a full version of bemokoLive and test a sample site prior to packaging up the platform) and site development. What has particular impressed us [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last couple of months we&#8217;ve started to use <a href="http://webtest.canoo.com/">Canoo Webtest</a> to functionally test our mobile web sites.  We now use it for both product deployment cycles (we spin up a full version of bemokoLive and test a sample site prior to packaging up the platform) and site development.</p>
<p>What has particular impressed us about Canoo is the way we can rapidly create clean and succinct tests that address all of the functional aspect of a mobile web site that we can need to automatically test.  There is a rich set of functions in Canoo to click around a site, interact with a page and test functionality and content of a page.  We write all our scripts in <a href="http://groovy.codehaus.org/">Groovy</a> which provides a language that is light on scaffolding syntax (i.e. code just what you want to do), allows us to dig into misc Java libraries as we choose and provides a functional language that is human readable (well to us techies).</p>
<p>For example, take the following test script:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
</pre></td><td class="code"><pre class="groovy" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #a1a100;">com.bemoko.webtest.live</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">com.bemoko.commons.test.webtest.BemokoWebtest</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">com.bemoko.commons.test.webtest.WebtestXmlParser</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">com.bemoko.live.devices.data.conf.HeroDevices</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">com.canoo.webtest.engine.StepFailedException</span>
&nbsp;
 <span style="color: #808080; font-style: italic;">/** 
  * Test that welcome pages are rendered correctly to the hero devices
  */</span>  
<span style="color: #000000; font-weight: bold;">class</span> PagesTest <span style="color: #000000; font-weight: bold;">extends</span> BemokoWebtest <span style="color: #66cc66;">&#123;</span>  
  <span style="color: #993333;">void</span> test<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">def</span> parser<span style="color: #66cc66;">=</span><span style="color: #000000; font-weight: bold;">new</span> WebtestXmlParser<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>    
&nbsp;
    <span style="color: #808080; font-style: italic;">// (1) Iterate over HeroDevices    </span>
    <span style="color: #000000; font-weight: bold;">new</span> HeroDevices<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">all</span>.<span style="color: #663399;">each</span> <span style="color: #66cc66;">&#123;</span> deviceData <span style="color: #66cc66;">-&gt;</span>
      webtest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;PageTests : ${profile} : ${deviceData.id}&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        config<span style="color: #66cc66;">&#40;</span>liveConfig<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> 
          deviceData.<span style="color: #006600;">evidence</span>.<span style="color: #663399;">each</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> 
            header<span style="color: #66cc66;">&#40;</span>name:it.<span style="color: #006600;">key</span>, value:it.<span style="color: #006600;">value</span><span style="color: #66cc66;">&#41;</span> 
          <span style="color: #66cc66;">&#125;</span> 
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;">// (2) Invoke the welcome page and verify some of the content</span>
        invoke <span style="color: #ff0000;">&quot;/welcome/i&quot;</span>, 
         description: <span style="color: #ff0000;">&quot;Index page : ${profile} : ${deviceData.id}&quot;</span>  
        verifyTitle <span style="color: #ff0000;">&quot;bemokoLive - i&quot;</span>
        verifyLinkedContent 
          xpath:<span style="color: #ff0000;">&quot;/html/head/link[@rel='stylesheet']/@href&quot;</span>, 
          accept:<span style="color: #ff0000;">&quot;text/css&quot;</span>
        verifyLinkedContent 
          xpath:<span style="color: #ff0000;">&quot;//img/@src | //input[@type='image']/@src&quot;</span>, 
          accept:<span style="color: #ff0000;">&quot;image/gif;image/png;image/jpeg&quot;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;">// (3) Validate document using an XML parser</span>
        groovy <span style="color: #66cc66;">&#123;</span> 
          parser.<span style="color: #006600;">parseText</span><span style="color: #66cc66;">&#40;</span><span style="color: #993399;">step</span>.<span style="color: #006600;">context</span>.<span style="color: #006600;">currentResponse</span>
            .<span style="color: #006600;">webResponse</span>.<span style="color: #006600;">contentAsString</span><span style="color: #66cc66;">&#41;</span> 
        <span style="color: #66cc66;">&#125;</span>
      <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>The bemokoLive test suite provides a collections of devices that allow you to easily simulate requests from particular devices. The HeroDevices class, in the script above, provides a collection of around 10 devices that provide a representative coverage of different types of devices. We (1) iterate over this collection and pass in the evidence for the device, i.e. the HTTP headers, into the webtest configuration. We then (2) invoke a particular page, test its title and verify that the linked content is good. Finally (3) we validate the document against the DTD in the document &#8211; great for making sure nothing bad has slipped into the page. </p>
<p>Reports get generated with a full break down on the tests and any step failures along with a quick summary, for example the following screen shot shows the summary of test run of 431 tests which we ran against one of our customer sites.  I&#8217;ve deliberately included a report with failures to make the summary a little more interesting:</p>
<p><img src="http://blog.bemoko.com/wp-content/uploads/2009/07/webtest-shadow.png" alt="Canoo mobile web test summary" title="webtest-shadow" width="393" height="186" class="size-full wp-image-502" /><br />
There&#8217;s much more you can do with canoo and the Groovy scripting approach &#8211; take a read of <a href="http://bemoko.com/wiki/Automated_Testing">automated testing</a> on our bemoko wiki for some more pointers.</p>
<p>With this approach we can build up a robust set of scripts that verify our deliver and provide great foundations for  our <a href="http://bemoko.com/wiki/Real_Device_Testing">real device testing</a> &#8211; no more burning time on real device testing dealing with functional issues that could have been caught earlier in development.  This is also good black box test, so whether you&#8217;re using bemokoLive or a.n.other approach it&#8217;s equally applicable.  If you&#8217;ve got a mobile web site that you want us to test, or help you get started to run this testing yourself just get in touch.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share and Enjoy:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.bemoko.com%2F2009%2F07%2F01%2Fautomated-mobile-web-testing-with-canoo-webtest-were-impressed%2F&amp;title=Automated%20Mobile%20Web%20Testing%20with%20Canoo%20Webtest%20-%20we%27re%20impressed&amp;bodytext=Over%20the%20last%20couple%20of%20months%20we%27ve%20started%20to%20use%20Canoo%20Webtest%20to%20functionally%20test%20our%20mobile%20web%20sites.%20%20We%20now%20use%20it%20for%20both%20product%20deployment%20cycles%20%28we%20spin%20up%20a%20full%20version%20of%20bemokoLive%20and%20test%20a%20sample%20site%20prior%20to%20packaging%20up%20the%20p" title="Digg"><img src="http://blog.bemoko.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fblog.bemoko.com%2F2009%2F07%2F01%2Fautomated-mobile-web-testing-with-canoo-webtest-were-impressed%2F" title="Sphinn"><img src="http://blog.bemoko.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fblog.bemoko.com%2F2009%2F07%2F01%2Fautomated-mobile-web-testing-with-canoo-webtest-were-impressed%2F&amp;title=Automated%20Mobile%20Web%20Testing%20with%20Canoo%20Webtest%20-%20we%27re%20impressed&amp;notes=Over%20the%20last%20couple%20of%20months%20we%27ve%20started%20to%20use%20Canoo%20Webtest%20to%20functionally%20test%20our%20mobile%20web%20sites.%20%20We%20now%20use%20it%20for%20both%20product%20deployment%20cycles%20%28we%20spin%20up%20a%20full%20version%20of%20bemokoLive%20and%20test%20a%20sample%20site%20prior%20to%20packaging%20up%20the%20p" title="del.icio.us"><img src="http://blog.bemoko.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.bemoko.com%2F2009%2F07%2F01%2Fautomated-mobile-web-testing-with-canoo-webtest-were-impressed%2F&amp;t=Automated%20Mobile%20Web%20Testing%20with%20Canoo%20Webtest%20-%20we%27re%20impressed" title="Facebook"><img src="http://blog.bemoko.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fblog.bemoko.com%2F2009%2F07%2F01%2Fautomated-mobile-web-testing-with-canoo-webtest-were-impressed%2F&amp;title=Automated%20Mobile%20Web%20Testing%20with%20Canoo%20Webtest%20-%20we%27re%20impressed" title="Mixx"><img src="http://blog.bemoko.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fblog.bemoko.com%2F2009%2F07%2F01%2Fautomated-mobile-web-testing-with-canoo-webtest-were-impressed%2F&amp;title=Automated%20Mobile%20Web%20Testing%20with%20Canoo%20Webtest%20-%20we%27re%20impressed&amp;annotation=Over%20the%20last%20couple%20of%20months%20we%27ve%20started%20to%20use%20Canoo%20Webtest%20to%20functionally%20test%20our%20mobile%20web%20sites.%20%20We%20now%20use%20it%20for%20both%20product%20deployment%20cycles%20%28we%20spin%20up%20a%20full%20version%20of%20bemokoLive%20and%20test%20a%20sample%20site%20prior%20to%20packaging%20up%20the%20p" title="Google Bookmarks"><img src="http://blog.bemoko.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.bemoko.com/2009/07/01/automated-mobile-web-testing-with-canoo-webtest-were-impressed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

