KotlinFixt-your tests

Matthew Dolan

Senior Android Engineer

When writing unit tests, we often need to set up representative test data. Sometimes we rely on mocks as it is “easier” or we spend time inputting data manually and suffer the cost of future maintenance. Either way, we usually only cover one path through our app based on assumptions of how our code currently works.

What if it were possible to generate your test data using real objects without hard coding fixed values? Today we will look at using random values through “constrained non-determinism” - what it is, why use it, and the new KotlinFixture library.

Matt Dolan has been developing with Android since the dark days of v1.6. When he's not eating doughnuts he's passionate about bringing developers and designers together to #buildbetterapps

droidcon Americas is produced by:

Mobile Seasons GmbH (droidcon Global HQ)

Messedamm 22

14055, Berlin

Germany

.droidcon is a registered Trademark of Mobile Seasons GmbH

  • dc-social
  • Twitter - White Circle
  • Facebook - White Circle