The Android testing framework
2
votes
2answers
55 views
What to do to ignore test case in Android?
Hi i just worked on roblectric test cases where we can use @Ignore to ignore the test cases My question is what we can do in case of android unit test cases for AndroidTestCase instrumentation ...
1
vote
2answers
37 views
Ant build failed: uibuild.xml: 198 null returned: 1
Please refer this
I am having the same problem. This can as per the SO terminology a duplicate but the answer over there does not solve my problem.
Instead of downvoting, please ask if you need me ...
1
vote
0answers
33 views
Android alpha testing “Item not found”
I have published my app for alpha testing, but not able to download it from play store.
I have opened the url "https://play.google.com/apps/testing/com.*" and accepted to be a tester and now it ...
1
vote
1answer
47 views
Robospice-retrofit testing
I'm trying to do some unit-testing using this robospice-retofit example. The problem is i got some NullPointerException when I call the loadDataFromNetwork() method. Here's the testing code
public ...
0
votes
0answers
36 views
How to Add Permissions to AndroidManifest.xml for Tests
The docs state:
As mentioned previously, next to the main sourceSet is the androidTest sourceSet, located by default in src/androidTest/
....
The sourceSet should not contain an ...
0
votes
1answer
46 views
Error: “Test class not found in selected project”
I am testing a simple application. When i start JUnit testing, although i get test run finished, I am not getting any result. Pop up menu showing "Test Class not found". Could anyone fix this?
Stack ...
2
votes
1answer
277 views
Using Espresso how do i check the number of items in my alert Dialog
I have an alert dialog that displays a number of items.
private String[] choices; // populated externally
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
...
0
votes
0answers
8 views
Android Test Project running from command line not uploading the project.apk onto device
One of my testcase reads data from excel. When I run from ADT eclipse it is taking the updated value. The same testcase I run from commandline it is taking the old value
PFB the command used to run ...
2
votes
1answer
19 views
How can I have unit and functional tests for my android independent calsses without needing a device?
I am developing an android app and I want to be able to test the android independent classes (which basically contain my logic) using junit without needing a device. The question is that is it ...
-3
votes
0answers
14 views
how to crawl data from the GUI components in an android application?
I want to extract the data from the android mobile application like all the data that can be seen by the user. Is there any tool to extract all the data(text) from all the activities of an android ...
2
votes
2answers
2k views
Integrating uiautomator test case with application code in Android
I am using Eclipse IDE.
Here is my code for uiautomator testcase:
public class caltest extends UiAutomatorTestCase {
public void testDemo() throws UiObjectNotFoundException, IOException {
...
1
vote
1answer
25 views
Robotuim setDatePicker() picking current day's date only
This is my code;
solo.clickOnEditText(0);
solo.setDatePicker(null, 2014, 8, 8);
solo.clickOnText("Done");
No matter what parameters I give, the date picker keeps returning the current days date. ...
0
votes
1answer
14 views
Test android application onn samsung galaxy grand
I am using ubuntu 14.04 os and i have adt bundle for 64 bit. How can i test the android application which is created in these adt on samsung galaxy grand?
4
votes
0answers
64 views
How to automate upgrade testing for android
We have been using espresso for android automation, and that includes upgrade testing
For upgrade testing, we need to perform 3 steps:
Make some actions in the old version to prepare some data
...
2
votes
2answers
138 views
How to run Uiautomator tests in to multiple devices?
I am trying to Uiautomator android Ui tests in a .bat file. but i could not able them run parallelly.
Here is my execution flow and have connected 3 devices
-> adb devices XXXX XXXX XXXX
-> adb ...
1
vote
1answer
181 views
Android Studio(0.2.0) Unit test No output on logcat
When I write a unit test on Android Studio(0.2.0) with some log output, but alfter I ran it , there are no logs except
09-13 11:16:39.747 20963-20978/com.wanshangle I/TestRunner: started: ...
3
votes
1answer
138 views
Dagger & Android - race conditions in tests?
I am using Dagger to inject dependencies into activities in an Android project. All of the providers are kept in one module which is stored and managed by the Application subclass. Activities inject ...
0
votes
1answer
59 views
how to run multiple test cases in appium with testNG+Java?
i am selenium test automation developer and recently started to develop test cases for mobile automation using appium. i want to run 2 test cases consecutively from my testng.xml but it is running ...
1
vote
2answers
56 views
How to use robotium to check if an action bar menu item is present
I have some menu items in an ActionBar that are modified dynamically (for example, if the user logs in, I remove the 'login' menu item and replace it with a 'logout' item, etc).
So basically I'm ...
1
vote
3answers
158 views
How to automate the DDMS snapshot mechanism?
Does Android DDMS provide APIs ? I need to automate the snapshot mechanism for the native heap. Or is there any post processing tool for analysis DDMS native heap snapshots.
0
votes
1answer
27 views
Android - Espresso - longClick is (still) available?
My first impression is that Espresso helps tremenduously in automatic testing of Android Apps. Great! Thank you Google (employees).
What about the longClick() - is it still available as an ...
0
votes
1answer
22 views
can public contextmenu test still be done?
Part of the Google Espresso code is the Menutest. You can find it Espresso menutest.
In this test you will see:
public void testContextMenu() {
...
1
vote
1answer
158 views
Espresso Test freezes when Use Host GPU is enabled
I have a series of Espresso tests that test a slide menu. The majority of the tests fail when Use Host GPU is turned on, but not when it is disabled. Even though I have disabled animations, I think I ...
0
votes
1answer
46 views
Unable to find Unable to find method '$$robo$getData' in com.example.trial.myapplication.MyActivity with parameter type(s) []
I recently started looking at using the Robolectric gradle plugin to test one of my applications. The plugin itself is easy to setup in the project into the project, but I keep hitting the same error ...
0
votes
1answer
31 views
Suggestion with tool selection for load, concurrent user testing [closed]
I have to test windows 8.1 app for tablet. App has to be tested for nearly 1500 users. Technical description: Image file between 2-20 mb will be uploaded and downloaded. With increasing number of user ...
4
votes
2answers
210 views
Android Instrumentation HOME button
Any idea why sending the HOME key to an application running under Instrumentation does nothing?
import android.app.Instrumentation;
import android.view.KeyEvent;
public class MyInstrumentation ...
0
votes
2answers
491 views
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 ...
1
vote
0answers
27 views
Chrome Inspect Element for Native Browser(not Android Chrome) on Android 4.2 Device
I have a issue that comes only on the Native "Browser"(not chrome) if the Android 4.2.
Now, The rendering of my page in Native"browser"App(in some Android systems it is "Internet"), is very different ...
0
votes
0answers
56 views
dexDebugTest fails with DexException “Cannot merge new index” for test
I'm building an android project with gradle that leverages Google Espresso (much thanks to Jake Wharton's double espresso). With my build.gradle configuration I can successfully build debug and ...
0
votes
0answers
32 views
Testing an Activitys WebView using Robolectric, not loading page
I'm trying to test out some content in a WebView using Robolectric, however there is no data coming into it.
I have called the following before loadUrl() on the WebView.
...
1
vote
0answers
25 views
Inferred type error when calling Robolectric.buildActivity()
I am using robolectric 2.2.
I am trying out following example code from the Robolectric project:
@RunWith(RobolectricTestRunner.class)
public class RoboTest {
@Test
public void test() {
...
3
votes
4answers
163 views
How do I create an Android Test Module in IntelliJ 13 for a Gradle Android project?
I have successfully create a Android project in IntelliJ 13 and I want to setup the Android Testing Framework. I used the new project wizard to create the android project using Gradle. When I go to ...
0
votes
0answers
21 views
How to print all exceptions in Android test
I just ran into a problem and spent more than one hour to figure out what's happened.
My testing code was
public MyTest extends AndroidTestCase {
public void testMyMethod throws ...
5
votes
1answer
2k views
How to fill in password EditText with Android uiautomator?
Is it possible for the uiautomator to select a password EditText? I have no problem finding other EditText views by their android:hint property, but the uiautomatorviewer shows all password fields as ...
2
votes
1answer
2k views
How to input commands to CTS-Tradefed?
I'm currently trying to automate few steps in android ICS CTS.
When we execute ./cts-tradefed we get cts-tf > prompt.
then I am able to enter run cts --plan CTS
then exit command to exit from ...
0
votes
0answers
36 views
Robotium + Monkeyrunner
I try to test an app. I started with Robotium. But it can’t work with different applications in one test. My application call native Camera and Robotium can't “see” it and press any buttons there.
I ...
-1
votes
2answers
80 views
How to use MonkeyRunner and Robotium together (not separately!)
How to use MonkeyRunner and Robotium together (not separately!) for testing my Android app
2
votes
1answer
1k views
Espresso - Asserting a TextView with async loaded data
I'm writing a UI test with Google Espresso for Android and I'm stuck on how to assert a TextView text, which content is asynchronously loaded from a web service. My current code is:
public class ...
0
votes
1answer
29 views
How to run testcases in frameworks/base/core/tests/coretests
I want to run some of the testcases inside frameworks/base/core/tests/coretests. For example, I want to run "VirtualDisplayTest" in frameworks/base/core/tests/coretests/src/android/hardware/display/ . ...
8
votes
2answers
10k views
Test run failed: Instrumentation run failed due to 'java.lang.ClassNotFoundException'
This is my first time setting up an android test project to test a android project.
I've created a very basic test case which I'm trying to get to run, however what I have does not run. I get a Test ...
1
vote
1answer
207 views
Error when testing Robolectric on Android Studio
I have a running project on android studio 0.8.1 and gradle that runs without any problem, but if I try to run some tests in my project I get the following error:
Error:Execution failed for task ...
0
votes
1answer
8 views
android imports cant be resolved in a test project
Hi Im trying to import the demo test project from google at http://developer.android.com/training/activity-testing/activity-functional-testing.html, But the following imports can't be resolver
...
1
vote
0answers
22 views
How can I run a single test with gradle android
I'm trying to run the tests with this line... but this launches all tests:
./gradlew -DconnectedAndroidTest.single=LandingActivityTests connectedAndroidTest
How can I launch a single test?
0
votes
2answers
43 views
Android Testing: Inflate and Display a custom Toast from Instrumentation
I am trying to display a custom Toast but doing so from my automated test rather than from the application itself.
The layout inflation does not work though. Is it even possible to inflate views and ...
1
vote
1answer
82 views
Handler.handleMessage is not called while running test, but is called in the app
I have a service that runs in a separate process. The service spawns a new thread in onCreate() method. This thread sends messages back to the service.
If I start the app manually everything works ...
1
vote
2answers
224 views
Run specific test using espresso
I am currently running my test via command
gradle app:connectedCheck
This works great, but as my test are building up, I don't want to go through all of them when I am trying to create one. Does ...
1
vote
1answer
17 views
Error in class declaration, “testbuild” unable to resolve to a type
I was trying to test activity lifecycle of an application(testbuild). As i start writing testcase class, i am getting errors in the class declaration that "testbuild" cannot be resolved to a type. ...
2
votes
0answers
76 views
NameNotFoundException at ActivityUnitTestCase with ActionBarActivity
I am trying to write some tests for an existing application. I wanted to supply a test Application class to the tests and I followed the example here, since I am also using Dagger for DI.
However, ...
0
votes
0answers
31 views
how to identify android native player elements using
I am working on the test automation for android browser using appium. Actually i am automating some video links of HTML5 but when I switch to fullscreen, and try to find the elements in that view ...
1
vote
1answer
63 views
Android test automation: Drawn pattern assertion on screen
My application draws a pattern on the screen (sketching). Is there a method through which I could automate drawing a simple pattern (e.g. solo.drag(fromX, toX, fromY, toY, stepCount) in Robotium) and ...