---
title: "Eric Ampire (@ericampire) | Hashnode"
description: "Eric-A-. Read the latest articles by Eric Ampire on Hashnode."
url: "https://hashnode.com/@ericampire"
---

@ericampire

# Eric Ampire

@ericampire · Lubumbashi · Joined September 2020

Eric-A-

[Website](https://ericampire.com/)

## Comments

[Thanks for your feedback, that's was a typo thanks for noticing](https://hashnode.com/posts/compose-multiplatform-made-easy-with-circuit/65c079be5c24aee848e289f8/comment/65cbfcbb344113ef017af405#reply-65cc7647af957790437e4b8b)

Reply · Article · Feb 14, 2024 · [Part 1 - Compose Multiplatform Made easy with Circuit](https://hashnode.com/posts/compose-multiplatform-made-easy-with-circuit/65c079be5c24aee848e289f8)

[Hey Miki thanks for the question! Kotest’s property testing is designed to be make sure those tests are repeatable. This is achieved using random seed. When a property test fails on certain input combinations, kotest will report: the input combination which made the test fail, the “simplest” input combination which also made the test fail, as well as, you’ve guessed it the random seed which was used to generate those input For instance: class SomeTest : FunSpec({ test("dummy test should be repeatable") { checkAll(Arb.int(1..10), Arb.int(1..10)) { first, second -> first shouldBeGreaterThan second } } }) ~~~ SomeTest ~~~ + dummy test should be repeatable: TestResult=Failure(duration=211.721007ms, cause=java.lang.AssertionError: Property failed after 1 attempts Arg 0: 1 (shrunk from 8) Arg 1: 1 (shrunk from 9) Repeat this test by using seed 8256346135502929881 Caused by: 1 should be > 1) you can then replay this test using the seed provided by passing PropTestConfig(seed = 8256346135502929881) in the first checkAll param. Now on deeper discourse. can we say that these (property) tests are repeatable? Not necessarily. Property tests are only repeatable when the test is properly designed. Both the System Under Test (SUT) and your arbitrary input generators (Arb<A>) need to obey certain constraints. That is: The SUT must be pure i.e. suspend fun sut(inputs: A...): B output purely depends on the inputs it is given, (e.g. strings.joinToString()). As a counter example, if your sut mutates an internal state which changes its behaviour such that 1 + 1 is no longer 2, but instead 0, then it is not repeatable, unless there’s a way to inject that internal state into the sut prior to the experiment, such that your sut setup function becomes sut(initialState: S, inputs: A...): B. This effectively made the sut a pure function. Real world example of such test is when you upsert an arbitrary entry in the database, and then do an operation that relates to that entry and then inspect the output. all Arb<A> arbitraries that are used to generate the inputs are repeatable. I.e. it and all of the arbs that it depends on relies solely on random seed. e.g. Arb.int(1..10). As a counter example, imagine if you create an arb that uses Instant.now(), then it won’t satisfy the repeatable requirement of an arb.](https://hashnode.com/posts/create-powerful-tests-using-property-based-testing/6284337d83966a1653f113d0/comment/628465c683966a1653f1171d#reply-628cebf0b4bd016fc9a31569)

Reply · Article · May 24, 2022 · [Create Powerful Tests using Property Based Testing](https://hashnode.com/posts/create-powerful-tests-using-property-based-testing/6284337d83966a1653f113d0)

[Can you share the full stack trace please](https://hashnode.com/posts/firebase-auth-with-jetpack-compose/60d7123cde92ef110afddb4a/comment/6139640dc4916c2339f4fdec#reply-613964de2c9ec22314f4a976)

Reply · Article · Sep 9, 2021 · [Firebase Auth with Jetpack Compose](https://hashnode.com/posts/firebase-auth-with-jetpack-compose/60d7123cde92ef110afddb4a)

[Thanks for featuring my article](https://hashnode.com/posts/taking-advantage-of-junit-5-extensions/61193d87ac5c985f36435ff5/comment/611d3892a285e422d5a12e16#reply-611d3964f86ef222fad1702a)

Reply · Article · Aug 18, 2021 · [Taking advantage of Junit 5 extensions](https://hashnode.com/posts/taking-advantage-of-junit-5-extensions/61193d87ac5c985f36435ff5)
