News for hackers. Stuff that matters.
Re:Android by biafra on Saturday October 16, 2010 @07:09PM (#1799101)
I use the emulator for continuous integration. Its really helpful for unit- and integration-testing. Combine it with Robotium and you can thoroughly test you application across screen sizes and Android OS Versions.
Re:Android by billjings on Sunday October 17, 2010 @11:13AM (#1800495)
I'd like to second a thank you for pointing out Robotium, since I was trashing the emulator in the first place. I will definitely be checking that out for my next project.
Re:Android by stakent on Sunday October 17, 2010 @10:27AM (#1800392)
Thank you for pointing out Robotium.

Can you elaborate more about your test setup?

TIA

Re:Android by biafra on Monday October 18, 2010 @07:31AM (#1803019)
I use the maven-android-plugin to build the dependencies in seperate modules. I have a patched version of bouncycastles crypto implementation (to have openpgp in android). Then there is the network code which also contains no android dependencies so it can be tested without the emulator.

Another module is the App itself. The last module is the TestApp. This is the recommended Test Setup: http://developer.android.com/guide/developing/testing/testin...

The testapp and the app are copied to the emulator or a real device. Then the instrumentation is started. The maven build fails if any error or failure occurs while building, installing or testing.

The continuous integration is done by hudson. The emulator can be started "headless" (-no-window) so it doesn't need to connect to the running XWindow-Server. Currently I am starting the emulator from maven with a special profile that is only used in hudson. When testing locally I usually have my phone already connected. It seems to be possible to have hudson start the emulator. With that setup logcat-output would be captured by hudson. Thats were I want to go.

Also missing in my setup is an multi environment build with all screen resolutions, locales and OS-Versions.

Re:Android by stakent on Monday October 18, 2010 @08:02AM (#1803092)
Thank you again.

Btw. I've upvoted your response, but still see one point next to it. Strange.