Igor Milakovic
03/14/2022, 6:25 PM./gradlew :shared:allTests
does not run Android tests. That's not that big of a deal, since ./gradlew :shared:check
does run both. But the problem is that running any of those repeatedly doesn't fail any longer when iOS tests fail. Luckily, can be fixed by adding :shared:clean
before :shared:check
but then it doesn't proceed with Android tests after iOS fails... And so on, haha.
So yeah, how do you people run your tests, what is the magic command/configuration? 🙂 Thanks!Matti MK
03/14/2022, 6:35 PM./gradlew tasks --all
to show all tasks. I run:
:shared:iosTest
-> “Executes Kotlin/Native unit tests for target ios.”
and
:shared:testDebugUnitTest
-> “Run unit tests for the debug build” (this one runs only for Android)./gradlew :shared:allTests --dry-run
you can see the list of tasks that are executed for that given task. For me there’s no indications about running any Android related testsJavier
03/14/2022, 6:44 PMmkrussel
03/14/2022, 7:12 PMallTests
are all tests except for Android with Android being a special and having multiple test tasks of its own created by the AGP.
Since each platform's tests are different task, gradle does stop after the first task failure unless you use --continue
, But that will also make it try to continue on compile failures, so I'm not a fan of using it.
I'm not sure if not running the iosTest
with no changes is a bug with cache. You can run cleanAllTests
to clean the non Android tests and force them to be run again.Javier
03/14/2022, 8:22 PMmkrussel
03/14/2022, 8:23 PMIgor Milakovic
03/14/2022, 9:15 PM