Skip to content
Xavier Gouchet edited this page Nov 18, 2019 · 2 revisions

Elmyr is a Kotlin library providing tools to forge “random” (and reproducible) values, specifically usefull for tests.

Introduction

Being an adept of testing code, I write a lot of tests. The problem is that in my tests, my fake / test data always look the same. My user names are always Bob and Alice, aged 42 or 69, with userId=24601, and eating “spam”, “eggs” and “bacon” for breakfast.

The problem is, the more test I write, the less I’m confident in my fake values, because they’re always the same.

This is where Elmyr kicks in, allowing you to create fake data based on a few constraints, making your test data random, and yet reproducible.

Why “Elmyr”

The concept of this library is to be able to generate values that could pass for actual production values, but are not. Which is a kind of forgery. This library is named after Elmyr de Hory, a XXth century art forger.