Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

388
votes
17answers
89k views

Best practices for unit testing Android apps [closed]

I'd like to unit test my Android application but I found that test driven development in Android is far from trivial at the moment. Any tips, tricks, war stories for building light weight and ...
41
votes
11answers
24k views

How do you test an Android application across multiple Activities?

We are building a complex Android application consisting of many screens and workflows spread across many Activities. Our workflows are similar to what you might see on a Bank's ATM machine, for ...
24
votes
3answers
5k views

Resources for TDD on Android [closed]

Anyone know of any good resources to get me started with test driven development on the Android platform?
20
votes
6answers
4k views

Mocking library/framework that works best in Android?

I'm developing Android application using third party libraries (Twitter4j). I want to be able mock those objects (also objects created by me) in JUnit and functional tests. Do you have any good ...
18
votes
3answers
3k views

Android unit test using ant with library project

It seems that also the latest android SDK tools still don't properly support testing of applications that contain linked library projects. I have a project with the following setup: TestLib (android ...
15
votes
4answers
3k views

Testing database on Android: ProviderTestCase2 or RenamingDelegatingContext?

I've implemented access to a database using SQLiteOpenHelper of android.database within some classes (with pattern DAO). I wrote some junit tests for these classes using a AndroidTestCase but this ...
15
votes
3answers
545 views

When i run my android UIAutomator code, it shows error

When I run my android UIAutomator code, it shows following error. INSTRUMENTATION_RESULT: shortMsg=java.lang.RuntimeException INSTRUMENTATION_RESULT: longMsg=com.android.ui.testing ...
13
votes
3answers
11k views

Testing GPS in Android

How do you test GPS applications in Android? Can we test it using the Android emulator?
6
votes
1answer
1k views

Testing a project that uses ActionBarSherlock

My setup: Library project: ActionBarSherlock Project Test project My project has the library project linked as a library project. It compiles and runs fine. Now I try to test my application using ...
5
votes
1answer
214 views

How to properly learn Android testing?

What are good ways to learn Android testing? I'm interested in learning Android testing, I don't actually do TDD but write the tests and code together. I read all the information at ...
5
votes
0answers
84 views

AssertionFailedError in ApplicationTestCase.createApplication() in newer Android versions when using MockContext

I am writing an Android ApplicationTestCase (TemperatureConverterApplicationTests example found in Android Application Testing Guide by Diego T. Milano on page 171). The example was written for ...
4
votes
2answers
198 views

Testing android applications

I'm new to testing.I've developed a application,now i need to test.I googled about testing for some time,learnt ,what different types of testing are there in general.I wrote few test cases. Three ...
4
votes
1answer
162 views

Robolectric: how to test a SherlockActivity

I'm trying to run tests on an Activity which extends SherlockActivity. I read everything I could find about the solutions for testing activities with ActionBarSherlock and also tried following ...
3
votes
1answer
146 views

Robolectric: testing a ListView with ViewHolder pattern cause NullPointerException

I have a ListActivity that it's adapter implements the ViewHolder pattern. the adapter and viewholder: private class PlaceAdapter extends ArrayAdapter<PlaceModel> { final int ...
3
votes
1answer
315 views

getActivity() method blocking indefinitely while unit testing

I'm trying to test two different Activity classes, where one Activity happens to call the other. Here's my code and then I'll explain the problem: IntroActivityTest public class IntroActivityTest ...

1 2 3 4 5 8
15 30 50 per page