Our android application is getting fairly big and we would like to use functional tests for our application to prevent regression. We are looking in to options to achieve this.
We make use of geo locations, so now we test the app by entering lat/long in DDMS. If we want to test this, it should be possible to set these geo locations programmatically.
Is there a framework that we can use to functional test our android app and also send these updates to our emulator?
Add a Simulated LocationClick the location on the map you want to simulate, and then press the lowercase L key. A dialog will appear with the message, “Simulated Location Set”. After a short time, the simulated location you set in the Editor will appear as a pink dot in the Android Emulator.
settings> system > developer optionsFind the option select mock location app Then select the app you downloaded from step 1.
Go to your “Settings”, “Systems”, “About Device” and tap multiple times on “Build number” and activate the Developer Mode. A new “Developer Options” menu will be available under “Settings” / “Systems” In the “Developer Options” menu, scroll down to “Debugging” and activate the “Allow mock locations”.
If you compile in Eclipse, you can fake the lat/lon in the android emulator:
I am facing the same problem. While this solution is not built into robotium, you should be able to make it into a utility that can be used in your unit tests.
Unit Testing Location Service
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With