Use this skill to assert Flow emissions in tests with Cash App Turbine. Covers flow.test entry, ReceiveTurbine API (awaitItem, awaitComplete, awaitError, expectMostRecentItem, skipItems, expectNoEvents, cancel and friends, plus the non-suspending takeItem/takeComplete/takeError), turbineScope/testIn for multi-flow…
Use this skill to wire Mockito (the dominant Android mocking framework, exclusively used by androidx itself) into a JVM unit-test suite. Covers org.mockito:mockito-core:5.x plus the org.mockito.kotlin:mockito-kotlin:5.x Kotlin DSL — mock (), whenever, argumentCaptor (), any() / anyOrNull() / eq(), MockitoJUnit.rule()…
Use this skill to wire MockK (the Kotlin-first mocking framework) into a JVM unit-test suite, especially when coroutines, singleton/object mocking, or constructor mocking dominate. Covers io.mockk:mockk-jvm:1.14.x (and mockk-android + mockk-agent for instrumented), every { } returns, coEvery / coVerify (native suspend…
Use this skill to run Android-aware unit tests on the JVM with Robolectric — the right runner choice (AndroidJUnit4 vs RobolectricTestRunner), @Config sdk/qualifiers/application, the includeAndroidResources requirement, common shadows (ShadowApplication, ShadowLog, ShadowLooper, ShadowPackageManager…
Use this skill to stand up a JUnit4-based JVM unit-test suite on an Android module. Covers the canonical Gradle dependency matrix (junit:junit:4.13.2, androidx.test:core:1.7.0, androidx.test.ext:junit:1.3.0, androidx.test.ext:truth:1.7.0), the @RunWith(AndroidJUnit4::class) runner…
Use this skill to write tests with the kotlin.test library — the multiplatform assertion + annotation API that compiles the same in commonTest and on the JVM (JUnit4 or JUnit5), Android, JS, Native, and Wasm. Covers the kotlin.test annotations (@Test, @Ignore, @BeforeTest, @AfterTest) and how they typealias onto the…
Use this skill to migrate a codebase off the deprecated android.test. testing classes that ship in the Android platform SDK onto AndroidX Test. Covers InstrumentationTestRunner → AndroidJUnitRunner; InstrumentationTestCase/AndroidTestCase → @RunWith(AndroidJUnit4) + InstrumentationRegistry/ApplicationProvider…