views:

962

answers:

4

Hi All, I found a tool for Instrumentation Testing called Robotium.It is easy and simple for black box testing of android applications. We can use it as follows:

    solo.clickOnText("Other");
    solo.clickOnButton("Edit");
    assertTrue(solo.searchText("Edit Window"));
    solo.enterText(1, "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"));

Can any body have more idea about it? Can any one please tell how can we use it for webviews and listviews etc.

+8  A: 

Hi Samuel,

Please go to the Getting Started page: http://code.google.com/p/robotium/wiki/Getting_Started

There you will find an example test project that you download and look at for ideas. You can also download the javadoc from: http://code.google.com/p/robotium/downloads/list to see what functionality there is at the moment.

If you have any ideas of new functionality that you would want included in the API then please share that in our Robotium developer group: http://groups.google.com/group/robotium-developers

Sincerely, Renas

Renas
+1  A: 

searchText method also searches ListViews. You can use it together with assertions to ensure that your ListViews contain the right content

Sarp Centel
A: 

In order to click List. If your activity is ListActivity type you can use clickInList with one parameter which is the index of line that should be clicked. In other cases use clickInList with two parameters – listview screen index and line number. For WebView if you load a page you should use waitForText() mathod to check content.

more examples: http://bitbar.com/blog/54/automated-ui-testing-android-applications-robotium

michal
A: 

Hi I am very new to use eclipse and adroid UI testing

I want to do Blackbox testing on given apk file

But I have problem with using eclipse for creating Testproject

I have apk file now.

To create Testproject, What I should give in the place of existing Android project ???

Confusing because no idea of eclipse and Robotium

Please help me ....

Than you...

RAI