Questions tagged [robotium]

Robotium is an Android test automation framework that has full support for native and hybrid applications. Robotium makes it easy to write powerful and robust automatic black-box UI tests for Android applications. With the support of Robotium, test case developers can write function, system and user acceptance test scenarios, spanning multiple Android activities.

Robotium is a test framework that allows to implement white-box test cases for native Android applications. It supports black-box testing too (i.e. without source code and only when the apk file is available) as long as the apk file and the test project are signed with the same certificate signature.
To achieve this it might be required to resign the apk file. Consequently pre-installed applications can be tested on rooted phones as well.

The Robotium main class, Solo, provides methods to click or tap on a number of views identified by id, index or containing text strings, e.g.:

Solo solo = new Solo(getInstrumentation(), getActivity());
solo.clickOnText("Release rabit"); // Click on some text
solo.clickOnButton("Ok");          // Click on confirmation button

It also allows to assert that some message is currently displayed by GUI:

// Assert message is displayed
assertTrue(solo.searchText("Rabit is on the field")); 

It also provides methods to send key events, capture screen shots, wait for the named activity to appear and others.

993 questions
0
votes
1 answer

How to click on item list in other activity using robotium?

I have button in my application that opens android contact application for choose contact from list in other words I need to click on list item in other activity. How I can do it using robotium ? Thanks!
IgorOK
  • 1,652
  • 4
  • 18
  • 36
0
votes
4 answers

Toast is not shown android robotium test

I want to test "Add new item" activity in my application. When user fills data incorrectly and then press OK button - the toast (issues list) is displayed. My question is: How can I check that toast is not shown? Thanks!
IgorOK
  • 1,652
  • 4
  • 18
  • 36
0
votes
2 answers

Using resource Id's in Robotium

I'm using Robotium to do some automated testing on an OEM application and I am having trouble using the resource ID's. From what I understand, to use a resource id, you need to do something like this: ImageView imageView = (ImageView)…
BlackHatSamurai
  • 23,275
  • 22
  • 95
  • 156
0
votes
3 answers

Stop scrolling with Robotium

I am trying to verify the content of a large list using Robotium, and for some reason once the program gets to the bottom of the visible list, Robotium will start to scroll, and keep scrolling until it gets to the bottom of the list. Is there…
BlackHatSamurai
  • 23,275
  • 22
  • 95
  • 156
0
votes
1 answer

Every widget on android UI is a View object?

I read on SDk says that View represents the basic building block for user interface components. I'm wondering is dialog or preference can also be regarded as View object? Can I get all the widget on current activity by Robotium's getCurrentViews()…
Wei Yang
  • 895
  • 3
  • 15
  • 26
0
votes
2 answers

Dismissing splash screen using Robotium

I am using Robotium to automate Android UI. The app I am testing has a splash screen when it is launched and the screen is shown for x seconds. On tapping the screen before x seconds, the splash screen has to be dismissed. I have tried…
Bharat
  • 2,960
  • 2
  • 38
  • 57
0
votes
3 answers

how to test robotium test project apk file

i am using robotium to create a test project. Suppose my app name is MyApp and test project name is MyAppTest.i am giving both MyApp.apk and MyAppTest.apk to a QA tester (not giving the source code of app and test project). As per my knowledge…
andro-girl
  • 7,989
  • 22
  • 71
  • 94
0
votes
1 answer

calling functions in robotium

How robotium is calling functions written in the test class. I have written many functions in the test class. i dont want to call every functions . I just want to call some functions in some specific conditions. like we are doing in programming…
andro-girl
  • 7,989
  • 22
  • 71
  • 94
0
votes
1 answer

Drawing on the screen using solo

In my testcase I have to draw a line, or at least some points to imitate user's signature. Is there any way to do it, except of clicking on the screen by solo.clickOnScreen?
Ann
  • 475
  • 1
  • 5
  • 14
0
votes
1 answer

How to automatically test state of activities stack?

I would like to make sure that when a user presses a "close" button, he will not see the activity under test but a "home" screen. Using Robotium I can write e.g. @Override protected void setUp() throws Exception { solo = new…
mjaskowski
  • 1,479
  • 1
  • 12
  • 16
0
votes
4 answers

Robotium Get Text for the ListView

1: I have a List view as below: sort game play home How can we get all the Text of the above List either One by one or all in robotium. 2: Is there any way we are able to create a file in SDcard(Emulator). Please suggest a way.
user1279214
  • 1
  • 1
  • 3
0
votes
1 answer

Android robotium testing

I am very beginning in robotium and i can configure and run a very simole application with robotium.I need a some complex application code for robotium test.Kindly provide any link for this
user1099939
  • 146
  • 1
  • 6
0
votes
3 answers

Test run failed, Robotium

I have a test for my Android application, and it's running without problems. But when I added clickOnView for one button it failed after clicking, Like: Test run failed: Instrumentation run failed due to 'java.lang.OutOfMemoryError' bitmap size…
Ann
  • 475
  • 1
  • 5
  • 14
0
votes
2 answers

Robotium Button gone, but still returns true from searchtext?

Title is my problem. Heres my code: private void logout() { GridIconsView view = (GridIconsView) getActivity().findViewById( dk.lector.ao.mobile.R.id.GIV_settings); dragLeft(); solo.clickOnView(view); …
Anders Metnik
  • 6,096
  • 7
  • 40
  • 79
0
votes
0 answers

Robotium - setDatePicker() doesn't work with Android 4.0.4

I created a TestCase with Robotium about 2 months ago and it was working out great with Android 2.1, 2.3.3 and 2.3.6. But yesterday I updated my phone to 4.0.4 and now I'm having trouble setting a value in my DatePickerDialog. Before my recent…
Jean-Philippe Roy
  • 4,752
  • 3
  • 27
  • 41