0

I created a sub-package under android test and when I try to run tests there I get this popup (ignore the red I changed it before posting): enter image description here

I dont get this popup for tests in the root androidTest package, Im not sure whats happening. It looks like its going to add it to my gradle config for me if I run this? But I looked at my gradle files and don't see where this is referenced. I'd like to understand how this is working.

red888
  • 27,709
  • 55
  • 204
  • 392
  • Gradle defaults to `src/androidTest/`. Did you make a package in there? Can you show it? – OneCricketeer Sep 25 '17 at 01:45
  • Alternatively, if it's just a regular Junit test, that goes in `src/test/java` https://stackoverflow.com/questions/34397524/whats-the-difference-between-src-androidtest-and-src-test-folders – OneCricketeer Sep 25 '17 at 01:46
  • I made a new package under the default androidTest: AndroidStudioProjects/game/app/src/androidTest/java/com/mycomp/mygame/game01/Ship/ShipTest.java – red888 Sep 25 '17 at 01:47
  • Your image doesn't say game01 – OneCricketeer Sep 25 '17 at 01:48
  • Yeah i edited it before posting. I just right clicked under the default androidTest package in intellij and created a new package and created the test in there – red888 Sep 25 '17 at 01:49
  • you should be able to right click any method and create a unit test for it – OneCricketeer Sep 25 '17 at 05:17
  • yeah I want to understand whats happening in the gradle config. How do I set this up manually and why isn't it working? – red888 Sep 25 '17 at 15:27
  • Gradle just defines where your tests are located based on the sourceSets. https://developer.android.com/studio/build/build-variants.html#sourcesets – OneCricketeer Sep 25 '17 at 15:48

0 Answers0