开发者

How to mix Android JUnit classes with plain JUnit classes in same project

开发者 https://www.devze.com 2023-03-05 23:46 出处:网络
Is it possible to have both Android JUnit classes (i.e. extends ActivityInstrumentationTestCase2<>) with plain JUnit classes (i.e. extends TestCase)in the same pro开发者_Python百科ject?

Is it possible to have both Android JUnit classes (i.e. extends ActivityInstrumentationTestCase2<>) with plain JUnit classes (i.e. extends TestCase) in the same pro开发者_Python百科ject?

Some of the classes in my app are "generic" (i.e. do not require an activity or the emulator to be tested) and I would like to created test cases for them, but without having to create a separate test project.

Is this possible?


Yes, you can. There should be no problem in having different super classes in the same test project.


See this http://marakana.com/tutorials/android/junit-test-example.html

This is the best tutorial I have found on the subject.

0

精彩评论

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