JUnit with Android

Hello,
When ever I want to create a test for an activity, I press Control-Shift-T but the Test class gets created in the same location as my source code for development.  I want the Test code to be located in a src directory of a different Module called Testing.  How do I get Intellij to create the test class in a different module?

3 comments
Comment actions Permalink

First of all, would you like to launch these tests as simple JUnit tests on your local machine, or on Android device/emulator?
If second, the best workflow is to create a new test Android module. Go to File | New module | Test Module (under "Android" group)

0
Comment actions Permalink

I want to run the tests through the Android Emulator or Android device.

I created a Test module within my current project and created working Andoid tests within that Test module.  When I want to create a new test by typing Control-Shift-T within the Intellij environment, the test source code is produced within my development project, not in my Test module.  I then need to move the Java class to my Test module.  Is there a way to get Intellij to dynamically generate the test code inside my Test project?

J

0
Comment actions Permalink

Ah, sorry about this misunderstanding. No, there is no such possibility now. I've created an issue about this: http://youtrack.jetbrains.com/issue/IDEA-97562. Please vote for

0

Please sign in to leave a comment.