Android Check
Adyen/adyen-android
Run compile, lint, and unit test checks. An agent skill from Adyen/adyen-android.
A skill your agent uses to stand up a JUnit4-based JVM unit-test suite on an Android module.
$ npx skills add skydoves/android-testing-skills --skill configuring-junit4-on-android -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install skydoves/android-testing-skills configuring-junit4-on-android --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/skydoves/android-testing-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/jvm-tests/runner/configuring-junit4-on-android .claude/skills/configuring-junit4-on-android && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "configuring-junit4-on-android" agent skill from https://github.com/skydoves/android-testing-skills/tree/main/jvm-tests/runner/configuring-junit4-on-android into .claude/skills/configuring-junit4-on-android/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "configuring-junit4-on-android", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/skydoves/android-testing-skills/tree/main/jvm-tests/runner/configuring-junit4-on-androidType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add skydoves/android-testing-skills --skill configuring-junit4-on-android -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install skydoves/android-testing-skills configuring-junit4-on-android --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/skydoves/android-testing-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/jvm-tests/runner/configuring-junit4-on-android .agents/skills/configuring-junit4-on-android && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "configuring-junit4-on-android" agent skill from https://github.com/skydoves/android-testing-skills/tree/main/jvm-tests/runner/configuring-junit4-on-android into .agents/skills/configuring-junit4-on-android/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "configuring-junit4-on-android", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add skydoves/android-testing-skills --skill configuring-junit4-on-android -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install skydoves/android-testing-skills configuring-junit4-on-android --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/skydoves/android-testing-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/jvm-tests/runner/configuring-junit4-on-android .cursor/skills/configuring-junit4-on-android && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "configuring-junit4-on-android" agent skill from https://github.com/skydoves/android-testing-skills/tree/main/jvm-tests/runner/configuring-junit4-on-android into .cursor/skills/configuring-junit4-on-android/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "configuring-junit4-on-android", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/skydoves/android-testing-skills.git --path jvm-tests/runner/configuring-junit4-on-android--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add skydoves/android-testing-skills --skill configuring-junit4-on-android -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install skydoves/android-testing-skills configuring-junit4-on-android --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/skydoves/android-testing-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/jvm-tests/runner/configuring-junit4-on-android .gemini/skills/configuring-junit4-on-android && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "configuring-junit4-on-android" agent skill from https://github.com/skydoves/android-testing-skills/tree/main/jvm-tests/runner/configuring-junit4-on-android into .gemini/skills/configuring-junit4-on-android/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "configuring-junit4-on-android", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install skydoves/android-testing-skills configuring-junit4-on-androidInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add skydoves/android-testing-skills --skill configuring-junit4-on-android -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/skydoves/android-testing-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/jvm-tests/runner/configuring-junit4-on-android .github/skills/configuring-junit4-on-android && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "configuring-junit4-on-android" agent skill from https://github.com/skydoves/android-testing-skills/tree/main/jvm-tests/runner/configuring-junit4-on-android into .github/skills/configuring-junit4-on-android/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "configuring-junit4-on-android", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add skydoves/android-testing-skills --skill configuring-junit4-on-android -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install skydoves/android-testing-skills configuring-junit4-on-android --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/skydoves/android-testing-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/jvm-tests/runner/configuring-junit4-on-android .opencode/skills/configuring-junit4-on-android && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "configuring-junit4-on-android" agent skill from https://github.com/skydoves/android-testing-skills/tree/main/jvm-tests/runner/configuring-junit4-on-android into .opencode/skills/configuring-junit4-on-android/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "configuring-junit4-on-android", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
configuring-junit4-on-androidA skill your agent uses to stand up a JUnit4-based JVM unit-test suite on an Android module.
Configuring Junit4 On Android is an agent skill from skydoves/android-testing-skills. 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, InstrumentationRegistry.getInstrumentation(), ApplicationProvider.getApplicationContext(), the @SmallTest / @MediumTest / @LargeTest size annotations wired into am instrument -e size, the androidx-test Truth subjects, and the canonical…
Its SKILL.md is about 5.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Unit testing and Meeting notes and agendas. It works with Android, JUnit and Gradle. The repository describes itself as: ⚡️ A set of skills for Android testing: Compose UI, AndroidX Test, JVM unit tests, and ADB. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 8665ed5. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
adbFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
developer.android.comgithub.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Configuring Junit4 On Android loads about 5.1k tokens when it runs. Until then it costs about 221 tokens; SKILL.md has 1,254 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from skydoves/android-testing-skills at commit 8665ed5, republished under its Apache-2.0 licence (© skydoves). 1,254 words, ~5,140 tokens.
.claude/skills/configuring-junit4-on-android/SKILL.md (or your agent's skills folder).Almost every "test suite is misconfigured" report boils down to one of three root causes: the wrong AndroidJUnit4 is imported, the wrong InstrumentationRegistry is imported, or the size-annotation / dispatcher plumbing is missing. This skill encodes the exact Gradle matrix from androidx.test:core 1.7.0 onward, the canonical FQCNs, and the minimal MainDispatcherRule pattern that androidx itself ships in testutils-ktx.
Cannot resolve symbol AndroidJUnit4, AndroidJUnit4 is deprecated, or asks "which AndroidJUnit4 should I import".IllegalStateException: No instrumentation registered from InstrumentationRegistry.getInstrumentation() in a unit test, or asks why InstrumentationRegistry is crossed out.IntentSubject, BundleSubject, LocationSubject, ParcelableSubject) but does not know which artifact ships them.am instrument -e size small to filter tests and asks how to wire @SmallTest / @MediumTest / @LargeTest.ViewModel / coroutine test and needs the canonical MainDispatcherRule template.../../mocking/mocking-with-mockito/SKILL.md.../../mocking/mocking-with-mockk/SKILL.md.runTest { … } or Turbine — use ../../coroutines/testing-coroutines-with-runtest/SKILL.md or ../../coroutines/testing-flows-with-turbine/SKILL.md.@Config) — use ../../robolectric/using-robolectric-correctly/SKILL.md.am instrument — use ../../../instrumentation/runner/running-instrumented-tests-with-androidjunit4/SKILL.md.../../../fundamentals/doubles/picking-test-doubles/SKILL.md.com.android.application or com.android.library).src/test/ source set on disk (Gradle creates it lazily — mkdir -p src/test/kotlin if missing).org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.x already on the classpath.~/.gradle/caches/modules-2/files-2.1/androidx.test/...). Pin them directly, do not latest.release:dependencies {
// Core JUnit4
testImplementation("junit:junit:4.13.2")
// androidx.test foundations (work in src/test/ via Robolectric and in src/androidTest/)
testImplementation("androidx.test:core:1.7.0")
testImplementation("androidx.test:core-ktx:1.6.1")
testImplementation("androidx.test:runner:1.7.0")
testImplementation("androidx.test:rules:1.7.0")
testImplementation("androidx.test.ext:junit:1.3.0")
testImplementation("androidx.test.ext:junit-ktx:1.3.0")
testImplementation("androidx.test.ext:truth:1.7.0")
testImplementation("com.google.truth:truth:1.4.4")
// Coroutines test (for MainDispatcherRule / runTest)
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.1")
}For instrumented tests in src/androidTest/, mirror the same artifacts on androidTestImplementation. The artifacts are dual-classpath compatible.
@RunWith. There are TWO classes named AndroidJUnit4 on the classpath. The deprecated one is androidx.test.runner.AndroidJUnit4 (file runner-1.7.0/androidx/test/runner/AndroidJUnit4.java L41-44 — @Deprecated). The canonical one is androidx.test.ext.junit.runners.AndroidJUnit4 from the androidx.test.ext:junit:1.3.0 artifact (file junit-1.3.0/androidx/test/ext/junit/runners/AndroidJUnit4.java L49). It delegates to Robolectric on the JVM (when org.robolectric.RobolectricTestRunner is on the classpath) and to androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner on a device.import androidx.test.ext.junit.runners.AndroidJUnit4 // canonical
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class MyTest { /* ... */ }InstrumentationRegistry. androidx.test.InstrumentationRegistry (no .platform.app.) is @Deprecated since :monitor 1.x — every member is @InlineMe'd to its replacement. The canonical class is androidx.test.platform.app.InstrumentationRegistry (file monitor-1.8.0/androidx/test/platform/app/InstrumentationRegistry.java L30-85).import androidx.test.platform.app.InstrumentationRegistry
val instrumentation = InstrumentationRegistry.getInstrumentation()
val args: Bundle = InstrumentationRegistry.getArguments() // copy of -e key/value pairsgetInstrumentation() throws IllegalStateException("No instrumentation registered! Must run under a registering instrumentation.") if called outside an instrumentation host or before Robolectric initialises its shadow. Robolectric registers an Instrumentation instance into the registry before tests run, so this works in src/test/ when @RunWith(AndroidJUnit4::class) is in effect.
ApplicationProvider, not via the registry. ApplicationProvider.getApplicationContext() is the single entry point for the Application context (file core-1.7.0/androidx/test/core/app/ApplicationProvider.java L29-43). Internally it returns getInstrumentation().getTargetContext().getApplicationContext() — same Context, more readable callsite, and the unchecked generic lets callers cast to their Application subclass.import androidx.test.core.app.ApplicationProvider
val ctx: Context = ApplicationProvider.getApplicationContext()
val app: MyApp = ApplicationProvider.getApplicationContext() // unchecked cast@SmallTest (<200ms, no Android stubs), @MediumTest (<1000ms, Android framework via Robolectric), @LargeTest (>1000ms, instrumented). Annotations live in androidx.test.filters.* (file runner-1.7.0/androidx/test/filters/SmallTest.java L44-46). The runner's RunnerArgs.SIZE (runner-1.7.0/androidx/test/internal/runner/RunnerArgs.java L58) wires -e size <value> directly to these annotations.import androidx.test.filters.SmallTest
import androidx.test.filters.MediumTest
@SmallTest
class FastValidatorTest { /* ... */ }
@MediumTest
class RoomDaoTest { /* ... */ }The corresponding am instrument invocation is adb shell am instrument -w -r -e size small <pkg>/androidx.test.runner.AndroidJUnitRunner. See ../../../instrumentation/runner/running-instrumented-tests-with-androidjunit4/SKILL.md for the on-device counterpart.
androidx.test.ext:truth for Android-domain assertions. Truth shipped with androidx.test.ext:truth:1.7.0 adds Android-aware Subject types. Each exposes a static assertThat(T actual) shortcut and a static Subject.Factory<T, S> name() factory:| Subject | FQCN package | Asserts on |
|---|---|---|
IntentSubject | androidx.test.ext.truth.content | android.content.Intent (action, data, component, extras, categories, flags) |
BundleSubject / BaseBundleSubject / PersistableBundleSubject | androidx.test.ext.truth.os | Bundle / BaseBundle / PersistableBundle keys, types, values |
ParcelableSubject | androidx.test.ext.truth.os | Parcelable (round-trips through a Parcel to verify the writer/reader) |
LocationSubject | androidx.test.ext.truth.location | android.location.Location |
NotificationSubject / NotificationActionSubject / PendingIntentSubject | androidx.test.ext.truth.app | Notification family |
MotionEventSubject / PointerCoordsSubject / PointerPropertiesSubject | androidx.test.ext.truth.view | MotionEvent family |
SparseBooleanArraySubject | androidx.test.ext.truth.util | SparseBooleanArray |
Idiomatic import-and-call:
import androidx.test.ext.truth.content.IntentSubject.assertThat
import androidx.test.ext.truth.os.BundleSubject
@Test fun intent_routes_to_settings() {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse("settings://wifi"))
assertThat(intent).hasAction(Intent.ACTION_VIEW)
assertThat(intent).hasData(Uri.parse("settings://wifi"))
}MainDispatcherRule for any test that touches Dispatchers.Main. Compose, viewModelScope, and LiveData all default to Dispatchers.Main, which is unavailable on the JVM unless swapped. The canonical androidx pattern lives at testutils/testutils-ktx/src/jvmMain/kotlin/androidx/testutils/MainDispatcherRule.jvm.kt — use it verbatim:import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.StandardTestDispatcher
import kotlinx.coroutines.test.TestDispatcher
import kotlinx.coroutines.test.resetMain
import kotlinx.coroutines.test.setMain
import org.junit.rules.TestWatcher
import org.junit.runner.Description
@OptIn(ExperimentalCoroutinesApi::class)
class MainDispatcherRule(
val testDispatcher: TestDispatcher = StandardTestDispatcher(),
) : TestWatcher() {
override fun starting(description: Description) {
Dispatchers.setMain(testDispatcher)
}
override fun finished(description: Description) {
Dispatchers.resetMain()
}
}Apply on a test class:
@RunWith(AndroidJUnit4::class)
class MyViewModelTest {
@get:Rule val mainDispatcherRule = MainDispatcherRule()
@Test fun loadsUsers() = runTest {
val vm = MyViewModel(repo = FakeUserRepository())
vm.load()
advanceUntilIdle()
assertThat(vm.users.value).isNotEmpty()
}
}StandardTestDispatcher is preferred — it queues continuations and only advances on runCurrent()/advanceUntilIdle(), matching kotlinx.coroutines.test.runTest semantics. UnconfinedTestDispatcher dispatches eagerly and is appropriate only when ordering is irrelevant.
./gradlew :<module>:testDebugUnitTest --tests com.example.MyTest. The Gradle output shows the runner choice — org.junit.runner.RunWith: AndroidJUnit4 confirms the canonical runner is bound; Test process exited with status code near the top confirms Robolectric is wiring up.AndroidJUnit4 runner// WRONG
import org.junit.runners.JUnit4
import org.junit.runner.RunWith
@RunWith(JUnit4::class)
class MyTest { /* uses InstrumentationRegistry, ApplicationProvider, ... */ }
// WRONG because: stock JUnit4 does not register the Android `Instrumentation` instance
// into InstrumentationRegistry. ApplicationProvider.getApplicationContext() throws
// IllegalStateException("No instrumentation registered!"). Robolectric is also never
// activated even when on the classpath, so all framework calls hit unmocked stubs.// RIGHT
import androidx.test.ext.junit.runners.AndroidJUnit4 // ext.junit.runners, NOT runner.AndroidJUnit4
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class MyTest { /* ... */ }The deprecated alias androidx.test.runner.AndroidJUnit4 still compiles but emits an unsuppressed deprecation warning. New code MUST import from androidx.test.ext.junit.runners.
InstrumentationRegistry import// WRONG
import androidx.test.InstrumentationRegistry // @Deprecated since :monitor
val ctx = InstrumentationRegistry.getContext() // also deprecated — not the Application context
// WRONG because: every member of androidx.test.InstrumentationRegistry is @Deprecated
// and @InlineMe'd to its replacement. getContext() returns the instrumentation package
// context, NOT the Application context — common source of "resource not found" failures.// RIGHT
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.core.app.ApplicationProvider
val ctx: Context = ApplicationProvider.getApplicationContext() // application context
val args: Bundle = InstrumentationRegistry.getArguments() // -e key/value pairs
val instr = InstrumentationRegistry.getInstrumentation()Dispatchers.Main from a unit test// WRONG
class MyViewModelTest {
@Test fun loadsUsers() = runBlocking {
val vm = MyViewModel(repo = FakeUserRepository())
vm.load()
// Throws IllegalStateException: "Module with the Main dispatcher is missing"
}
}
// WRONG because: kotlinx-coroutines-android (the Main dispatcher impl for Android) is
// NOT on the unit-test classpath. Without Dispatchers.setMain(...), any viewModelScope or
// LaunchedEffect that touches the Main dispatcher fails immediately.// RIGHT
class MyViewModelTest {
@get:Rule val mainDispatcherRule = MainDispatcherRule()
@Test fun loadsUsers() = runTest {
val vm = MyViewModel(repo = FakeUserRepository())
vm.load()
advanceUntilIdle()
assertThat(vm.users.value).hasSize(2)
}
}The @SmallTest / @MediumTest / @LargeTest annotations bind directly to RunnerArgs.SIZE (runner-1.7.0/androidx/test/internal/runner/RunnerArgs.java L58). For instrumented tests:
adb shell am instrument -w -r -e size small \
com.example.test/androidx.test.runner.AndroidJUnitRunnerFor Robolectric-on-JVM tests, Gradle property filtering is the standard route:
./gradlew :app:testDebugUnitTest --tests "com.example.*" \
-PandroidTestSize=smallCombined with -e annotation com.example.SmokeTest (the RunnerArgs.ANNOTATION arg, L60) you get composable filtering.
AndroidJUnit4 from androidx.test.ext.junit.runners. MUST NOT import androidx.test.runner.AndroidJUnit4 — it is @Deprecated.InstrumentationRegistry from androidx.test.platform.app. MUST NOT import androidx.test.InstrumentationRegistry — it is @Deprecated.ApplicationProvider.getApplicationContext() for the Application context. MUST NOT call InstrumentationRegistry.getInstrumentation().getTargetContext() directly — ApplicationProvider is the canonical entry point and handles the unchecked cast.MainDispatcherRule (or equivalent Dispatchers.setMain/resetMain plumbing) before any test that touches viewModelScope, LaunchedEffect, or any Dispatchers.Main consumer. Without it, the test crashes with IllegalStateException: Module with the Main dispatcher is missing.StandardTestDispatcher over UnconfinedTestDispatcher in MainDispatcherRule. StandardTestDispatcher matches runTest semantics; eager dispatch is a footgun for ordering.@SmallTest / @MediumTest / @LargeTest) when the suite is filtered by size. Multiple size annotations on the same target produce undefined runner behaviour.org.robolectric:robolectric:4.x matching the compileSdk of the module.runBlockingTest { } in new code — it is @Deprecated(level = DeprecationLevel.ERROR) since kotlinx-coroutines-test 1.7. Use runTest { } instead.ActivityTestRule<A> — it is @Deprecated. Use androidx.test.ext.junit.rules.ActivityScenarioRule<A> instead (junit-1.3.0/androidx/test/ext/junit/rules/ActivityScenarioRule.java L56). For instrumented variants, see ../../../instrumentation/runner/running-instrumented-tests-with-androidjunit4/SKILL.md.testOptions.unitTests.isIncludeAndroidResources = true in the module's android { … } block. Robolectric needs merged resources to inflate any layout or read R.string.*../gradlew :<module>:testDebugUnitTest compiles and reports Tests run: N, Failures: 0 for the new suite.grep -r "import androidx.test.runner.AndroidJUnit4" src/test src/androidTest returns NO matches (only androidx.test.ext.junit.runners.AndroidJUnit4 is allowed).grep -r "import androidx.test.InstrumentationRegistry" src/test src/androidTest returns NO matches.viewModelScope / Dispatchers.Main declares @get:Rule val mainDispatcherRule = MainDispatcherRule() and uses runTest { … }.@SmallTest, @MediumTest, or @LargeTest if the suite is meant to be filtered../gradlew :<module>:testDebugUnitTest --info output shows org.robolectric.RobolectricTestRunner (host) or AndroidJUnit4ClassRunner (device) in the runner stack — confirming the AndroidJUnit4 delegate selection.runner-1.7.0/androidx/test/runner/AndroidJUnit4.java (L41-44) — @Deprecated alias.junit-1.3.0/androidx/test/ext/junit/runners/AndroidJUnit4.java (L49-70) — canonical runner with Robolectric/Android delegate selection.monitor-1.8.0/androidx/test/platform/app/InstrumentationRegistry.java (L30-85) — canonical registry; getInstrumentation, getArguments, registerInstance.monitor-1.8.0/androidx/test/InstrumentationRegistry.java (L34) — @Deprecated legacy registry.core-1.7.0/androidx/test/core/app/ApplicationProvider.java (L29-43) — single-method facade returning the Application context.runner-1.7.0/androidx/test/filters/SmallTest.java (L44-46), MediumTest.java, LargeTest.java — size annotation definitions.runner-1.7.0/androidx/test/internal/runner/RunnerArgs.java (L54-99) — every -e <key> <value> argument the runner accepts, including size, annotation, class, package, numShards/shardIndex.testutils/testutils-ktx/src/jvmMain/kotlin/androidx/testutils/MainDispatcherRule.jvm.kt — canonical androidx MainDispatcherRule source, identical pattern shipped here.../../../kotlin/kotlin-test/writing-tests-with-kotlin-test/SKILL.md — the framework-agnostic kotlin.test assertions (assertEquals, assertFailsWith, @BeforeTest) used inside these JUnit4 tests; also the only assertion API available in commonTest.© skydoves, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in jvm-tests/runner/configuring-junit4-on-android of skydoves/android-testing-skills.
Open the folder on GitHubat commit 8665ed5
Configuring Junit4 On Android next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Configuring Junit4 On Android this skillskydoves/android-testing-skills | 333 | — | ~5.1k | Automated safety check: Pass | Apache-2.0 | |
| Android CheckAdyen/adyen-android | 149 | — | ~357 | Automated safety check: Pass | MIT | |
| Android Unit Testnwjs/chromium.src | 160 | — | ~1.8k | Automated safety check: Pass | BSD-3-Clause | |
| Incremental Java ProgrammerArabelaTso/Skills-4-SE | 253 | — | ~2.8k | Automated safety check: Pass | Apache-2.0 | |
| Jvm Helpershepherdjerred/monorepo | 112 | — | ~1.9k | Automated safety check: Pass | GPL-3.0 | |
| Native Testing Strategybladeofgod/flutter-ai-harness | 116 | — | ~345 | Automated safety check: Pass | MIT |
Adyen/adyen-android
Run compile, lint, and unit test checks. An agent skill from Adyen/adyen-android.
nwjs/chromium.src
Guide for writing and converting Chromium Android unit tests across host Robolectric (chromejunittests) and on-device (chromepublicunittestapk) suites.
ArabelaTso/Skills-4-SE
Incrementally implement new features in Java repositories from natural language descriptions.
shepherdjerred/monorepo
Current Java, Kotlin, Gradle, Maven, JUnit, JVM diagnostics, packaging, and performance guidance.
bladeofgod/flutter-ai-harness
适用:设计或审查 Kotlin/Swift 原生模块、Bridge Adapter、Host 编译、模拟器/设备和系统能力验证。不适用:纯 Dart/Flutter 测试或用 Fake 代替相机和权限真机验证。触发词:JUnit、XCTest、Robolectric、instrumented test、Swift Testing、Framework Fake、Gradle…
softspark/ai-toolkit
Java coding rules: style, patterns, security, testing. An agent skill from softspark/ai-toolkit.
skydoves/android-testing-skills
A skill your agent uses to verify Compose layout measurements from a UI test using assertWidthIsEqualTo, assertHeightIsEqualTo, assertWidthIsAtLeast, assertHeightIsAtLeast…
skydoves/android-testing-skills
A skill your agent uses to verify a Compose semantics node's properties from a UI test using assertExists, assertDoesNotExist, assertIsDisplayed, assertIsNotDisplayed, assertIsDeactivated…
skydoves/android-testing-skills
A skill your agent uses to render every Jetpack Compose @Preview as a screenshot on a real Android device or emulator and publish a browsable HTML catalog from CI.
skydoves/android-testing-skills
A skill your agent uses to capture visual artefacts from a device for test failures, golden image generation, QA repro, and demo videos.
skydoves/android-testing-skills
A skill your agent uses to pick the correct Compose UI test entry point.
skydoves/android-testing-skills
A skill your agent uses to pick which behaviors to cover in an Android test suite using Google's five-category state vocabulary plus the explicit "what NOT to test" list from…
Categories
A skill your agent uses to stand up a JUnit4-based JVM unit-test suite on an Android module. Configuring Junit4 On Android is an agent skill from skydoves/android-testing-skills. Use this skill to stand up a JUnit4-based JVM unit-test suite on an Android module.
Configuring Junit4 On Android fits situations like: stand up a JUnit4-based JVM unit-test suite on an Android module; the user mentions AndroidJUnit4 unresolved; which AndroidJUnit4; instrumentationRegistry deprecated.
Run `npx skills add skydoves/android-testing-skills --skill configuring-junit4-on-android -a claude-code`. Or copy the skill folder (jvm-tests/runner/configuring-junit4-on-android in skydoves/android-testing-skills) into .claude/skills/configuring-junit4-on-android in your project. Claude Code loads it when a task matches its description.
Run `npx skills add skydoves/android-testing-skills --skill configuring-junit4-on-android -a codex`. Or copy the skill folder (jvm-tests/runner/configuring-junit4-on-android in skydoves/android-testing-skills) into .agents/skills/configuring-junit4-on-android in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add skydoves/android-testing-skills --skill configuring-junit4-on-android -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/configuring-junit4-on-android, .gemini/skills/configuring-junit4-on-android, .github/skills/configuring-junit4-on-android and .opencode/skills/configuring-junit4-on-android in your project.
Going by SKILL.md and its folder, Configuring Junit4 On Android needs the command-line tools its instructions call (adb).
SKILL.md names 2 domains. As links in the text: developer.android.com and github.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Configuring Junit4 On Android is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 5.1k tokens (SKILL.md is roughly 21k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Configuring Junit4 On Android: Android Check (Adyen/adyen-android, 149 stars), Android Unit Test (nwjs/chromium.src, 160 stars), Incremental Java Programmer (ArabelaTso/Skills-4-SE, 253 stars) and Jvm Helper (shepherdjerred/monorepo, 112 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
skydoves (a GitHub user) maintains it in skydoves/android-testing-skills, which has 333 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on May 25, 2026.
Source: skydoves/android-testing-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.