37 000 unit-тестов против Gradle: как мы добились 12-минутного прогона

Привет я Федотов Михаил, технический лидер по Android разработке в Альфа-банке. Сегодня хочу поговорить про performance (ускорение) unit тестов. Я работаю на проекте Android приложения Альфа-банка для физических лиц. Для нашего большого проекта это время — больная тема, так как у нас около 800 модулей и большая часть кода полностью покрыта unit тестами (за некоторыми исключениями, например, view классы). Сейчас у нас почти 6000 spec (тест-классов) в которых 37 000 тест-кейсов. Общее время прогона всех тестов на CI превышало 3 часа. Локально все тесты прогнать вообще было утопией, так как вероятнее всего сборка просто падала от нехватки оперативной памяти. Сейчас все тесты проекта мы научились прогонять за честные 12 минут и я расскажу что для этого потребовалось.

https://habr.com/ru/companies/alfa/articles/993352/

#unittests #gradle #mockk #performance_optimization #android

37 000 unit-тестов против Gradle: как мы добились 12-минутного прогона

Привет я Федотов Михаил, технический лидер по Android-разработке в Альфа-Банке. Сегодня хочу поговорить про performance (ускорение) unit-тестов. Я работаю на проекте Android приложения Альфа-банка для...

Хабр
JUnitを用いた単体テストについて - Qiita

目的本記事は私が学んだことについての備忘録です。最近JUnit+MockKやJUnit+Mockitoを用いた単体テストの作成を行う機会が多かったため、今回はそれらのテストについてまとめていき…

Qiita
The relaxed property in the annotation MockkBean should be used carefully but sometimes we just use relaxed with it. What is your stance on it? #mockk #mockkbean #ninjasquad #kotlin #springframework
Only for special cases
0%
Always relaxed!
0%
Sometimes
0%
I use Mockito for that
100%
Poll ended at .
The Ultimate Showdown: Mockito vs MockK - Which is the Best?

In this video, I’m trying to explain where the difference between MockK en Mockito lies. I do not want to highlight any particular personal preference with t...

YouTube
#Mockk is cool. ❤️ #Kotlin #Mocks

I have forked the #mastodon4j project on #GitHub and migrated it to latest #Gradle plus latest library releases. Also migrated tests over to #mockk. Let's see what else I can do. I use this lib in my own project. Need to implement some of the v2 endpoints from the #Mastodon #API as well.

Not sure, if the current repo of #mastodon4j is still maintained. Wrote to the maintainer, but did not get a reply. Also, all of the other forks look pretty outdated.

https://github.com/andregasser/mastodon4j

#Java #Kotlin

GitHub - andregasser/mastodon4j: A Mastodon Client for Java and Kotlin

A Mastodon Client for Java and Kotlin. Contribute to andregasser/mastodon4j development by creating an account on GitHub.

GitHub
#TIL that mocking for #kotlin in #quarkus is quite fun with #mockk https://mockk.io and https://quarkiverse.github.io/quarkiverse-docs/quarkus-mockk/dev/index.html . I now use mockk in favor of #mockito for programming in kotlin and quarkus because of the support for coroutines.
MockK

Provides DSL to mock behavior. Built from zero to fit Kotlin language. Supports named parameters, object mocks, coroutines and extension function mocking

MockK
Release 3.0.0 · Ninja-Squad/springmockk

Upgrade to Spring Boot 2.4.0. Please keep using version 2.x of SpringMockK if you still use Spring Boot 2.2.x or 2.3.x. Changes made in Spring Boot Mockito's support in 2.4.0 have ben ported to Spr...

MockK, the idiomatic mocking framework for Kotlin - Devoxx FR 2019 - Yannick De Turck

RT @[email protected]

Big update of the official @[email protected] + @[email protected] tutorial:
- #Mockk instead of Mockito
- Follows @[email protected] JPA guidelines (var instead of val, no data class)
- Maven + Gradle build
- Nullable instead of Optional for CrudRepository
- Spring Boot 2.1.3

https://spring.io/guides/tutorials/spring-boot-kotlin/

🐦🔗: https://twitter.com/sdeleuze/status/1096423498325651459

Getting Started | Building web applications with Spring Boot and Kotlin

Learn how to easily build and test web applications with Spring, Kotlin, Junit 5 and JPA

Getting Started | Building web applications with Spring Boot and Kotlin