开发者

How to test android method with J2SE

开发者 https://www.devze.com 2023-03-10 13:44 出处:网络
I have some dynamically generated Android classes. I need to test some of the methods of those classes (these methods have nothing to do with UI). I hope to integrate this feature into an existing J2S

I have some dynamically generated Android classes. I need to test some of the methods of those classes (these methods have nothing to do with UI). I hope to integrate this feature into an existing J2SE project. Is this possible to run it on sta开发者_JAVA百科ndard VM? If I have to use Dalvik VM, is there any command line interface so that I don't need to start the Android emulator?


Is this possible to run it on standard VM?

You neglected to explain what "it" is.

If "it" is Android, no.

If "it" is your "dynamically generated Android classes", assuming that really means "dynamically generated Java classes", then presumably yes. If your objective is for those classes to go "into an existing J2SE project", simply make sure your "dynamically generated Android classes" have no references to any android.* classes.

If "it" is a test suite to test Android code, you can try Robolectric.

If I have to use Dalvik VM, is there any command line interface so that I don't need to start the Android emulator?

No.

0

精彩评论

暂无评论...
验证码 换一张
取 消