My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
QuestionsAndAnswers  
Common Robotium Questions & Answers
Featured
Updated Apr 11, 2012 by renasr...@gmail.com

How do I get started with Robotium?

Download the Robotium jar and add it to your test project's build path. For further instructions go to our getting started page. There you can download a tutorial as well as a test project that can be run through Eclipse.

Which versions of Android does Robotium support?

Robotium officially supports Android 1.6 and up.

Does Robotium support testing on real devices?

Yes it does. One just needs to connect the device to the computer and execute the tests as usual. There can be issues with some vendor customizations of Android, but many times it is possible to get around the incompatibilities by using other Robotium methods.

Which features does Robotium support?

Please download the Javadoc to see a full list of Robotium features. The Javadoc is a jar file that builds on the zip file format. If you do not know how to extract its content you can rename it to .zip instead and extract it with your favourite zip extraction tool.

Is it possible to write a test case that spans over 2 applications?

No, that is not possible. In the AndroidManifest.xml you state which target application you want to test. An example of what it can look like:

<instrumentation android:targetPackage="com.example.android.notepad" android:name="android.test.InstrumentationTestRunner" />

That means that the test project is locked to the targetPackage. Going outside of that target package is not allowed by the Android platform. Therefore you will need 2 test projects, one for each application.

Can I use Robotium if I only have the apk file?

Yes you can. You do not need to have the source code. More information is found here.

Can I use Robotium on pre-installed applications?

Yes you can if you have a rooted phone. More information is found here.

Can I use Robotium on flash and web applications?

No. Robotium will not be able to handle the flash or web components, it only works with android components. You could send in clicks by using clickOnScreen() or assert that a certain Activity is shown but that is all. You will not be able to write tests where you verify or work with the web or flash components.

Can I take screenshots from inside of Robotium?

No. To include this functionality an extra security tag will be required in the application under test (that allows of saving the screenshots). All who want to use Robotium would then be required to add that security permission tag to the AndroidManifest.xml of the application under test (even if they do not want to use that functionality). The Robotium users that do not have the possibility to add that security tag to the application under test would be unable to use Robotium. Thus it has not been included into the Robotium API.

How do I run Robotium tests from the command line?

By using this command:

adb shell am instrument -w com.android.foo/android.test.InstrumentationTestRunner

Where com.android.foo is the name of your test project's package. More on this can be found here.

Why do text and button clicks get wrong?

If this problem happens on one of the supported versions then try to add this tag to the test project's AndroidManifest.xml

<uses-sdk android:targetSdkVersion="YOUR_VERSION" /> 

Where YOUR_VERSION is 6 for Android 2.0, 7 for Android 2.1 and 8 for Android 2.2.

If that does not solve the problem then try to add this tag to the AndroidManifest.xml of the application you want to test:

<supports-screens android:anyDensity="true"/> 

If neither of these solutions solve your problems then write an issue report.

Can I test with localised strings?

Yes you can. You can use solo.getString() and in there pass in the resource id of the string that you want to use. You will need to have the source code of the application under test to access the strings.

How can I get code coverage for my Robotium tests?

You currently need to use ant (or for the perverse, the command line).

Because of security restrictions, you either need root access on the phone or to test in the emulator.

Here are the main steps

  • run android update test-project -m [path to target application] -p [path to the test folder I'd recommend running this in the root folder of the tests, so -p . You need to run this before you can run the ant coverage command
  • the Robotium jar needs to be in the libs folder of your test project. e.g. on my windows machine when I'm in the root of my test project I ran the following command copy \opensourceprojects\Robotium\downloads\robotium-solo-2.1.jar libs
  • ant needs to access to the class files, and libraries of the target application (which assumes you have the source for that application and the ability to build it). For the gist see http://stackoverflow.com/questions/2472059/cant-build-and-run-an-android-test-project-created-using-ant-create-test-projec I have included the extract of my build.xml file below.
  • run ant coverage
  • if all's well the output from ant will tell you a coverage.html has been created in a folder called coverage. You can open that file in a web browser to see the coverage of your Robotium tests :)

Here's the extract of my custom build.xml file.

<!-- override "compile" target in platform android_rules.xml to include tested app's external libraries -->
<target name="compile" depends="-resource-src, -aidl"
            description="Compiles project's .java files into .class files">
    <!-- If android rules are used for a test project, its classpath should include
         tested project's location -->
    <condition property="extensible.classpath"
                       value="${tested.project.dir}/bin/classes" else=".">
        <isset property="tested.project.dir" />
    </condition>
    <javac encoding="ascii" target="1.5" debug="true" extdirs=""
            destdir="${out.classes.absolute.dir}"
            bootclasspathref="android.target.classpath"
            verbose="${verbose}" classpath="${extensible.classpath}">
        <src path="${source.absolute.dir}" />
        <src path="${gen.absolute.dir}" />
        <classpath>
            <fileset dir="${tested.project.dir}/libs" includes="*.jar" />
            <fileset dir="${tested.project.dir}/bin/classes" includes="*.class" />
            <fileset dir="${external.libs.absolute.dir}/libs" includes="*.jar" />
        </classpath>
    </javac>
</target>

You should copy and paste this into the current build.xml file for the tests. I'd also recommend creating or editing the build.properties files in the root folders of the tests and the target application with emma.enabled=true

Comment by mike...@gmail.com, Oct 15, 2010

Any plans to produce a test-script interface to this, by which I mean one that takes input written as a text file, rather than Java source code ...

Comment by project member renasr...@gmail.com, Oct 15, 2010

No, that is not something that is in the pipeline right now.

Comment by plopa...@gmail.com, Oct 22, 2010

Is it possible to simulate clicking on soft keyboard using Robotium?

Comment by project member renasr...@gmail.com, Oct 25, 2010

No, but you can use enterText() to enter text into an EditText? field.

Comment by roberto....@gmail.com, Nov 9, 2010

Can Robotium interact with Status Bar Notifications - ie pull down the Notification area and click on a specified Notification?

Comment by project member renasr...@gmail.com, Nov 11, 2010

No that is not possible. You are restricted to one application. Please see:

Is it possible to write a test case that spans over 2 applications?

/Renas

Comment by mosa...@gmail.com, Nov 15, 2010

Could you add a wiki page that explains what would be necessary to get the screen shot feature implemented in your own app without it being included in the robotium jar ? Or could you provide an additional optional jar that would enable the feature?

Comment by artak...@gmail.com, Nov 21, 2010

Hello ! Is there any way to access to Android menu with help of Robotium framework ? I can't found any way to access to Android device menu ..( I want to programmatically select GPS activation line from menu ... Is it possible with Robotium ?

Comment by santus...@gmail.com, Dec 1, 2010

It worked perfect for me, the step by step "tutorial" was very help full. As a learning in installation, when you are told to run a cmd line to create your own certificate. 1) Delete the META_INF folder from with in the win-rar or other tools instead of extracting and re-pakaging to apk. This gave me few errors. 2) When you are asked to execute a cmd line to create cerificate, at ~\.android, give the whole path where the .android folder is located. Usually c:\Docc & Sett.\<Username>.. Hope this would help./. Thx San2

Comment by gbre...@riteh.hr, Dec 1, 2010

Hello! Is it possible to test font size and color background with Robotium? Thanks! :)

Comment by rajeshsi...@gmail.com, Dec 13, 2010

Hi.. This tool is really nice, Also Is there any solution to make use of Robotium for pre-installed applications like Dialer, Contacts, Messaging etc etc without pulling the .apk file and signing the apk again as this going to be huge work if we want to test all the pre installed apps on daily basis. Thanks..

Comment by project member renasr...@gmail.com, Dec 27, 2010

If you have resigned it once you do not need to do it again. If however you are testing on different devices what you could do is to create a script e.g bash script that will perform all the steps like adb pull, resign, and adb push. In that way you only need to run the script to prepare your devices.

Comment by suseenda...@gmail.com, Dec 29, 2010

can anybody help whether robotium can be integrated with Quality center??

Comment by jleid...@gmail.com, Jan 3, 2011

Is it possible to test android appwidgets with robotium?

Comment by project member renasr...@gmail.com, Jan 12, 2011

Robotium supports all standard Android views.

/Renas

Comment by jleid...@gmail.com, Jan 19, 2011

I don;t mean widget as in View object I want to test appwidgets (widgets on the user's homescreen). I would love to be able to do automatic integration tests for some homescreen widgets I'm working at at the moment. Is this possible with robotium?

Comment by project member renasr...@gmail.com, Feb 3, 2011

As long as it contains an Activity then you can use Robotium on it.

/Renas

Comment by yot...@gmail.com, Feb 10, 2011

Is there a way to classify togglebuttons which have same String? I found only one method, clickontooglebutton(String). This method couldn't distinguish togglebuttons having same name.

Comment by phanindr...@gmail.com, Feb 14, 2011

Renas

Do we have some kind of spy which can give the class of element in .apk file we have?

Comment by project member renasr...@gmail.com, Feb 15, 2011

You can always use clickOnText(String text, int matches) also for ToggleButtons?.

Use hierarchyviewer which is included in the SDK to get information on the application that is running.

Comment by testexpe...@gmail.com, Feb 15, 2011

Thanks for this great tool. One question: I need to enter text into TextView? fields that already contain text (replace). My text is appended to the existing text, though. Any way to set text (and not append it)?

Thanks and greetings from Switzerland, Stephan

Comment by project member renasr...@gmail.com, Feb 15, 2011

I am glad to hear that you like it. You can use clearEditText() to clear the field.

Comment by jingbo...@gmail.com, Feb 28, 2011

How to get the attributes of elements? e.g. there are some EditBox?, Buttons, Checkboxes ... but I don't know the index of a EditBox? to enter. how to manipulate a specific element in this case? Is there a file (may be XML) containing the definitions of UI elements so that I can script easier?

Comment by project member renasr...@gmail.com, Mar 1, 2011

If you use hierarchyviewer you will see which android components that do exist in a running application. If e.g. 3 buttons are shown then the first button has index 0, the second has index 1 and the third has index 2. Index is not the same as the resource id.

Comment by koretide...@gmail.com, Mar 1, 2011

I have known that sometimes Robotium has no chance to register a new activity . How can i do except using new activity as the start activity?

Comment by project member renasr...@gmail.com, Mar 3, 2011

If you use Solo solo = new Solo(getInstrumentation()); and then start the activity, Robotium will have time to register the new activity.

Comment by kasipre...@gmail.com, Mar 3, 2011

How do I know the coordinates for the unlock key to use solo.drag(...)?

Comment by nimesh.qa, Mar 7, 2011

Hi,

I have testcases which needs to open calculator and perform some actions (additions, multiplications).

How to automate below actions with robotium. 1. Open os calculator. 2. do click on few buttons ( 2 + 4 and = ) 3. Get output from edit box of calculator to verify with expected.

With Regards, NV

Comment by ginster....@gmail.com, Mar 9, 2011

is there any way to provide audio input using Robotium, eg, a voice input for search?

Comment by koretide...@gmail.com, Mar 9, 2011

Actibity B was launched by Activity A, with FlAG_ACTIVITY_FORWARD_RESULT.Then, Robotium will wait for user input in B,can not execute next command. By debuging, Robotium's internal activityMonitor's lastActivity is B at this moment. why and what can i do? Thanks a lot for your help.

Comment by project member renasr...@gmail.com, Mar 10, 2011

Please use the issue tracker if you suspect that you have found a defect.

http://code.google.com/p/robotium/issues/list

Comment by airv...@gmail.com, Mar 10, 2011

Does Robotium support Honeycomb? If not, is there a plan and timeline for supporting Honeycomb?

Comment by project member renasr...@gmail.com, Mar 10, 2011

Robotium does support Honeycomb.

Comment by cutekoal...@gmail.com, Mar 16, 2011

Hi, I am a fresh for robotium and have learned the demonstration to run cases. I would like to know whether there is a way to set run times, such as let edit contact for 50 times; or like call some body all night and interval is 10s. Also do you plan to create some testcases via robotium for normal features in android? and other fans can use these test cases do basic test round or update little. Thanks a lot

Comment by vijethhe...@gmail.com, Mar 27, 2011

Hi, I am a new bee to Robatium and found it very interesting and exciting. I have a small query, I want to run my Robatium code through cmd prompt and pass some data while running, this data should be used in my script. Is this possible? If yes then can you please help me with the cmd to do it, and also a code snippet which retrieves the data sent through the cmd prompt.

Thanks

Comment by xiaoyuwa...@hotmail.com, Apr 1, 2011

Hi, when the robotium can support to WebView?

Comment by project member renasr...@gmail.com, Apr 5, 2011

WebView? support is not something that is being worked on at the moment.

Comment by henrik.g...@gmail.com, Apr 12, 2011

Very good stuff. Thank you for the great effort. I was up and running in just hours. Now I am working on how to run the tests in Hudson.

Comment by mr.stevi...@gmail.com, Apr 21, 2011

Does code coverage work with maven also?

Comment by ninakhan...@gmail.com, Apr 21, 2011

Is it possible to click on the "MENU" to get access to "Settings" on the emulator from within my test class which refers an activity. How so? If not, how else can I click on Menu->Settings-> via robotium?

Comment by riley.ro...@gmail.com, Apr 22, 2011

It would be great if it was possible to create/initialise an AVD in setUp()

Comment by tgspa...@gmail.com, Apr 25, 2011

I have automated my application using robotium,but its only working with 2.1 and 2.2 AVDs,its not working with 2.3.1 or 2.3.3 AVDs.Can u please let me know what could be the problem? If the program is working in AVDs, does it mean that it will work in devices?

Comment by lillysug...@gmail.com, Apr 27, 2011

built-in "recovery" system is available in Robotium?

Comment by lillysug...@gmail.com, Apr 27, 2011

1. What capabilities does the tool provide to deal with unrecognized objects in a window? 2. Can we check font size, control size, and its bold / italic? 3. Any API is available to power-up and down through Robotium?

Comment by svtest1...@gmail.com, May 23, 2011

Can I have a test suite repeat itself after a specified time?

I need to test an application that sends messages between two clients.

The first client will sent a message to the second, the second one verifies that it got the message and replies after one hour.

I need this test case to repeat, lets say 24h.

Thanks

Comment by rohill...@gmail.com, May 24, 2011

I want to add a application uninstall in teardown. How can I do that in Robotium?

Comment by nisha.ti...@gmail.com, May 25, 2011

In my starting activity I am having ListView? and after clicking on each item in listView I am able to go to another activity but I am unable to find the button through solo.searchButton("text") neither I can click on that button.I can see that button on screen but test fails even assertCurrentActivity fails. Please help.Thanks a lot.

Comment by project member renasr...@gmail.com, May 30, 2011

It might not be a button. Use hierarchyviewer in order to see what types the different components are. Also, the activity opened must belong to the same application for Robotium to get access to its views.

Comment by ninakhan...@gmail.com, May 31, 2011

Hi, is it possible to run robotium from "command line on a REAL device"?

Comment by ninakhan...@gmail.com, May 31, 2011

Hi Renas, Is there a way to generate reports with robotium results when running from command line or eclipse?

Comment by hotdude...@gmail.com, Jun 13, 2011

Hi Renas ,

I'm not able to set my enviroment variable to re-sign the apk ..

i have set the env variables in the right way ..

what should i do to fix that

Comment by hotdude...@gmail.com, Jun 13, 2011

i got that fixed .. when i drag n drop the apk .. i get the following error now ..

ERROR: Cannot run program "D:\Android\andrid\sdk\tools;/tools/zipa;ign":CreateProcess? error=3, the system cannot find the path specified.

What am i suppose to do now ..

Comment by ijsa...@gmail.com, Jun 14, 2011

It doesn't spans over 2 applications, then does that can read the contacts and other related stuff present with the application to access ?

Comment by salman.g...@gamevstudios.com, Jun 22, 2011

As it supports functional testing of Android applications, my perception after reading all this stuff is tester should have knowledge of source code, all classes, all methods while writing Robotium code for testing. Can anybody provide input on this?

Comment by bkee...@gmail.com, Jun 22, 2011

Is there a way to test an app that's in the app store? Or would I need the code for the app?

Comment by sbaduk...@gmail.com, Jun 24, 2011

Hi Renas,

Could you please include an example on testing multiple activities in Robotium sample examples? Or if there is one, could you please provide the location of the example?

Also, the example on testing APK files is not running properly and gives Process crashed error. Could you please include a detailed and multifunctional example for testing apk files.

Thank you very much for this amazing tool... Sagar

Comment by bharathi...@gmail.com, Jun 29, 2011

Hi Renas, Whether robotium supports capturing log. because i tried with below code and added read log permission in manifest file but not working

process = Runtime.getRuntime().exec("/system/bin/logcat -c "); process = Runtime.getRuntime().exec("/system/bin/logcat -f " + logFile);

Please help me out.

Thanks,

Comment by bharathi...@gmail.com, Jul 1, 2011

Hi Renas,

We cann't execute any process on robotium.

Thanks,

Comment by ric.drum...@gmail.com, Jul 7, 2011

Hi,

I have an activity which processes some messages sent by a service. But when I'm running my test cases, it looks like I'm not giving it an opportunity to process them. What can I do?

Thanks in advance,

Ricardo

Comment by sanalbat...@gmail.com, Jul 14, 2011

how can i use testSuite? plz show one example....

Comment by niloy.c...@gmail.com, Jul 18, 2011

its cool. i love it !

Comment by 15810384...@139.com, Jul 21, 2011

Hi Renas, I failed to add a contact to a SIM card ,and I failed sometimes to send SMS by Robotium. How to solved them?

Comment by PhilippB...@gmail.com, Jul 21, 2011

Hi,

first of all, great product!

But, is there any possibility to set the TIMEOUT for Solo.waitForText() ? Solo.waitForActivity() has this possibility and the standard timeout 20sec is way to much for me.

regards

Comment by v.nivedi...@gmail.com, Jul 26, 2011

hi I m writing test cases for browser. so i m not able to pass the index in the method clickeditext(0); But its working for a feature in browser not for the other one.I m using excel to write the commands.

Comment by maan...@peel.com, Jul 27, 2011

Hi there,

Can robotium figure out if the device is tablet or handset? Because we have different apps for each device but most of the screens and setups are same. So, we are wondering if we can develop one test case and say that if its tablet take thse variables or else take another bunch of variables to execute on the device? Let me know if something like that is even possible.

Maanasa

Comment by project member renasr...@gmail.com, Aug 1, 2011

@Phillipp: It is possible to set timeout for all the waitFor methods.

@Maanasa: It is possible to check a number of things e.g. screen size and based on that information set the variables to appropriate values.

Comment by hurr.vop...@gmail.com, Aug 3, 2011

1- How to make a call with Robotium? <Project To be Tested has one screen with one button which opens the native dialer> <Consider I have written a test case extending ActivityInstrumentationTestCase2? > a) I run the test case b) I use onClickButton(Index) which takes me to Native Dialer (I have fired the intent) c) Enter Number (How to do it?) d) Press Dial (How to do it?) e) wait for a few seconds (e.g. 30 sec) f) Hangup with red Button (How to do it?)

How to automate this ?

Comment by project member renasr...@gmail.com, Aug 8, 2011

@Hurr Please see:

Is it possible to write a test case that spans over 2 applications?

Comment by agcadjan@gmail.com, Aug 11, 2011

Does Robotium support Jenkins? Thanks, AC

Comment by project member renasr...@gmail.com, Aug 22, 2011

@agcad: Yes Robotium supports Jenkins.

Comment by sfp75...@gmail.com, Aug 28, 2011

I downloaded a apk file form android market, and I wanted to use this file to test with robotium, and I had seen the "apk file step by step", and here's a problem I still can't resolve, I run the apk file as Android Junit Test, when the step goes to the "Collecting test information", then turns out "Test run failed: Instrumentation run failed due to 'Process crashed." I dont get it which aspect will let this issue occurs.

Comment by ngo...@gmail.com, Sep 11, 2011

I just want to say thanks to the Robotium Development team. This is a great tool and is very helpful for the Android developers and QA community. Great job and keep up on expanding the features.

I was able to use Maven and Robotium 2.4 to setup a test integration environment. Awesome.

One thing that could be a road block right now is the Webkit view inside the app that I'm testing. For the native portion of the app it's OK, but will Webkit features be included in Robotium?

Thanks!

Comment by project member renasr...@gmail.com, Sep 12, 2011

@ngondu: Glad to hear that it is working well for you! Right now there are no plans to add webkit features into Robotium.

Comment by malgaonk...@gmail.com, Sep 15, 2011

Using robotium is it possible to copy a file from phone/emulator to local system?

Comment by malgaonk...@gmail.com, Sep 15, 2011

Using robotium is it possible to run external script? for example while running a test case execute a command which will run a perl script from local machine.

Comment by derek110...@gmail.com, Sep 21, 2011

Is there any way to set timeout for each test method?

In Junit4, it supports setting timeout for each test method, but it seems that Android is using Junit3.x. So how to resolve this issue?

Comment by greenwoo...@gmail.com, Sep 26, 2011

Very promising framework which could really find a place in quality strategies.

Suggestions for the pipeline: To truly support acceptance testing BDD/TDD style consider integration with tools such as Fitnesse. This will be a challenge that is spoken about by Rick Mugridge here http://tech.groups.yahoo.com/group/fitnesse/message/17122.

Ryan

Comment by aluthek...@gmail.com, Sep 27, 2011

Hi This is for those who wonder why you cant click a Button near the Edit Text but can enter data to the Edit text. This happens because of the virtual Keyboard, just call solo.goback() after you enter the data and before you try to click on the button

Comment by slott.ha...@gmail.com, Oct 12, 2011

Have been getting this nasty error for some time: "Test run failed: Instrumentation run failed due to 'Process crashed.'"

As it turns out the reason for this is that I close my app from within my test scripts. Ie. I trigger the apps built in exit functionality. This causes the test runner to throw the following error: 10-12 10:16:47.935: ERROR/JavaBinder?(2370): Unknown binder error code. 0xfffffff7

which makes sense as the test runner expects to close the app for me :)

Perhaps this should be mentioned in the doc as I feel other people will make the same mistake as me while testing all buttons on there app - including the exit button.

Keep up the excellent work - Robotium rulez!

Comment by chandra....@gmail.com, Oct 18, 2011
I am implementind robotuim using junittestcases in my application .in application running time get the incomming call in this time drag call button in accept how can write the testcases accept and reject junit testcases in robotium please forward some suggestion

Comment by zhijunsh...@gmail.com, Nov 1, 2011

How to write the setUp() method if the activity under test depends on another activity, and the Application instance? thx a lot!

Comment by shwe...@gmail.com, Nov 9, 2011

Can we get code coverage using maven with the setup where the source is a seperate project and test is a seperate project ?

Comment by rajeshbi...@gmail.com, Nov 15, 2011

Can I run selenium android driver and robotium together? The application i am testing accesses some webpages. So I want to switch between robotium and android driver.

Comment by abhishek...@gmail.com, Nov 16, 2011

I am successfully run the example project on emulator . How to run same on Android device ? Please help

Comment by project member renasr...@gmail.com, Nov 16, 2011

You just connect your device, make sure that the drivers are installed and then run the test cases the exact same way as on the emulator.

Comment by gjian...@gmail.com, Jan 11, 2012

If I have multiple tabs how do I scroll it to that tab?

Comment by project member renasr...@gmail.com, Jan 18, 2012

@gjianhui, you click on the tab and then use scrollDown().

Comment by rush2san...@gmail.com, Jan 27, 2012

Does robotium log bugs directly to Quality Center Professional (or) Bugzilla?

Comment by gjian...@gmail.com, Jan 30, 2012

Hi I tried the method u suggested by clicking on the tab and do a solo.scrollDown(); However it will not scroll the tab horizontally it will only scroll down the page.

Comment by androidd...@gmail.com, Jan 31, 2012

Hi, is there a way to get coverage information when using "RobotiumForAPKFiles"? Thanks in advance Alex

Comment by jshiv.in...@gmail.com, Jan 31, 2012

Hi,

I am new user for robotium. it's really a good tool for android automation,i appreciate for grate affert for such a nice tool. i have couple of query which help me to work on Tablet machines using "Robotium" 1. is robotium support ICS 4.0 OS based. 2. Can we do the device based testing with robotium. is it support the device responce and there status like, a)Check Wi-Fi turn it on. b) Can we verify Wi-Fi Network and displays names of those it finds. 3. Can we Turn off / On Bluetooth using robotium. 4. Can we verify the Auto-rotate Screen and Animations

Please give your valuable responce Thanks for your support

Comment by eder...@gmail.com, Feb 1, 2012

I am using solo.clickOnButton ("Save"). The button on this screen, but it throws the error "Error clicking a button." I added the tags to the test project's AndroidManifest?.xml:

<uses-sdk android:targetSdkVersion="YOUR_VERSION" /> <supports-screens android:anyDensity="true"/>

What else can be done?

Comment by salvetti...@gmail.com, Feb 8, 2012

Help, I have a problem with Test ..... is robotium support ICS 4.0 OS based into Emulator?

Comment by project member renasr...@gmail.com, Feb 13, 2012

@Salvetti, Yes Robotium supports ICS.

@ederwyk, You have to add the tags to the application under test

Comment by reach2ab...@gmail.com, Feb 14, 2012

Hi Renas

Let me begin by thanking you for this amazing tool. I was wondering if there exists a way to run robotium tests in a disconnected mode. I have certain tests that have dependency on the charging/discharging state of the device. How can I proceed with my tests which require the device to be on battery (and not charging as when connected via USB) and capture test results.

Comment by project member renasr...@gmail.com, Feb 16, 2012

@reach2abhijeet, With the development tools application you can run your test cases directly from device.

Comment by markquie...@gmail.com, Mar 9, 2012

Can I execute my test without using command line or not connected to PC? Just using only my Android device.

Comment by malgaonk...@gmail.com, Mar 12, 2012

What is the difference between mobile testing using Selenium android drivers and Robotium?

Comment by akilir...@gmail.com, Mar 14, 2012

How do i perform a data driven testing using Robotium, meaning reading and writing data to a csv file or a spreadsheet. Thanks!

Comment by manidhar...@gmail.com, Mar 26, 2012

HI...I have one question..please suggest me ....

In my application there is an interaction with the server and data get displayed on one of the view which got from server.How to test and validate these kind of scenarios using robotium...Immediate reply would help me alot...please techies ...

Comment by wguizhou...@gmail.com, Mar 27, 2012

Does Robotium support apk(no source code) with multiple activities?

Comment by project member renasr...@gmail.com, Apr 5, 2012

@wguizhou2008, yes it does please see the wiki pages.

Comment by jie...@gmail.com, Apr 8, 2012

Hi, My application is based on android support package v4 which will purpose to support Fragment on at least Froyo. So does this robotium support android support package? Thanks a lot!

Comment by Jeanday2...@gmail.com, Apr 10, 2012

Hi Renasr, 1. Can Robotium support virtual keypad using solo???

Scenario: I need to enter name in textbox and tap on Done/Enter button of virtual keypad. This is the only way to add/save the name. 2. Can we do scheduling using this tool. 3. Can we handle device hard keys, like Home/Volume/Camera using Solo???

It would be great help if you could share the above.

Comment by pushpavi...@gmail.com, Apr 11, 2012

I have a set of test cases in robotium. I use the statement solo.clickOnMenuItem(solo.getString(R.string.quit))while on different screens of the app. The app does not really quit completely. It is running in the background. Performing the same action manually quits the app. What could be the reason? How do I program it to quit the app? Thanks.

Comment by a.lazare...@gmail.com, Apr 13, 2012

"Scenario: I need to enter name in textbox and tap on Done/Enter button of virtual keypad. " I have the same issue... I tried solo.sendKey(Solo.ENTER), but it clicked not on soft keyboard, but on emulator's. Does anyone know what to do??

Comment by innamuri...@gmail.com, Apr 23, 2012

Hi, Finally I found great tool works with Android Native apps. Thanks lot. is their any Default reporting Functionality in robotium?

Thanks in advance

Comment by Surhum...@gmail.com, May 1, 2012

Hey, i have a class which extends Edittext. Is there anyway to input text into that? for(EditText? edt: solo.getEditTexts()){ solo.enterText(edt, "string"); } Doesn't work. is there anyway to do this?

Comment by kataria....@gmail.com, May 18, 2012

My Activity class extends from FragmentActivity?. While using it with ActivityInstrumentationTestCase2?, I get this error - Bound mismatch: The type Activity(which is a FragmentActivity?) is not a valid substitute for the bounded parameter <T extends Activity> of the type ActivityInstrumentationTestCase2?<T>

Comment by jeannetr...@gmail.com, May 20, 2012

Could you please verify if the latest version of the ExampleTestProject??v3.2.1.zip is doing right tests? I follow all the steps but the test cases fail. I also tried to create the sample project of Calculator and the same situation occurs: fail. There is some step missing in these tutorials?

Comment by sucharuc...@gmail.com, May 24 (4 days ago)

when i execute my testing scripts of robotium on android with its APK file then it is not executing on android and it shows error due to "re-signed failed"...

bt when i try to re-sign.jar to assign signature for APK File and Open re-assign.jar file and drop the Application APK file then it shows re-signed successfully

So what i have to do..????

Comment by erchen...@gmail.com, May 25 (3 days ago)

I am having some serious issues and I can't tell if it is robotium or the structure of my app. I am trying to run Robotium on multiple activities testing each activity in a test file by itself. I also run multiple test on the activity in the file. I am going to see if I can make this as easy to understand cause it seems like there are some crazy things going on with this.

Test A runs 4 tests on Activity A. After it is finished with each test I wait for them to be idle. I kill the inactive and active activities to clean up the stack. The Test B runs and tries to run it's first test on Activity B. The first test starts the activity and then all of a sudden the last Activity A shows up in view. I checked the android lifecycle and all the test from A are being killed properly and all the B activities are being started and killed properly as well. I tried printing out the activities that SOLO has in it's list and it only shows one.

Hopefully that makes sense.


Sign in to add a comment
Powered by Google Project Hosting