title: Unit tests not working on Android Studio Arctic Fox
body: <p>I've recently installed Android Studio Arctic Fox v2020.3.1 Beta 2 to be able to use Jetpack <code>Compose</code> in our project since I wasn't able to do so back on AS 4.2.1 because <code>Compose</code> was throwing a <a href="https://youtrack.jetbrains.com/issue/IDEA-268774" rel="noreferrer">strange build error that got fixed on Arctic Fox</a>.</p>
  <p>So here's the problem, after loading the project, updating some SDKs/libraries I was able to build and run no problem, however, when I went to run the unit tests I noticed that all test classes were no longer recognized by the IDE. After some investigation I found out that <a href="https://developer.android.com/studio/preview/features#test-configurations" rel="noreferrer">newer versions of AS will no longer recognize JUnit configurations</a>.</p>
  <p>As you can see in the screenshots below there is no way to run those tests as I normally would:</p>
  <p><a href="https://i.stack.imgur.com/yWfRk.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yWfRk.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/BZz09.png" rel="noreferrer"><img src="https://i.stack.imgur.com/BZz09.png" alt="enter image description here" /></a></p>
  <p>And this one is from <code>Run/Debug Configurations</code> where the <code>JUnit</code> tests are under the unknown category:</p>
  <p><a href="https://i.stack.imgur.com/RaMaq.png" rel="noreferrer"><img src="https://i.stack.imgur.com/RaMaq.png" alt="enter image description here" /></a></p>
  <p>Finally, I did create a gradle config to test but it just says on the left side:</p>
  <blockquote>
  <p>Test events were not received</p>
  </blockquote>
  <p>And throws an error on the right side:</p>
  <blockquote>
  <p>Execution failed for task 'features:signup:testDevDebugUnitTest'.
  No tests found for given includes: com.projectsaturn.android.features:signup.SignupViewModelTest</p>
  </blockquote>
  <p>I wonder if anyone out there has come across this issue and was able to resolve?</p>
  <p>Any help is appreciated!</p>
  <p><strong>UPDATE 01:</strong></p>
  <p>So I decided to roll everything back and start from scratch. This time I only updated a few things:</p>
  <ul>
  <li><strong>Gradle</strong>: <code>com.android.tools.build:gradle:7.0.0-beta02</code></li>
  <li><strong>Kotlin</strong>: <code>org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32</code></li>
  <li><strong>Crashlytics</strong>: <code>com.google.firebase:firebase-crashlytics-gradle:2.6.1</code></li>
  <li><strong>Test (core, runner and rules)</strong>: <code>androidx.test:core/runner/rules:1.3.0</code></li>
  </ul>
  <p>Now the issue is that all unit tests fail when I run it via Gradle. I suspect that it isn't running the <code>@Before</code> annotated function prior to running the actual tests functions. Or I'm not setting the Gradle test properly (screenshot below)?</p>
  <p><a href="https://i.stack.imgur.com/8RVR1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8RVR1.png" alt="enter image description here" /></a></p>