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
4 answers

not getting control of new activity started from another activity in android

I am launching settings page with following code Intent intent = new Intent(android.provider.Settings.ACTION_DATE_SETTINGS); and then trying to get the text using ArrayList textLists =…
0
votes
1 answer

Android Robotium Test for Non activity class

Can anyone tell me how can I write Robotium tests for non activity classes? I have seen lot of example for activity classes but not for non activity classes. Is it possible? Thank You.
quad
  • 872
  • 3
  • 17
  • 37
0
votes
1 answer

OutOfMemory exception while running robotium test suite in Android

I am running robotium test suite for my android application using maven, but I am running into Java:out of memory exception, though when I am trying to run the test files individually they run fine. I tried analysing the heap dump using MAT and it…
Mayank
  • 15
  • 2
  • 5
0
votes
4 answers

Robotium: let Solo click on DatePicker in localized build

I am performing a click on the "Set"-button in a DatePickerDialog with Robotium via solo.clickOnButton("Set"); If I now change the language of the testing device to a different language, Robotium is not able to find the button, as the text is not…
Micky
  • 5,578
  • 7
  • 31
  • 55
0
votes
1 answer

i cannot run my test case with robotium

i have .apk file and i want to test it using robotiun and i have followed the procedure but when i run the app using junit test i am getting an error as Test run failed: Instrumentation run failed due to 'Process crashed.' This is my…
Abhinai
  • 1,082
  • 2
  • 13
  • 20
0
votes
1 answer

Testing second application from first application using robotium

I have an application which is tested using robotium. All the features of the application is tested properly. Finaly this application plays a particular content using media player. The media player is a second application. So while playing i am not…
Hari
  • 1
0
votes
1 answer

Updating Robotium .jar file

I have been using Robotium 3.3, but saw that a method has been added about a week ago, that will allow the user to input a name for any screenshots that are taken using solo.takeScreenshot(String name), however, I'm not sure how to get this method…
BlackHatSamurai
  • 23,275
  • 22
  • 95
  • 156
0
votes
2 answers

can I create a method that returns an array of bufferedwriters

I am writing a test program and in it I write the results to 2 different files. 1 file for the specific test and 1 file that keeps a running total of the all the results. Rather than writing the logic out for each of the 20 tests that I have, I…
BlackHatSamurai
  • 23,275
  • 22
  • 95
  • 156
0
votes
1 answer

Type of image indexes

I'm using Robotium to test Android apk file. I have a problem with images. When I want to tap on the image I usually use the index of image like this solo.clickOnImage(1); But when this test runs several times, sometime different images are opens…
0
votes
1 answer

I need Help for Roboium Methods

How to use getAllOpenedActivities(), getActivityMonitor(), setActivityOrientation(), getButton(); getCurrentButton(), methods? I'am new for Robotium even i dont know how to use any get method, Please anyone help me to explain with example. It'll…
0
votes
2 answers

"Resetting" Robotium searchText

I have a unique situation here. I am testing an app using Robotium and I am doing this under "black box" conditions. In my test, I have a tab titled 'all' and it is at the top of the screen, and I want to test that when it is clicked, all the…
BlackHatSamurai
  • 23,275
  • 22
  • 95
  • 156
0
votes
3 answers

Robotium waitForView to disappear?

I'm using robotium 3.1 and I'd like to wait for a view to disappear, is there some way I can do that easily? My current way involves a ugly busy-loop with sleeps that makes no one happy. To clarify what I'd like to happen: waitForView() //The…
Ragshi
  • 48
  • 5
0
votes
2 answers

Why I don't see record in database from my test project?

Hї! I have wrote test for my application. I need add item to database throught UI interface (using robotium) and then I want to check if item exists in database using SQLiteDatabase. Item is added succesfully (I see new record in database after test…
IgorOK
  • 1,652
  • 4
  • 18
  • 36
0
votes
1 answer

pull path of the screen image

I'm trying to pull the path of a screen image I'm looking at on the android phone of the app im testing. The app shows various pictures. I want to pull the path of the picture to pull the picture name, but have no clue how to start. Any guidance?…
LiLi Liu
  • 37
  • 3
  • 11
0
votes
4 answers

Robotium: Getting back to activity under test

I writing test cases for Android apps using Robotium. One of my test cases opens a file (e.g., an image) which causes the opening of another activity from another app to display the image. This far, everythings fine. However, afterwards, I want to…
Claas Wilke
  • 1,951
  • 1
  • 18
  • 29