CheckOps home

Tools directory

K

CheckOps

Kaspresso

Kaspresso is Kaspersky's Apache-2.0 Android UI testing framework built on Espresso and UI Automator, adding flaky-test protection, a Kotlin DSL, Compose support, ADB access, detailed reports, Allure and Robolectric support.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

Introduction

Kaspresso is a framework for Android UI testing from Kaspersky. It is based on Google’s Espresso and UI Automator and adds a wide range of features on top of them: built-in protection against flaky tests, Jetpack Compose support, screenshot testing with dark-mode support, a declarative approach to writing tests, the ability to interact with other apps and system UI, Kotlin DSL wrappers, detailed logs and reports, ADB support, Allure and Robolectric support, easy migration from Espresso, flexible configuration, automatic pulling of test artifacts and the page object pattern out of the box. The latest release, 1.6.1, was published on 8 April 2026, with commits continuing in October 2026.

Readability comes from Kotlin DSL wrappers. Kaspresso builds on Kakao, a Kotlin DSL wrapper over Espresso, and adds its own equivalent for UI Automator called Kautomator. Because Kakao and Kautomator offer almost identical APIs, the README notes that you write tests in one style regardless of which engine is underneath. The README also says some UI Automator commands run up to ten times faster with Kaspresso.

Tests are structured with step("...") { } blocks and reusable scenario(...) objects, which produce readable logs and reports. To fight flakiness, Kaspresso uses DSL wrappers and behaviour interceptors that catch failures and retry, and flakySafely(timeoutMs = ...) lets you wrap a specific check. Interceptors also let you add custom actions to every framework operation, such as writing a log or taking a screenshot.

Espresso and UI Automator cannot call ADB commands from inside a test, so Kaspresso provides AdbServer. Its Device class lets tests push and pull files, toggle the network, grant permissions like a user, emulate phone calls, take screenshots, toggle GPS and set geolocation, enable or disable accessibility, change the app language, and collect and parse logcat output. A screenshot feature helps translators see each screen in context when localising an app, without refactoring legacy screens.

Kaspresso can generate detailed Allure reports, with logs, view hierarchy, screenshots and video, and almost all of its stability interceptors also work when UI tests run on the JVM through Robolectric. The project offers a step-by-step tutorial on its website, and the last version supporting the old Android Support libraries (rather than AndroidX) is 1.5.3.

How it compares: plain Espresso is fast and official but verbose and confined to your app’s process, and UI Automator handles system UI with a different API. Kaspresso unifies them with one readable DSL plus stability, ADB and reporting features. Appium and Maestro are cross-platform black-box tools; Kaspresso stays in Kotlin within the Android project.

In the quality loop, Kaspresso is a strong choice for native Android UI and end-to-end tests that must be readable, stable and well reported in CI.

The source code is at KasperskyLab/Kaspresso on GitHub under the Apache-2.0 licence, with about 1,900 stars; the most recent commit was on 13 October 2026.

Features

  1. Espresso and UI Automator unified: Kakao and Kautomator DSLs with almost identical APIs.
  2. Flaky-test protection: Interceptors and flakySafely retry unstable operations.
  3. Steps and scenarios: Readable, reusable test structure with clear logs.
  4. AdbServer and Device API: Network, permissions, GPS, language, calls, logcat and files from tests.
  5. Jetpack Compose support: Separate kaspresso-compose-support module.
  6. Screenshots: Screenshot tests with dark mode and screenshots for translators.
  7. Allure reports: Logs, view hierarchy, screenshots and video per test.
  8. Robolectric support: Run UI tests on the JVM with most interceptors working.

Pros

  1. More stable UI tests: Built-in retries and interceptors reduce flakiness.
  2. Readable Kotlin tests: DSLs and steps make tests easy to review.
  3. Free to use: Open source under the Apache-2.0 licence, so the core tool costs nothing to use.
  4. Actively maintained: The repository had commits as recent as 13 October 2026.

Cons

  1. Android only: No iOS support.
  2. Extra concepts: Interceptors, AdbServer and screen objects add learning overhead.
  3. AdbServer setup: ADB features need the desktop AdbServer component running.
  4. Retries can hide issues: Review flaky-safe retries so real bugs are not masked.

Add Kaspresso to your module (use the latest version from Maven Central):

dependencies {
    androidTestImplementation("com.kaspersky.android-components:kaspresso:<latest_version>")
    androidTestImplementation("com.kaspersky.android-components:kaspresso-compose-support:<latest_version>")
}

A test with a screen object and steps:

object LoginScreen : KScreen<LoginScreen>() {
    override val layoutId: Int? = null
    override val viewClass: Class<*>? = null
    val email = KEditText { withId(R.id.email) }
    val submit = KButton { withId(R.id.submit) }
}

class LoginTest : TestCase() {
    @get:Rule
    val activityRule = activityScenarioRule<MainActivity>()

    @Test
    fun login() = run {
        step("Enter email and submit") {
            LoginScreen {
                email.replaceText("user@example.com")
                submit { flakySafely(timeoutMs = 7000) { isVisible() }; click() }
            }
        }
    }
}

Practical tips:

  1. Model each screen as a screen object to keep tests short.
  2. Enable Allure reports in CI for screenshots and logs on failure.
  3. Use AdbServer only where system-level actions are genuinely needed.

Resources:

Pricing

Kaspresso is free and open source under the Apache-2.0 licence.

  1. Android teams wanting readable, stable UI tests in Kotlin.
  2. Teams fighting flaky Espresso suites, using interceptors and retries.
  3. Apps needing system interactions, using AdbServer and the Device API.
  4. Not a fit for cross-platform or iOS testing.

Conclusion

Kaspresso turns Espresso and UI Automator into a cohesive, readable and more stable Android testing framework, with excellent reporting and system-level control.

For native Android teams, it is one of the most complete open-source options for UI and end-to-end testing.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with Kaspresso side by side.