Blueground has developed an open-source tool called Fixtures, inspired by Philipp Hauer's blog post, to automate the generation of helper functions for data class instantiation in tests. By using the @Fixture annotation, helper functions are automatically generated, reducing boilerplate code. The tool also supports random data generation, handling unsupported field types with @FixtureAdapter, and overcoming issues related to source sets and multi-module projects.

5m read timeFrom engineering.theblueground.com
Post cover image
Table of contents
Standing on the shoulders of giantsFixturesHow to overcome known issuesRecap

Sort: