-
Notifications
You must be signed in to change notification settings - Fork 53
Product Flavor tasks don't find their tests properly #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What error are you facing when the product flavor is active? Starting with AGP3, each product flavor has to be assigned a Here is an example from the plugin's unit tests. Please let me know if the error persists beyond that, and post a stack trace as well! |
The problem is that it doesn't found Spek tests.
And this is of
|
Thanks for elaborating! This looks like an issue with how the different source paths are fed into the flavor-aware sub tasks. I'll keep you posted. |
This adds "FunctionalSpec" classes that verify the correct execution of JUnit 5 tests in different scenarios. We've had some issues with test discovery in the past, which go beyond the "pure" plugin tests that assert the correct configuration and behavior. These new tests create virtual projects & run their unit tests with GradleRunner, then assert if everything went as expected. These tests are detecting the incorrect behavior for issues like #25, which are related to a bug in the Kotlin copy task, for instance.
* Introduce functional unit tests akin to the JUnit 5 Java plugin This adds "FunctionalSpec" classes that verify the correct execution of JUnit 5 tests in different scenarios. We've had some issues with test discovery in the past, which go beyond the "pure" plugin tests that assert the correct configuration and behavior. These new tests create virtual projects & run their unit tests with GradleRunner, then assert if everything went as expected. These tests are detecting the incorrect behavior for issues like #25, which are related to a bug in the Kotlin copy task, for instance. * #25: Fix destination of copied Kotlin classes for AGP3
Actually the problem wasn't how the JUnit tasks were set up, but rather where the intermediate Kotlin classes were copied to. If you used a Java test instead, it would have been picked up properly. After some writing, I have now introduced functional tests which will aid in verifying the behavior of the plugin with actual unit test sources. On the latest snapshot of the plugin, Thanks for reporting! |
|
Released in |
Subject
The text was updated successfully, but these errors were encountered: