Running junit tests with Android

If you follow best practises you will probably face the same problem as many other developers. You junit test cases will not run. I was getting VM error like this:

#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (classFileParser.cpp:3075), pid=2152, tid=4692
# Error: ShouldNotReachHere()
#
# JRE version: 6.0_17-b04
# Java VM: Java HotSpot(TM) Client VM (14.3-b01 mixed mode windows-x86 )
# An error report file with more information is saved as:
# C:workspacetesths_err_pid2152.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#

Solution is really simple. In your run configuration for particular test case remove Android from Bootstrap entries.

Run configuration for junit test case