<?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>Jayway Team Blog &#187; Renas Reda</title>
	<atom:link href="http://blog.jayway.com/author/renasreda/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jayway.com</link>
	<description>Sharing Experience</description>
	<lastBuildDate>Sat, 11 Feb 2012 10:33:02 +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>Robotium 3.0 &#8211; Stepping It Up!</title>
		<link>http://blog.jayway.com/2011/11/16/robotium-3-0-stepping-it-up-2/</link>
		<comments>http://blog.jayway.com/2011/11/16/robotium-3-0-stepping-it-up-2/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 08:15:56 +0000</pubDate>
		<dc:creator>Renas Reda</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[automated testing]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=10966</guid>
		<description><![CDATA[For those of you that do not know, Robotium is a test framework used for function and system tests of Android applications. With the release of Robotium 3.0, Robotium is now faster, lighter and more stable then ever! A tremendous amount of work has gone into modifying and improving more or less all the different [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you that do not know, Robotium is a test framework used for function and system tests of Android applications. With the release of Robotium 3.0, Robotium is now faster, lighter and more stable then ever! A tremendous amount of work has gone into modifying and improving more or less all the different portions of the code, making it the most stable version yet. </p>
<p>For me, the most important aspects of Robotium is first most that it is stable and that one can trust the results. Secondly, that it is easy enough to use for non-technical users. A user should not need to be technically inclined to use Robotium or it would have lost its purpose in helping a large user group who know how to write good test cases but lack a bit in the technical area.</p>
<p>Robotium uses a system of waiting for a component before trying to interact with it. The problem with UI testing compared to normal unit tests is that the UI is slow. When writing normal unit tests, the code gets executed in a fast pace by the CPU. That is not the case with the UI. Therefore, UI test cases that are developed without any kind of wait mechanism will sooner or later run into issues. With Robotium 3.0, two completely new waitFor methods have been implemented:</p>
<p><code></p>
<p>waitForView(View view)</p>
<p>waitForView(View view, int timeout, boolean scroll) </code></p>
<p>The various <code>waitFor()</code> methods available in Robotium are used automatically by the, is, get, click, search, scroll and assert methods. However it is always recommended to add additional waitFor calls in your test cases if they will be running on a slow computer or a slow hudson slave. An example of a waitFor method in Robotium that can be beneficial to use is <code>waitForActivity(String name)</code>. The purpose of it is to wait for a certain activity before continuing with the execution. To find out which activity that is active at the moment, you can always look at the log by using <code>adb logcat</code>.</p>
<p>One major change in Robotium 3.0 is that <code>finalize()</code> is now replaced with <code>finishOpenedActivities()</code>. Anyone that has used <code>finalize()</code> before in their <code>tearDown()</code> to close the activities that have been started will need to update their test cases.</p>
<p>If you have not tried Robotium before, I recommend you to first read the <a href="http://code.google.com/p/robotium/wiki/QuestionsAndAnswers">Question and Answers</a> wiki page.</p>
<p>For tutorials please go to the <a href="http://code.google.com/p/robotium/wiki/RobotiumTutorials">Robotium Tutorials</a> wiki page.</p>
<p>To download the javadoc and the latest release of Robotium please go to the <a href="http://code.google.com/p/robotium/downloads/list">Downloads</a> page.</p>
<p>I hope you will enjoy the new and improved Robotium!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2011/11/16/robotium-3-0-stepping-it-up-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The easy way to test Android applications</title>
		<link>http://blog.jayway.com/2010/01/28/the-easy-way-to-test-android-applications-2/</link>
		<comments>http://blog.jayway.com/2010/01/28/the-easy-way-to-test-android-applications-2/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 09:44:44 +0000</pubDate>
		<dc:creator>Renas Reda</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[automated testing]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[junit]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=4536</guid>
		<description><![CDATA[I’m going to guess that most of you know what instrumentation is. In the event that you don't, instrumentation is a feature in which specific monitoring of the interactions between an application and the system is made possible. Instrumentation also makes it possible to write test cases that interact with the application. The problem with [...]]]></description>
			<content:encoded><![CDATA[<p>I’m going to guess that most of you know what instrumentation is. In the event that you don't, instrumentation is a feature in which specific monitoring of the interactions between an application and the system is made possible. Instrumentation also makes it possible to write test cases that interact with the application. The problem with instrumentation, however, is that it is incredibly hard to write solid test cases for applications bigger than the typical “Hello World!” application. A tremendous amount of technical details must be taken into account in order to write a good test case. Often, developers quickly realize that it will take almost as long to write a comprehensive test case as it took to write the whole application. I, myself, came to recognize the very same thing when I first started looking into how to use instrumentation tests with the android application project that I’m currently working on.</p>
<p>I soon came to understand that I would not be able to take advantage of all the wonderful possibilities that instrumentation offers. The reason for that is quite simple; the application that we are in the process of developing is not only extensive but also complicated with multiple activities, self-defined intents, and hundreds of views that also include scrollable lists. It would not make sense for me to spend a month writing one single test case that would only take 20 seconds to test manually. That is how Robotium was born. I needed a test framework that would help me write good and powerful test cases that emulated real users. The test case should be able to do what a real user does: click on anything that is clickable, look for irregularities, automatically move from activity to activity, etc. More importantly, I should not have to spend more than 10 minutes writing a test case that involves more then one activity.</p>
<p>With the help of Robotium a test case spanning over multiple activities could look like this:</p>
<pre class="brush:java">public void testTextIsSaved() throws Exception {
   solo.clickOnText("Other");
   solo.clickOnButton("Edit");
   assertTrue(solo.searchText("Edit Window"));
   solo.enterText(0, "Some text for testing purposes")
   solo.clickOnButton("Save");
   assertTrue(solo.searchText("Changes have been made successfully"));
   solo.clickOnButton("Ok");
   assertTrue(solo.searchText("Some text for testing purposes"));
}
</pre>
<p>As you can see, I don’t have to specify any technical details or tell Robotium where to look for something, such as scrolling down a list when needed. It handles the above and more all on its own.</p>
<p>If you are interested in writing test cases of similar nature have a look at http://www.robotium.org. It makes writing powerful test cases a breeze.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2010/01/28/the-easy-way-to-test-android-applications-2/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>

