views:

466

answers:

1

I have an ordinary project with JUnit tests that are connected to the classes in my Android Project. I want my server to run some JUnit tests in my testproject everytime I commit my code from my Android Project.

Is there a best practise to do this? So far I only managed to run the tests when they are a part of a while the JUnit tests and Android classes are separated into 2 different projects, since JUnit runs on JVM and Android in an emulator on DVM (Dalvik Virtual Machine).

+2  A: 

You can use Hudson to achieve this. I've written some articles describing this, for example Android Continuous Integration: Build with Maven.

To be able to run the tests some emulator instances fulfilling your project's requirement must be running on the CI server, preferably in headless mode.

Changing the Android emulator locale automatically and How to Get Serial Number or ID of Android Emulator After it Runs? could also come in handy.

dtmilano