Add Test Package to Existing Android Studio Project

I have an existing android app and I am trying to implement some junit tests. Usually (since Android Studio 1.2) a test suite is generated automatically. If I try to manually create folders that mimic the structure I have seen elsewhere, either there is no way to create a package under those folders, or I cannot call it what I should be capable of if it is not placed under an existing package. Does anyone know how to properly add this as it would be when creating an auto?

Every article covering this assumes it already exists ... like this one: http://evgenii.com/blog/testing-activity-in-android-studio-tutorial-part-1/

missing test package

+3


source to share


1 answer


This is not the best way to do it, but I just created a new project, allowed the test suite to autogenerate, and moved everything from my old project to the new one. After refactoring, there were a few links that needed to be cleaned up, but they worked pretty well for the most part.



0


source







All Articles