Android Unit Test as part of the project

I am trying to create a test project for Android from my main project. Exactly similar to this Android question : how to use a test project in the main project (I'm trying to revive this because this question is out of date and I still cannot find the answer).

Mostly I want to reproduce Android testing methods. This is literally just the / tests / directory in the main project "see link for exact layout".

The main reason we want to is to reduce the number of projects so that we do not need 2 root folders for each project. (the so-called test project and the real project).

I can use everything I need to build, but I assume nant is a way to run tests automatically.

Any help would be great, thanks.

EDIT: Please note that the problem with Eclipse is that it is not easy to give this option (at least I did not find it). You can go to the directory you want and create / tests /, but it will also be linked to another connected project, and I ran into some binding problems.)

+4
source share
1 answer

Could not find this option in Eclipse. However, you can use the command line tools to create a test project wherever you want.

~/android-main-project$ android create test-project -n tests -p ./tests -m ../ 
+2
source

All Articles