Our unit tests most often specify the expected behavior of a piece of code by defining example scenarios. Each test is a single concrete scenario. When the test suite succeeds, we get the impression that our application works as intended, also for other possible input values. That is, however, not at all guaranteed. It is easy to miss errors due to edge cases that the developer didn’t think about or lack of coverage in the chosen inputs.
In this talk, I will introduce you to property-based testing and how it differs from the more common example-based testing. This testing approach lifts testing to a higher level of abstraction and leaves it to generators to come up with concrete scenarios. The result is a cleaner and more compact test suite that is easier to maintain and better exposes subtle bugs. The hard part of property-based testing lies in defining the suitable properties, and we will look at the best practices to do that properly.
Kotest offers a property test framework that includes generators, shrinkers, and everything else you need to start property-based testing. During my talk, we will see many of its features. We also learn how extension functions and other language features can make our tests even more readable. Don’t you use Kotest? No worries! The property test framework is compatible with JUnit and any other test framework.
--
Advanced Kotlin Dev Day 2022 was organized on 24 November 2022 by Xebia. This event took place in the Q-Factory in Amsterdam.
--
Xebia
It’s your business, we accelerate it.
We are a group of highly ambitious craftsmen. From digital strategy to technology implementation. As such we are a one stop shop for full stack digital transformation. We provide innovative solutions and services to help your organization become a digital winner.
Check out Xebia online:
Website -
LinkedIn -
Twitter -
Facebook -
YouTube -
1 view
1820
535
2 weeks ago 01:28:22 1
ЛУЧШЕЕ КИНО! ПРИВЕЛ ТРЁХ ЛЮБИМЫХ К МАМЕ, ЧТОБЫ РЕШИТЬ, КТО ЛУЧШЕ! В стиле jazz #МЕЛОДРАМЫ ПРО ЛЮБОВЬ
3 weeks ago 00:40:40 1
Апатриды: непридуманная жизнь людей без гражданства
4 weeks ago 00:09:22 2
И эти переобулись! Белоснежка станет последним “прогрессивным“ фильмом Дисней о “женской силе“
1 month ago 00:53:56 1
Африка - фильм с Екатериной Гусевой и Игорем Петренко. 6+ Памяти блокады Ленинграда
1 month ago 00:18:22 2
ШОК! СМОТРИ, ЧТО ПРОИЗОШЛО ПРИ СЪЕМКАХ ФИЛЬМА СТРАСТИ ХРИСТОВЫ
1 month ago 00:21:41 1
Леденящее душу предупреждение Мэла Гибсона о роли Иисуса в фильме «СТРАСТИ ХРИСТОВЫ»
1 month ago 02:55:23 1
ФИЛЬМ ДО СЛЕЗ! ОН НЕ ХОТЕЛ ДЕТЕЙ А ПОЛУЧИЛ СРАЗУ ТРОИХ СИРОТ СЕСТРЫ! Клевер желаний! Новый фильм
1 month ago 03:03:19 1
Фильм покорил миллионы, смотрим мелодраму, Любовь с испытательным сроком
1 month ago 01:45:54 1
Личный номер. Боевик. Лучшие фильмы
1 month ago 00:00:16 1
Самый короткий фильм в мире)) Кремль. День семьи. Киркоров.
1 month ago 01:29:14 1
ШИКАРНЫЙ Фильм 2019 порвал душу! ٭٭ ЗАМУЖ ЗА БОМЖА ٭٭ Русские мелодрамы 2018 новинки HD
1 month ago 00:18:42 1
Как выглядеть МОЛОЖЕ | Приемы из кино
2 months ago 01:21:48 1
RC GROUP фильм “Нас таких много“
2 months ago 02:57:57 1
🔥От этого фильма невозможно оторваться! – ФИЛЬМ ПОД НОВЫЙ ГОД – НОВИНКИ КИНО – ТОП ФИЛЬМ 2024
2 months ago 00:14:45 1
ВСТРЕЧА В ЛЕСУ – Самый ВДОХНОВЛЯЮЩИЙ фильм года! Народ не знающий своего прошлого...
2 months ago 00:20:50 1
Другая ВСТРЕЧА В ЛЕСУ - Самый ВДОХНОВЛЯЮЩИЙ фильм 2025 года! ПРЕМЬЕРА! Легендарное продолжение
2 months ago 00:02:03 1
Фильм о компании “Ниеншанц-Автоматика“
2 months ago 00:56:43 4
“Спасибо, скейтбординг!“: фильм о “динозаврах“ отечественного скейтбординга
2 months ago 01:10:52 1
Константин Заслонов (1949) фильм смотреть онлайн
2 months ago 01:30:52 1
ОТ ЭТОЙ ПРАВДЫ, КР0ВЬ В ЖИЛАХ СТЫНЕТ! ФИЛЬМ ЗАПРЕТИЛИ В 40 СТРАНАХ! ДОКУМЕНТАЛЬНЫЙ ФИЛЬМ
2 months ago 00:28:58 1
Бегущий по лезвию. Мечтают ли андроиды об электроовцах? О романе Филипа Дика и фильме Ридли Скотта
2 months ago 00:55:20 1
Кахи Кавсадзе. “А есть ли там театр?!“. Док. фильм (Грузия, 2011) (на русском языке)
2 months ago 01:06:01 3
Фильм-сказка. “ВЕЧЕРА НА ХУТОРЕ БЛИЗ ДИКАНЬКИ“. (1961). Лучшие советские сказки.