How to select/edit proper folder for unit test creation in Android Studio? -


In Android studio, I was able to generate a unit test for a class using the hotkey, in fact: CMD + shift + T . It will always find the right folder to keep (clearly with other unit tests)

But for some reason, after switching slowly, after transferring some test folders, Android The studio really gets confused and the hotkey really gets confused. Prepare a unit test under the generated folders and there is no way to choose which method I want The original folder (from the system)

Is there any way to modify it somewhere else?

Unless you expect Android studios to be made in your sources (build.gradle file) , You can not move where your testing is done. Your tests by default studio are expected to be in the src / androidTest / java / package (make sure you are at least version.46), once you have this If you create a directory, you will see that the Java folder is green Studio is a recognized test folder which will appear in W. In IntelliJ you were able to change the test sources within the project structure window, but this screen does not exist in the Android studio. Now when you use cmd + shift + T, it will work correctly

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -