Skip to content

Commit

Permalink
Issue 579 profile fixes (#585)
Browse files Browse the repository at this point in the history
* ISSUE-579: changed main icon

* ISSUE-579: added discord link

* ISSUE-579: changed README.md file

* ISSUE-579: fixed some tutorial mistakes

* ISSUE-579: changed mkdocs.yml file

* ISSUE-579: fixed info in github profile

* ISSUE-579: added articles in Kaspresso-in-articles blocks
  • Loading branch information
AzamatCherchesov authored Oct 9, 2023
1 parent cf34c1a commit 8320ea7
Show file tree
Hide file tree
Showing 15 changed files with 407 additions and 96 deletions.
140 changes: 124 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,40 @@
![Build and Deploy](https://github.com/KasperskyLab/Kaspresso/workflows/Build%20and%20Deploy/badge.svg)
[![Telegram](https://img.shields.io/static/v1?label=Telegram&message=RU&color=0088CC)](https://t.me/kaspresso)
[![Telegram](https://img.shields.io/static/v1?label=Telegram&message=EN&color=0088CC)](https://t.me/kaspresso_en)
[![Discord](https://img.shields.io/discord/1152145101825527839?label=discord&labelColor=7289da&style=flat)](https://discord.com/invite/hFMC5NQU)

# Kaspresso

Kaspresso is a framework for Android UI testing. Based on [Espresso](https://developer.android.com/training/testing/espresso) and [UI
Automator](https://developer.android.com/training/testing/ui-automator), Kaspresso provides a wide range of additional features, such as:

* 100% stability, no flakiness.
* Jetpack Compose support.
* Built-in protection against flaky tests
* Jetpack Compose support
* Screenshot testing with native approach (with dark mode support)
* Declarative approach for writing tests
* Ability to interact with other applications and system elements and interfaces
* Human readability with Kotlin DSL wrappers over UiAutomator and Espresso
* Detailed logs and reports (logs, view hierarchy, screenshots, video etc.)
* ADB support
* Allure support
* Robolectric support
* Easy migration from Espresso
* Flexible configuration options
* Automatic artifacts pulling after tests execution
* Significantly faster execution of UI Automator commands. With Kaspresso, some UI Automator commands run **10 times faster**!
* Excellent readability due to human DSL.
* Useful interceptor mechanism to catch all actions and assertions in one place.
* Full logging.
* Ability to call ADB commands.
* UI tests writing philosophy implemented with DSL.
* Features screenshotting.
* Robolectric support.
* Allure support.
* Page object pattern from the box

And many more!

<img src="kaspresso.png" alt="Kaspresso"/>

<details>
<summary>

## Integration

</summary>

To integrate Kaspresso into your project:
1. If the `mavenCentral` repository does not exist, include it to your root `build.gradle` file:

Expand All @@ -52,7 +62,7 @@ dependencies {
}
```

To try out the cutting edge kaspresso updates before an oficial release add a "-SNAPHOT" postfix to the latest Kaspresso version e.g.
To try out the cutting edge kaspresso updates before an official release add a "-SNAPHOT" postfix to the latest Kaspresso version e.g.
```groovy
dependencies {
androidTestImplementation 'com.kaspersky.android-components:kaspresso:<latest_version>-SNAPSHOT'
Expand All @@ -69,13 +79,30 @@ dependencies {
}
```

</details>

## FAQ
[See our website.](https://kasperskylab.github.io/Kaspresso/en/)
You can also reach out to us on [Discord](https://kas.pr/gh_discord).

## Tutorial *NEW*
To make it easier to learn the framework, a step-by-step tutorial is available on [our website](https://kasperskylab.github.io/Kaspresso/Tutorial/).


<details>
<summary>

## Capabilities of Kaspresso

</summary>

<details>
<summary>

### Readability

</summary>

We like the syntax that [Kakao](https://github.com/KakaoCup/Kakao) applies to write UI tests. This wrapper over Espresso uses the Kotlin DSL approach, that makes the code
significantly shorter and more readable. See the difference:

Expand Down Expand Up @@ -182,21 +209,42 @@ fun shouldPassOnNoInternetScanTest() =
}
```

</details>

<details>
<summary>

### Stability

</summary>

Sometimes your UI test passes ten times, then breaks on the eleventh attempt for some mysterious reason. It’s called *flakiness*.

The 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).

</details>


<details>
<summary>

### UI test libraries acceleration

</summary>

Let’s watch some short video that shows the difference between the original UI Automator (on the right) and the accelerated one (on the left).

![](https://habrastorage.org/webt/ti/kv/ki/tikvkij1vjesnacrxqm-lk0coly.gif)

Here is [a short explanation](https://kasperskylab.github.io/Kaspresso/Wiki/Kautomator-wrapper_over_UI_Automator/#accelerate-ui-automator) of why it is possible.

</details>

<details>
<summary>

### Interceptors
</summary>

We developed [Kaspresso behavior interceptors](https://kasperskylab.github.io/Kaspresso/Wiki/Kaspresso_configuration/#some-words-about-behavior-interceptors) on the base of [Kakao/Kautomator
Interceptors](https://kasperskylab.github.io/Kaspresso/Wiki/Kaspresso_configuration/#kaspresso-interceptors-based-on-kakaokautomator-interceptors) to catch failures.
Expand All @@ -208,17 +256,36 @@ Thanks to interceptors, you can do a lot of useful things, such as:

and many more (see [the manual](https://kasperskylab.github.io/Kaspresso/Wiki/Kaspresso_configuration/#kaspresso-interceptors-based-on-kakaokautomator-interceptors)).

</details>

<details>
<summary>

### Writing readable logs
</summary>

Kaspresso writes its own logs, detailed and readable:

<img src="https://habrastorage.org/webt/03/nn/qg/03nnqgupdqnwa_i4jwyz1uqq6r0.png" />
<img src="https://habrastorage.org/webt/tq/az/3v/tqaz3vjsgpw0-ivylrfbnuqyiqa.png" />

</details>

<details>
<summary>

### Ability to call ADB commands
</summary>

Espresso 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://kasperskylab.github.io/Kaspresso/Wiki/Executing_adb_commands/)).

</details>

<details>
<summary>

### Ability to work with Android System
</summary>

You can use Kaspresso classes to work with Android System.

Expand All @@ -237,35 +304,68 @@ For example, with the ```Device``` class you can:

(see more about the [Device class](https://kasperskylab.github.io/Kaspresso/Wiki/Working_with_Android_OS/)).

</details>

<details>
<summary>

### Features screenshotting
</summary>

If 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.

With 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://kasperskylab.github.io/Kaspresso/Wiki/Screenshot_tests/)).

</details>

<details>
<summary>

### Configurability
</summary>

You can tune any part of Kaspresso (read [more](https://kasperskylab.github.io/Kaspresso/Wiki/Kaspresso_configuration/)).

</details>

<details>
<summary>

### Robolectric support
</summary>

You can run your UI-tests on the JVM environment. Additionally, almost all interceptors improving stability, readability and other will work.
Read [more](https://kasperskylab.github.io/Kaspresso/Wiki/Kaspresso_Robolectric/).

</details>

<details>
<summary>

### Allure support
</summary>

Kaspresso can generate very detailed Allure-reports for each test:
![](https://habrastorage.org/webt/tq/t7/ch/tqt7chcdczrgduhoukqhx1ertfc.png)
More information is available [here](https://kasperskylab.github.io/Kaspresso/Wiki/Kaspresso_Allure/).

</details>

<details>
<summary>

### Jetpack Compose support
</summary>

Now, you can write your Kaspresso tests for Jetpack Compose screens! DSL and all principles are the same.
So, you will not see any difference between tests for View screens and for Compose screens.
More information is available [here](https://kasperskylab.github.io/Kaspresso/Wiki/Jetpack_Compose/).

</details>
</details>

## Samples
All samples are available in the [samples](https://github.com/KasperskyLab/Kaspresso/tree/issue-372/tutorial/samples) folder.
All samples are available in the [samples](https://github.com/KasperskyLab/Kaspresso/tree/master/samples) folder.

Most of the samples require AdbServer. To start AdbServer you should do the following steps:

Expand All @@ -278,10 +378,6 @@ cd ~/Workspace/Kaspresso
java -jar artifacts/adbserver-desktop.jar
```

## Runner
If you looking for a Runner to execute your UI tests we strongly recommend to use [Marathon](https://github.com/MarathonLabs/marathon). [Marathon](https://github.com/MarathonLabs/marathon) 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.
<img src="marathon-banner.svg" alt="Marathon"/>

## Existing issues
All existing issues in Kaspresso can be found [here](https://kasperskylab.github.io/Kaspresso/Issues/).

Expand All @@ -293,3 +389,15 @@ Kaspresso is an open source project, so you are welcome to contribute (see the [

## License
Kaspresso is available under the [Apache License, Version 2.0](https://github.com/KasperskyLab/Kaspresso/blob/master/LICENSE).


<details>
<summary>

## Runner
</summary>

If you looking for a Runner to execute your UI tests we strongly recommend to use [Marathon](https://github.com/MarathonLabs/marathon). [Marathon](https://github.com/MarathonLabs/marathon) 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.
<img src="marathon-banner.svg" alt="Marathon"/>

</details>
13 changes: 11 additions & 2 deletions docs/Home/Kaspresso-in-articles.en.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
# Kaspresso in articles


[EN] [Eugene Matsyuk — Kaspresso: The autotest framework that you have been looking forward to. Part I](https://proandroiddev.com/kaspresso-the-autotest-framework-that-you-have-been-looking-forward-to-part-i-e102ed384d11) <br>
[EN] [Feyza Dayan - UI Test Roadmap with Kaspresso](https://medium.com/trendyol-tech/ui-test-roadmap-with-kaspresso-fa78d4ee7150) <br>
[EN] [Kaspersky makes Android app testing tool publicly available for mobile developers](https://www.digitalstreetsa.com/kaspersky-makes-android-app-testing-tool-publicly-available-for-mobile-developers/) <br>
[EN] [Danil Perevalov - Leak detection into UI tests](https://proandroiddev.com/leak-detection-into-ui-tests-952c598dcfe0) <br>
[EN] [Christina Rozenkova - Kaspresso Tutorials. Part 1. Launching the First Test](https://proandroiddev.com/kaspresso-tutorials-part-1-launching-the-first-test-731d489ea1ae) <br>
[EN] [Evgenii Matsiuk (Eugene Matsyuk) - Autotests on Android. The entire picture](https://proandroiddev.com/where-to-write-android-ui-tests-part-2-cb45033f3ddf) <br>
[EN] [Senchurin Nick - Kaspresso and ADB server](https://proandroiddev.com/kaspresso-and-adb-server-7c35a80d8978) <br>

[RU] [Евгений Мацюк — Kaspresso: фреймворк для автотестирования, который вы ждали](https://habr.com/ru/company/kaspersky/blog/467617/) <br>
[RU] [Иван Федянин — Kaspresso tutorials. Часть 1. Запуск первого теста](https://habr.com/ru/company/kaspersky/blog/570658/) <br>
[EN] [Eugene Matsyuk — Kaspresso: The autotest framework that you have been looking forward to. Part I](https://proandroiddev.com/kaspresso-the-autotest-framework-that-you-have-been-looking-forward-to-part-i-e102ed384d11) <br>
[RU] [Евгений Мацюк — Что там по автотестам на Android в 2022?](https://habr.com/ru/articles/695244/) <br>
[RU] [Konstantin Sidorov - Путь к автотестированию Android нативными инструментами: испробовали всё, что есть на рынке и сделали свои выводы](https://habr.com/ru/companies/bcs_company/articles/661179/) <br>
[RU] [Алексей Пак - Настраиваем CI/CD для тестовой инфраструктуры Android](https://habr.com/ru/companies/gazprommedia/articles/739838/) <br>
[RU] [Егор Курников - На чем писать Android UI-тесты](https://habr.com/ru/companies/avito/articles/516650/) <br>


> Do you want your article to be included in this list? Everything is simple! Write an article, send it to us and we will add it to this list!
Expand Down
12 changes: 11 additions & 1 deletion docs/Home/Kaspresso-in-articles.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@

[RU] [Евгений Мацюк — Kaspresso: фреймворк для автотестирования, который вы ждали](https://habr.com/ru/company/kaspersky/blog/467617/) <br>
[RU] [Иван Федянин — Kaspresso tutorials. Часть 1. Запуск первого теста](https://habr.com/ru/company/kaspersky/blog/570658/) <br>
[EN] [Eugene Matsyuk — Kaspresso: The autotest framework that you have been looking forward to. Part I](https://proandroiddev.com/kaspresso-the-autotest-framework-that-you-have-been-looking-forward-to-part-i-e102ed384d11) <br>
[RU] [Евгений Мацюк — Что там по автотестам на Android в 2022?](https://habr.com/ru/articles/695244/) <br>
[RU] [Konstantin Sidorov - Путь к автотестированию Android нативными инструментами: испробовали всё, что есть на рынке и сделали свои выводы](https://habr.com/ru/companies/bcs_company/articles/661179/) <br>
[RU] [Алексей Пак - Настраиваем CI/CD для тестовой инфраструктуры Android](https://habr.com/ru/companies/gazprommedia/articles/739838/) <br>
[RU] [Егор Курников - На чем писать Android UI-тесты](https://habr.com/ru/companies/avito/articles/516650/) <br>

[EN] [Eugene Matsyuk — Kaspresso: The autotest framework that you have been looking forward to. Part I](https://proandroiddev.com/kaspresso-the-autotest-framework-that-you-have-been-looking-forward-to-part-i-e102ed384d11) <br>
[EN] [Feyza Dayan - UI Test Roadmap with Kaspresso](https://medium.com/trendyol-tech/ui-test-roadmap-with-kaspresso-fa78d4ee7150) <br>
[EN] [Kaspersky makes Android app testing tool publicly available for mobile developers](https://www.digitalstreetsa.com/kaspersky-makes-android-app-testing-tool-publicly-available-for-mobile-developers/) <br>
[EN] [Danil Perevalov - Leak detection into UI tests](https://proandroiddev.com/leak-detection-into-ui-tests-952c598dcfe0) <br>
[EN] [Christina Rozenkova - Kaspresso Tutorials. Part 1. Launching the First Test](https://proandroiddev.com/kaspresso-tutorials-part-1-launching-the-first-test-731d489ea1ae) <br>
[EN] [Evgenii Matsiuk (Eugene Matsyuk) - Autotests on Android. The entire picture](https://proandroiddev.com/where-to-write-android-ui-tests-part-2-cb45033f3ddf) <br>
[EN] [Senchurin Nick - Kaspresso and ADB server](https://proandroiddev.com/kaspresso-and-adb-server-7c35a80d8978) <br>

> Хочешь попасть в этот список? Все просто! Напиши статью про Kaspresso, пришли нам ссылку, и мы добавим её в этот список!
<br/>
13 changes: 9 additions & 4 deletions docs/Home/Kaspresso-in-videos.en.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Kaspresso в видео
# Kaspresso in videos

[EN] [Eugene Matsyuk — How to start writing autotests and not go crazy](https://www.youtube.com/watch?v=xiVDqMlTdbM) <br>

[RU] [Дмитрий Мовчан, Евгений Мацюк — Как начать писать автотесты и не сойти с ума](https://youtu.be/q_8UUhVDV7c) <br>
[RU] [Егор Курников — Единственное, что вам нужно для UI-тестирования](https://youtu.be/cTykctRSmuA) <br>
[RU] [Воркшоп по автотестам. 19-12-2019](https://www.youtube.com/watch?v=FExlaWfKENI) <br>
[RU] [Руслан Мингалиев - Live-coding: мобильные автотесты с нуля ](https://www.youtube.com/watch?v=gFPeH2yihDA) <br>
[RU] ["Kaspresso" с Евгением Мацюком и Егором Курниковым](https://www.youtube.com/watch?v=vHkoxOfwbDg&feature=youtu.be) <br>
[RU] [Kaspresso: Q&A Session 9.04.20](https://www.youtube.com/watch?v=Jqnn_CDcjK0&feature=youtu.be) <br>
[EN] [Eugene Matsyuk — How to start writing autotests and not go crazy](https://www.youtube.com/watch?v=xiVDqMlTdbM&feature=youtu.be) <br>
[RU] ["Kaspresso" с Евгением Мацюком и Егором Курниковым](https://www.youtube.com/watch?v=vHkoxOfwbDg) <br>
[RU] [Kaspresso: Q&A Session 9.04.20](https://www.youtube.com/watch?v=Jqnn_CDcjK0) <br>
[RU] [Всё, что вы хотели знать о Kaspresso и UI-тестах под Android. Часть 1](https://www.youtube.com/watch?v=JN-c5hD2ZZ8&t=712s) <br>
[RU] [Всё, что вы хотели знать о Kaspresso и UI-тестах под Android. Часть 2](https://www.youtube.com/watch?v=kmdyzO8Whfo&t=2025s) <br>
[RU] [Начинаем писать ui-тесты в Android - Mad Brains Техно](https://www.youtube.com/watch?v=AOgXnq-VII0) <br>
13 changes: 9 additions & 4 deletions docs/Home/Kaspresso-in-videos.ru.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Kaspresso в videos
# Kaspresso в видео

[RU] [Дмитрий Мовчан, Евгений Мацюк — Как начать писать автотесты и не сойти с ума](https://youtu.be/q_8UUhVDV7c) <br>
[RU] [Егор Курников — Единственное, что вам нужно для UI-тестирования](https://youtu.be/cTykctRSmuA) <br>
[RU] [Воркшоп по автотестам. 19-12-2019](https://www.youtube.com/watch?v=FExlaWfKENI) <br>
[RU] [Руслан Мингалиев - Live-coding: мобильные автотесты с нуля ](https://www.youtube.com/watch?v=gFPeH2yihDA) <br>
[RU] ["Kaspresso" с Евгением Мацюком и Егором Курниковым](https://www.youtube.com/watch?v=vHkoxOfwbDg&feature=youtu.be) <br>
[RU] [Kaspresso: Q&A Session 9.04.20](https://www.youtube.com/watch?v=Jqnn_CDcjK0&feature=youtu.be) <br>
[EN] [Eugene Matsyuk — How to start writing autotests and not go crazy](https://www.youtube.com/watch?v=xiVDqMlTdbM&feature=youtu.be) <br>
[RU] ["Kaspresso" с Евгением Мацюком и Егором Курниковым](https://www.youtube.com/watch?v=vHkoxOfwbDg) <br>
[RU] [Kaspresso: Q&A Session 9.04.20](https://www.youtube.com/watch?v=Jqnn_CDcjK0) <br>
[RU] [Всё, что вы хотели знать о Kaspresso и UI-тестах под Android. Часть 1](https://www.youtube.com/watch?v=JN-c5hD2ZZ8&t=712s) <br>
[RU] [Всё, что вы хотели знать о Kaspresso и UI-тестах под Android. Часть 2](https://www.youtube.com/watch?v=kmdyzO8Whfo&t=2025s) <br>
[RU] [Начинаем писать ui-тесты в Android - Mad Brains Техно](https://www.youtube.com/watch?v=AOgXnq-VII0) <br>

[EN] [Eugene Matsyuk — How to start writing autotests and not go crazy](https://www.youtube.com/watch?v=xiVDqMlTdbM) <br>
2 changes: 1 addition & 1 deletion docs/Tutorial/Scenario.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

In this lesson, we will learn what scenarios are (the `Scenario` class from the Kaspresso library), find out what their purpose is, when they should be used, and when it is better to avoid them.

Open the tutorial application and click on the `Login Acitivity` button.
Open the tutorial application and click on the `Login Activity` button.

<img src="../images/scenario/main_screen_login_button.png" alt="Main Screen login button" width="300"/>

Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorial/Scenario.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

В этом уроке мы познакомимся со сценариями (класс `Scenario` из библиотеки Kaspresso), узнаем, что это, для чего они нужны, когда их стоит использовать, а когда лучше избегать.

Открываем приложение tutorial и кликаем по кнопке `Login Acitivity`.
Открываем приложение tutorial и кликаем по кнопке `Login Activity`.

<img src="../images/scenario/main_screen_login_button.png" alt="Main Screen login button" width="300"/>

Expand Down
Loading

0 comments on commit 8320ea7

Please sign in to comment.