[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7566":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":22,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":36,"readmeContent":37,"aiSummary":38,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":39,"discoverSource":40},7566,"Kaspresso","KasperskyLab\u002FKaspresso","KasperskyLab","Android UI test framework ","https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002F",null,"Kotlin",1923,178,23,43,0,2,19.76,"Apache License 2.0",false,"master",true,[24,25,26,27,28,29,30,31,32,33,34,35],"android","architecture","best-practices","dsl","espresso","flakiness","hacktoberfest","interceptors","kakao","kaspresso","uiautomator","uiautomator2","2026-06-12 02:01:41","[![Android Arsenal](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAndroid%20Arsenal-Kaspresso-green.svg?style=flat )](https:\u002F\u002Fandroid-arsenal.com\u002Fdetails\u002F1\u002F7896)\n[![Android Weekly](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAndroid%20Weekly-383-green.svg)](http:\u002F\u002Fandroidweekly.net\u002Fissues\u002Fissue-383)\n[![Android Weekly](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAndroid%20Weekly-392-green.svg)](http:\u002F\u002Fandroidweekly.net\u002Fissues\u002Fissue-392)\n[![MavenCentral](https:\u002F\u002Fimg.shields.io\u002Fmaven-central\u002Fv\u002Fcom.kaspersky.android-components\u002Fkaspresso)](https:\u002F\u002Fsearch.maven.org\u002Fartifact\u002Fcom.kaspersky.android-components\u002Fkaspresso)\n![Build and Deploy](https:\u002F\u002Fgithub.com\u002FKasperskyLab\u002FKaspresso\u002Fworkflows\u002FBuild%20and%20Deploy\u002Fbadge.svg)\n[![Telegram](https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=Telegram&message=RU&color=0088CC)](https:\u002F\u002Ft.me\u002Fkaspresso)\n[![Telegram](https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=Telegram&message=EN&color=0088CC)](https:\u002F\u002Ft.me\u002Fkaspresso_en)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1152145101825527839?label=discord&labelColor=7289da&style=flat)](https:\u002F\u002Fkas.pr\u002Fgh_discord)\n\n# Kaspresso\n\nKaspresso is a framework for Android UI testing. Based on [Espresso](https:\u002F\u002Fdeveloper.android.com\u002Ftraining\u002Ftesting\u002Fespresso) and [UI\nAutomator](https:\u002F\u002Fdeveloper.android.com\u002Ftraining\u002Ftesting\u002Fui-automator), Kaspresso provides a wide range of additional features, such as:\n\n* Built-in protection against flaky tests\n* Jetpack Compose support\n* Screenshot testing with native approach (with dark mode support)\n* Declarative approach for writing tests\n* Ability to interact with other applications and system elements and interfaces\n* Human readability with Kotlin DSL wrappers over UiAutomator and Espresso\n* Detailed logs and reports (logs, view hierarchy, screenshots, video etc.)\n* ADB support\n* Allure support\n* Robolectric support\n* Easy migration from Espresso\n* Flexible configuration options\n* Automatic artifacts pulling after tests execution\n* Significantly faster execution of UI Automator commands. With Kaspresso, some UI Automator commands run **10 times faster**!\n* Page object pattern from the box\n\nAnd many more!\n\n\u003Cimg src=\"kaspresso.png\" alt=\"Kaspresso\"\u002F>\n\n\u003Cdetails>\n\u003Csummary>\n\n## Integration\n\n\u003C\u002Fsummary>\n\nTo integrate Kaspresso into your project:\n1. If the `mavenCentral` repository does not exist, include it to your root `build.gradle` file:\n\n```groovy\nallprojects {\n    repositories {\n        mavenCentral()\n    }\n}\n```\n\n2. Add a dependency to `build.gradle`:\n\n```groovy\ndependencies {\n    androidTestImplementation 'com.kaspersky.android-components:kaspresso:\u003Clatest_version>'\n    \u002F\u002F Allure support\n    androidTestImplementation \"com.kaspersky.android-components:kaspresso-allure-support:\u003Clatest_version>\"\n    \u002F\u002F Jetpack Compose support\n    androidTestImplementation \"com.kaspersky.android-components:kaspresso-compose-support:\u003Clatest_version>\"\n}\n```\n\nTo try out the cutting edge kaspresso updates before an official release add a snapshot repository to your `build.gradle`\n```groovy\ndependencyResolutionManagement {\n    repositories {\n        maven { url = uri(\"https:\u002F\u002Fcentral.sonatype.com\u002Frepository\u002Fmaven-snapshots\u002F\") }\n    }\n}\n```\nTo use a snapshot version of a Kaspresso add a \"-SNAPHOT\" postfix to the latest Kaspresso version e.g.\n```groovy\ndependencies {\n    androidTestImplementation 'com.kaspersky.android-components:kaspresso:\u003Clatest_version>-SNAPSHOT'\n}\n```\n\nIf you are still using the old Android Support libraries, we strongly recommend to migrate to AndroidX.\n\nThe last version with Android Support libraries is:\n\n```groovy\ndependencies {\n    androidTestImplementation 'com.kaspersky.android-components:kaspresso:1.5.3'\n}\n```\n\n\u003C\u002Fdetails>\n\n## FAQ\n[See our website.](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002Fen\u002F)\nYou can also reach out to us on [Discord](https:\u002F\u002Fkas.pr\u002Fgh_discord).\n\n## Tutorial *NEW*\nTo make it easier to learn the framework, a step-by-step tutorial is available on [our website](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002FTutorial\u002F).\n\n\n\u003Cdetails>\n\u003Csummary>\n\n## Capabilities of Kaspresso\n\n\u003C\u002Fsummary>\n\n\u003Cdetails>\n\u003Csummary>\n\n### Readability\n\n\u003C\u002Fsummary>\n\nWe like the syntax that [Kakao](https:\u002F\u002Fgithub.com\u002FKakaoCup\u002FKakao) applies to write UI tests. This wrapper over Espresso uses the Kotlin DSL approach, that makes the code\nsignificantly shorter and more readable. See the difference:\n\n**Espresso**:\n```kotlin\n@Test\nfun testFirstFeature() {\n    onView(withId(R.id.toFirstFeature))\n        .check(ViewAssertions.matches(\n               ViewMatchers.withEffectiveVisibility(\n                       ViewMatchers.Visibility.VISIBLE)))\n    onView(withId(R.id.toFirstFeature)).perform(click())\n}\n```\n**Kakao**:\n```kotlin\n@Test\nfun testFirstFeature() {\n    mainScreen {\n        toFirstFeatureButton {\n            isVisible()\n            click()\n        }\n    }\n}\n```\nWe used the same approach to develop our own wrapper over UI Automator, and we called it *Kautomator*. Take a look at the code below:\n\n**UI Automator**:\n```kotlin\nval instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation()\nval uiDevice = UiDevice.getInstance(instrumentation)\nval uiObject = uiDevice.wait(\n    Until.findObject(\n        By.res(\n            \"com.kaspersky.kaspresso.sample_kautomator\",\n            \"editText\"\n        )\n    ),\n    2_000\n)\nuiObject.text = \"Kaspresso\"\nassertEquals(uiObject.text, \"Kaspresso\")\n```\n**Kautomator**:\n```kotlin\nMainScreen {\n    simpleEditText {\n        replaceText(\"Kaspresso\")\n        hasText(\"Kaspresso\")\n    }\n}\n```\nSince Kakao and Kautomator provide almost identical APIs, you don’t have to care about what is under the hood of your tests, either Espresso or UI Automator. With Kaspresso, you write tests in the same style for both.\n\nHowever, Kakao and Kautomator themselves don't help you to see the relation between the test and the corresponding test case. Also, a long test often becomes a giant piece of code that is impossible to split into smaller parts.\nThat's why we have created an additional Kotlin DSL that allows you to read your test more easily.\n\nSee the example below:\n\n```kotlin\n@Test\nfun shouldPassOnNoInternetScanTest() =\n    beforeTest {\n        activityTestRule.launchActivity(null)\n        \u002F\u002F some things with the state\n    }.afterTest {\n        \u002F\u002F some things with the state\n    }.run {\n        step(\"Open Simple Screen\") {\n            MainScreen {\n                nextButton {\n                    isVisible()\n                    click()\n                }\n            }\n        }\n        step(\"Click button_1 and check button_2\") {\n            SimpleScreen {\n                button1 {\n                    click()\n                }\n                button2 {\n                    isVisible()\n                }\n            }\n        }\n        step(\"Click button_2 and check edit\") {\n            SimpleScreen {\n                button2 {\n                    click()\n                }\n                edit {\n                    flakySafely(timeoutMs = 7000) { isVisible() }\n                    hasText(R.string.text_edit_text)\n                }\n            }\n        }\n        step(\"Check all possibilities of edit\") {\n            scenario(\n                CheckEditScenario()\n            )\n        }\n    }\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\n\n### Stability\n\n\u003C\u002Fsummary>\n\nSometimes your UI test passes ten times, then breaks on the eleventh attempt for some mysterious reason. It’s called *flakiness*.\n\nThe most popular reason for flakiness is the instability of the UI tests libraries, such as Espresso and UI Automator. To eliminate this instability, Kaspresso uses DSL wrappers and [interceptors](#Interceptors).\n\n\u003C\u002Fdetails>\n\n\n\u003Cdetails>\n\u003Csummary>\n\n### UI test libraries acceleration\n\n\u003C\u002Fsummary>\n\nLet’s watch some short video that shows the difference between the original UI Automator (on the right) and the accelerated one (on the left).\n\n![](https:\u002F\u002Fhabrastorage.org\u002Fwebt\u002Fti\u002Fkv\u002Fki\u002Ftikvkij1vjesnacrxqm-lk0coly.gif)\n\nHere is [a short explanation](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002FWiki\u002FKautomator-wrapper_over_UI_Automator\u002F#accelerate-ui-automator) of why it is possible.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\n\n### Interceptors\n\u003C\u002Fsummary>\n\nWe developed [Kaspresso behavior interceptors](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002FWiki\u002FKaspresso_configuration\u002F#some-words-about-behavior-interceptors) on the base of [Kakao\u002FKautomator\nInterceptors](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002FWiki\u002FKaspresso_configuration\u002F#kaspresso-interceptors-based-on-kakaokautomator-interceptors) to catch failures.\n\nThanks to interceptors, you can do a lot of useful things, such as:\n\n* add custom actions to each framework operation like writing a log or taking a screenshot;\n* overcome flaky operations by re-running failed actions, scrolling the parent layout or closing the android system dialog;\n\nand many more (see [the manual](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002FWiki\u002FKaspresso_configuration\u002F#kaspresso-interceptors-based-on-kakaokautomator-interceptors)).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\n\n### Writing readable logs\n\u003C\u002Fsummary>\n\nKaspresso writes its own logs, detailed and readable:\n\n\u003Cimg src=\"https:\u002F\u002Fhabrastorage.org\u002Fwebt\u002F03\u002Fnn\u002Fqg\u002F03nnqgupdqnwa_i4jwyz1uqq6r0.png\" \u002F>\n\u003Cimg src=\"https:\u002F\u002Fhabrastorage.org\u002Fwebt\u002Ftq\u002Faz\u002F3v\u002Ftqaz3vjsgpw0-ivylrfbnuqyiqa.png\" \u002F>\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\n\n### Ability to call ADB commands\n\u003C\u002Fsummary>\n\nEspresso and UI Automator don't allow to call ADB commands from inside a test. To fix this problem, we developed AdbServer (see the [wiki](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002FWiki\u002FExecuting_adb_commands\u002F)).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\n\n### Ability to work with Android System\n\u003C\u002Fsummary>\n\nYou can use Kaspresso classes to work with Android System.\n\nFor example, with the ```Device``` class you can:\n\n* push\u002Fpull files,\n* enable\u002Fdisable network,\n* give permissions like a user does,\n* emulate phone calls,\n* take screenshots,\n* enable\u002Fdisable GPS,\n* set geolocation,\n* enable\u002Fdisable accessibility,\n* change the app language,\n* collect and parse the logcat output.\n\n(see more about the [Device class](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002FWiki\u002FWorking_with_Android_OS\u002F)).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\n\n### Features screenshotting\n\u003C\u002Fsummary>\n\nIf you develop an application that is available across the world, you have to *localize* it into different languages. When UI is localized, it’s important for the translator to see the context of a word or a phrase, that is the specific screen.\n\nWith Kaspresso, translators can automatically take a screenshot of any screen. It’s incredibly fast, even for legacy screens, and you don't have to refactor or mock anything (see [the manual](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002FWiki\u002FScreenshot_tests\u002F)).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\n\n### Configurability\n\u003C\u002Fsummary>\n\nYou can tune any part of Kaspresso (read [more](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002FWiki\u002FKaspresso_configuration\u002F)).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\n\n### Robolectric support\n\u003C\u002Fsummary>\n\nYou can run your UI-tests on the JVM environment. Additionally, almost all interceptors improving stability, readability and other will work.\nRead [more](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002FWiki\u002FKaspresso_Robolectric\u002F).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\n\n### Allure support\n\u003C\u002Fsummary>\n\nKaspresso can generate very detailed Allure-reports for each test:\n![](https:\u002F\u002Fhabrastorage.org\u002Fwebt\u002Ftq\u002Ft7\u002Fch\u002Ftqt7chcdczrgduhoukqhx1ertfc.png)\nMore information is available [here](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002FWiki\u002FKaspresso_Allure\u002F).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\n\n### Jetpack Compose support\n\u003C\u002Fsummary>\n\nNow, you can write your Kaspresso tests for Jetpack Compose screens! DSL and all principles are the same.\nSo, you will not see any difference between tests for View screens and for Compose screens.\nMore information is available [here](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002FWiki\u002FJetpack_Compose\u002F).\n\n\u003C\u002Fdetails>\n\u003C\u002Fdetails>\n\n## Samples\nAll samples are available in the [samples](https:\u002F\u002Fgithub.com\u002FKasperskyLab\u002FKaspresso\u002Ftree\u002Fmaster\u002Fsamples) folder.\n\nMost of the samples require AdbServer. To start AdbServer you should do the following steps:\n\n1. Go to the `Kaspresso` folder\n```\ncd ~\u002FWorkspace\u002FKaspresso\n```\n2. Start `adbserver-desktop.jar`\n```\njava -jar artifacts\u002Fadbserver-desktop.jar\n```\n\n## Existing issues\nAll existing issues in Kaspresso can be found [here](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002FIssues\u002F).\n\n## Breaking changes\nBreaking changes can be found [here](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002FHome\u002FBreaking-changes\u002F)\n\n## Contribution\nKaspresso is an open source project, so you are welcome to contribute (see the [Contribution Guidelines](https:\u002F\u002Fkasperskylab.github.io\u002FKaspresso\u002FHome\u002FContribution_guide\u002F)).\n\n## License\nKaspresso is available under the [Apache License, Version 2.0](https:\u002F\u002Fgithub.com\u002FKasperskyLab\u002FKaspresso\u002Fblob\u002Fmaster\u002FLICENSE).\n\n\n\u003Cdetails>\n\u003Csummary>\n\n## Runner\n\u003C\u002Fsummary>\n\nIf you looking for a Runner to execute your UI tests we strongly recommend to use [Marathon](https:\u002F\u002Fgithub.com\u002FMarathonLabs\u002Fmarathon). [Marathon](https:\u002F\u002Fgithub.com\u002FMarathonLabs\u002Fmarathon) is a fast, platform-independent test runner focused on performance and stability. It offers easy to use platform implementations for Android and iOS as well as an API for use with custom hardware farms and more techstacks.\n\u003Cimg src=\"marathon-banner.svg\" alt=\"Marathon\"\u002F>\n\n\u003C\u002Fdetails>\n","Kaspresso 是一个基于 Espresso 和 UI Automator 的 Android UI 测试框架。它提供了多种增强功能，包括内置的防抖动测试保护、Jetpack Compose 支持、截图测试（支持深色模式）、声明式测试编写方式、与其它应用及系统元素交互的能力等。该框架使用 Kotlin DSL 提高了代码可读性，并提供详尽的日志和报告，支持 ADB、Allure 和 Robolectric 等工具。此外，Kaspresso 显著提高了 UI Automator 命令的执行速度，部分命令甚至可以快达 10 倍。适用于需要高质量且稳定自动化测试的 Android 应用开发场景，特别是那些追求高效测试流程和快速反馈的团队。","2026-06-11 03:13:03","top_language"]