Comments (6)
1.0.12-SNAPSHOT
made the fix.
Thank you!
from android-junit5.
What error are you facing when the product flavor is active? Starting with AGP3, each product flavor has to be assigned a dimension
, which you declared, but didn't assign to the flavor (it should say dev { dimension "tier" }
).
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!
from android-junit5.
The problem is that it doesn't found Spek tests.
This is the result of ./gradlew junitPlatformTestDevDebug
with an existing product flavour
Test run finished after 28 ms
[ 3 containers found ]
[ 0 containers skipped ]
[ 3 containers started ]
[ 0 containers aborted ]
[ 3 containers successful ]
[ 0 containers failed ]
[ **0 tests found** ]
[ 0 tests skipped ]
[ 0 tests started ]
[ 0 tests aborted ]
[ 0 tests successful ]
[ 0 tests failed ]
And this is of ./gradlew junitPlatformTest
without a product flavour
Test run finished after 32 ms
[ 4 containers found ]
[ 0 containers skipped ]
[ 4 containers started ]
[ 0 containers aborted ]
[ 4 containers successful ]
[ 0 containers failed ]
[ **1 tests found** ]
[ 0 tests skipped ]
[ 1 tests started ]
[ 0 tests aborted ]
[ 0 tests successful ]
[ 1 tests failed ]
from android-junit5.
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.
from android-junit5.
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, 1.0.12-SNAPSHOT
, this issue has been fixed, and it will be part of the next proper release, also due very shortly.
Thanks for reporting!
from android-junit5.
Released in 1.0.12
!
from android-junit5.
Related Issues (20)
- Unwanted tasks added as dependencies to JaCoCo task HOT 17
- numShards, shardIndex support HOT 3
- ActivityScenarioExtension launch keeps getting null . HOT 1
- Loading :jacocoTestReportDebug fails with Kotlin 1.7.0 HOT 5
- Is there a way to provide the ability for overriding compileSdkVersion ? HOT 1
- Instrumented Testsuites run on JUnit4 Runner HOT 1
- Might be better to migrate CI to Github Actions
- Add support for Gradle Plugins DSL HOT 2
- org.junit.runners.model.InvalidTestClassError starting with Android Studio Dolphin | 2021.3.1 HOT 8
- Build broken when using kotlin 1.7.21 HOT 1
- Clarification with regards to JaCoCo HOT 2
- AGP 8.0.0-alpha10 HOT 6
- Various 'Unable to resolve' log messages for Android tests HOT 4
- Parallel concurrent execution of instrumentation tests HOT 6
- NoClassDefFoundError: org/jetbrains/kotlin/gradle/plugin/KotlinPluginKt with Kotlin 1.8.20 HOT 5
- `@Tag` at the class level results in test number mismatch HOT 6
- NoSuchMethodError: 'org.gradle.api.provider.Property org.gradle.api.reporting.ConfigurableReport.getOutputLocation()' on Gradle 7.5.1 HOT 3
- Is it possible to run junit5 tests with robolectric? HOT 5
- Encountering problems when trying to integrate the plugin HOT 1
- Log not working with ParameterizedTest HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-junit5.