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
6
votes
1 answer

Robotium - customize PAUSE duration in Sleeper class

waitForCondition() on the Solo class in Robotium uses a Sleeper object to sleep a thread in between checking for a condition. The Sleeper class has a PAUSE defined as 500 milliseconds. I want to lower that, ideally without downloading the Robotium…
Mark
  • 7,306
  • 8
  • 45
  • 87
6
votes
3 answers

Instrumentation test fail randomly with multidexing enabled

In my android app I have multidexing enabled. The app runs fine on emulators. I am using robotium for testing the app. But when I execute instrumentation test cases, sometimes the test passes, but mostly they also fail after system reboot. There is…
6
votes
1 answer

Is Robotium reliable for testing how fast activities and fragments start?

I'm trying to write black box automated tests to assert things like "ensure the landing page appears within 500ms of launching the app" and "ensure that a login takes less than 2 seconds". I want to do this by driving the UI of the real app, to…
Dan J
  • 25,433
  • 17
  • 100
  • 173
6
votes
2 answers

security exception while testing wifi on robotium

I am currently working on android testing with Robotium , When i execute following testcase in Android 2.3 emulator i'm getting an error " java.lang.SecurityException:WifiService: Neither user 10038 nor current process has…
Valamburi Nadhan
  • 229
  • 1
  • 2
  • 11
6
votes
2 answers

How to test two activities with Robotium

I'm testing my Android application with Robotium and I'm facing one intermittent problem. My application starts with a SigninActivity which allows the user to signin and after that he is directed to the second activity which has a list that is…
Raphael Oliveira
  • 7,751
  • 5
  • 47
  • 55
6
votes
1 answer

How Can I run a Test Script written in Robotium in to a device cloud?

I would like to know is it possible to run my script written in Robotium to work in a device cloud like Perfectomobile or Device anywhere. Thanks in advance.
Pramod
  • 3,217
  • 3
  • 20
  • 26
6
votes
2 answers

robotium - clicking on action bar tabs

I'm finishing up moving to the actionbar (using actionbarsherlock), and one of the last things is to convert all the robotium integration tests. Clicking on action bar action items seems to be solved, however I cannot figure out how to click on…
yincrash
  • 6,394
  • 1
  • 39
  • 41
6
votes
1 answer

How to automatically test that applications behaves like expected with regard to other activities?

I have an application that launches an activity right after a call ends. I would like to write an automatic test that makes sure that: it actually launches if some other activity pops up after my activity got activated (e.g. yet another call or…
mjaskowski
  • 1,479
  • 1
  • 12
  • 16
5
votes
2 answers

Android Testing - Issue with ActivityInstrumentationTestCase2?

I am running UIAutomation for android using Robotium and ActivityInstrumentationTestCase2. I have a test suite with 5 tests. Sometimes my test randomly crash because a test starts, once the previous test has not ended yet. Is there a way to avoid…
aryaxt
  • 76,198
  • 92
  • 293
  • 442
5
votes
1 answer

Android Robotium - How to manage the execution order of testcases?

I am trying to use Robotium to automate the testing of an application. The test cases were documented and they are supposed to be test in specific order. But it seems that Junit run the tests in alphabetic order.. how do I rearrange the order of…
Han
  • 620
  • 2
  • 10
  • 22
5
votes
1 answer

Unable to take screenshot on android using robotium and private method

i have been trying to get a screenshot lately but every thing in vain the folders are created in android emulator with api level 8. i have mentioned the code below. In the this code Method takeScreenShot() is supposed to create a directory and store…
Daniel Euchar
  • 1,740
  • 5
  • 28
  • 45
5
votes
2 answers

Do you know any dynamic instrumentation tool for Android with multi-device support (ideally in Python or Jython)?

For my CI infrastrucure I need to automatically deploy and run complex tests between two (or more) android phones from a controler machine (linux). So far android monkeyrunner in combination with android unit tests is not a satisfactory…
5
votes
7 answers

BDD Android UI testing framework?

I'm looking at using Frank for UI testing our iOS application(s). Is there a similar library with support for Android? I'm currently using Robotium, but thought it would be nice to be able to specify tests in the same format across both…
Valdis R
  • 2,095
  • 1
  • 18
  • 36
5
votes
6 answers

How to generate test result report using robotium?

I have been using robotium to test my android application.Testing was successful but i want to know that is there any way to view test results in a separate file.
user594720
  • 449
  • 3
  • 9
  • 18
5
votes
2 answers

Robotium: Please install a compatible Android API level (15 or higher)

Trying to run a new robotium test I get this error. Does anyone know how to fix it? I've all the APIs needed. (15 and a lot of higher APIs). What am I missing? This is part of my gradle file: android { compileSdkVersion 25 buildToolsVersion…
Filnik
  • 352
  • 1
  • 12
  • 33