SuperAPI AI Directory

android-testing

Testing & quality

View repository

Updated 10-15 21:40

About this skill

Android Testing Reference

A skill distilled from the official documentation on testing Android apps (Kotlin). Depending on the user's task, read the appropriate README.md and follow it to the individual files.

Directory structure

skills/android-testing/
  SKILL.md
  references/
    fundamentals-local/
      README.md
      test-pyramid.md
      test-dependencies.md
      junit4-basics.md
      test-doubles.md
      mockito.md
      mockk.md
      truth.md
      robolectric.md
      coroutines-testing.md
      flow-testing.md
      viewmodel-testing.md
      instanttaskexecutorrule.md
      testable-design.md
    instrumented/
      README.md
      androidjunit4-test-runner.md
      set-up-project.md
      instrumentationregistry.md
      applicationprovider.md
      activityscenario.md
      activityscenariorule.md
      fragmentscenario.md
      servicetestrule.md
      uiautomator.md
      test-filter-annotations.md
      grantpermissionrule.md
      androidtestorchestrator.md
      screenshot-testing.md
      gradle-managed-devices.md
      test-stability.md
      content-provider-testing.md
    espresso/
      README.md
      onview.md
      viewinteraction.md
      viewmatchers.md
      viewactions.md
      viewassertions.md
      ondata.md
      recyclerviewactions.md
      global-actions.md
      idling-resource.md
      intents.md
      web.md
      accessibility-checks.md
      custom-matchers-actions.md
      best-practices.md
      recipes.md
      espresso-device.md
      contrib-actions.md
      multiprocess.md
    compose-testing/
      README.md
      compose-test-rule.md
      finders.md
      semantics-matcher.md
      assertions.md
      actions.md
      semantics-node-interaction.md
      print-to-log.md
      synchronization.md
      test-tag-usage.md
      espresso-interop.md
      screenshot-testing.md
      preview-screenshot-testing.md
      accessibility-testing.md
      state-restoration-tester.md
      device-configuration-override.md
      compose-testing-v2.md
      common-patterns.md
      debug.md
    performance-testing/
      README.md
      compilation-mode.md
      macrobenchmark-metrics.md
      macrobenchmark-rule.md
      microbenchmark-rule.md

Exploration procedure

Derive the category from the task, and identify the target page in the category's README.md:

  1. Find the category corresponding to the task in the mapping table below
  2. For that category, references/{category}/README.md to identify the target page
  3. The target page's .md and check the details

Task → Category Mapping

Task Category Reference README
Test pyramid, test strategy,test/ と androidTest/ I want to know how to use them properly fundamentals-local references/fundamentals-local/README.md
JUnit4 の @Test / @Before / I want to write unit tests with test doubles, Mockito, and MockK fundamentals-local references/fundamentals-local/README.md
I want to write assertions with Truth, and run Android tests on the JVM with Robolectric fundamentals-local references/fundamentals-local/README.md
I want to write tests for coroutines / Flow / ViewModel (runTest, TestDispatcher) fundamentals-local references/fundamentals-local/README.md
AndroidJUnit4 / InstrumentationRegistry / ApplicationProvider I want to build instrumentation tests with instrumented references/instrumented/README.md
ActivityScenario / FragmentScenario I want to control the lifecycle with instrumented references/instrumented/README.md
UiAutomator I want to perform app-wide UI operations with,GrantPermissionRule I want to grant permissions with instrumented references/instrumented/README.md
AndroidTestOrchestrator / I want to isolate and scale test execution with Gradle Managed Devices instrumented references/instrumented/README.md
Espresso.onView / ViewMatchers / ViewActions / ViewAssertions I want to test View-based UI with espresso references/espresso/README.md
RecyclerViewActions / IdlingResource I want to test asynchronous and list UI with espresso references/espresso/README.md
Want to test Intents and WebView with Espresso-Intents / Espresso-Web espresso references/espresso/README.md
createComposeRule / finder / SemanticsMatcher Want to test Compose UI with compose-testing references/compose-testing/README.md
Compose assertions, actions, test synchronization (waitForIdle etc.) compose-testing references/compose-testing/README.md
I want to interoperate Compose with Espresso/UiAutomator, and write screenshot tests compose-testing references/compose-testing/README.md
I want to know typical Compose test patterns (isolating composables, how to reach state), and debug the semantics tree compose-testing references/compose-testing/README.md
MacrobenchmarkRule I want to measure startup, scroll, and animation performance with performance-testing references/performance-testing/README.md
BenchmarkRule Want to microbenchmark the hot path with performance-testing references/performance-testing/README.md
CompilationMode / Metric I want to control measurement conditions and the metrics collected with performance-testing references/performance-testing/README.md
Want to test Hilt - Handled by the android-architecture skill
Want to test Room - Handled by the android-data skill
Want to test WorkManager - Handled by the android-background-work skill