Status Update
Comments
uc...@google.com <uc...@google.com> #2
Do you have a repro project that you could share with us?
There should be no need to excluding any dependencies: we automatically remove them from the test APK if they are in the main APK.
There should be no need to excluding any dependencies: we automatically remove them from the test APK if they are in the main APK.
gl...@intrepid.io <gl...@intrepid.io> #3
I saw this same behavior with 2.3 beta 1, and rolled back to 2.2.3. Don't suppose this was addressed in beta-2?
[Deleted User] <[Deleted User]> #4
The problem seems to be fixed in AS 2.3 beta 2, using gradle plugin 2.3.0-beta2.
Description
Class not found: "example.com.studio23b1.ExampleUnitTest"Empty test suite.
If you run the ":app:compileDebugUnitTestSources" task from the Gradle tool window, then run the unit test run configuration, the example test case is run and shows as success. So it appears that Android Studio is not compiling the unit test sources before attempting to run them.
This appears to be a regression: In Android Studio 2.2.2, creating a new project using the wizard, opening the default ExampleUnitTest file and clicking run tests icon in the gutter does work as expected, showing one passing test case run.
One difference I noticed was which tasks were being executed in the Gradle Console tool window before running the tests:
In AS 2.3-beta1 - Executing tasks: [:app:assembleDebug]
In AS 2.2.2 - Executing tasks: [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:compileDebugUnitTestSources]
I would expect the debug unit test sources to be compiled before AS tries to run the tests.
Build: 2.3 Beta 1, AI-162.3573574, 20161214,
AI-162.3573574, JRE 1.8.0_112-release-b06x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.11.6 unknown, screens 1440x2560, 2560x1440; Retina